Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Use Trigonometric Substitution

A square root of a quadratic, a2−x2\sqrt{a^2 - x^2}, a2+x2\sqrt{a^2 + x^2} or x2−a2\sqrt{x^2 - a^2}, disappears when xx is replaced by asin⁡θa\sin\theta, atan⁡θa\tan\theta or asec⁡θa\sec\theta, because a Pythagorean identity turns the root into a single trig function.

Recognize the task

The integrand has a2−x2\sqrt{a^2 - x^2}, a2+x2\sqrt{a^2 + x^2} or x2−a2\sqrt{x^2 - a^2} (or these quadratics to a power) and no factor x dxx\,dx that an ordinary substitution could use: ∫4−x2 dx\int \sqrt{4 - x^2}\,dx, ∫dxx2x2+9\int \frac{dx}{x^2\sqrt{x^2 + 9}}, ∫dxx2−1\int \frac{dx}{\sqrt{x^2 - 1}}. Test: if u=u = the quadratic fails because its derivative is missing, substitute trig.
The roots collapse through the Pythagorean identities; returning to xx uses the inverse trigonometric functions.

The three substitutions

For a² − x²: x = a sin θroot becomes a cos θ
a2−x2=acos⁡θ,dx=acos⁡θ dθ\sqrt{a^2 - x^2} = a\cos\theta, \qquad dx = a\cos\theta\,d\theta
Uses 1−sin⁡2θ=cos⁡2θ1 - \sin^2\theta = \cos^2\theta. Take θ∈[−π2,π2]\theta \in [-\frac{\pi}{2}, \frac{\pi}{2}] so that cos⁡θ≥0\cos\theta \ge 0.
For a² + x²: x = a tan θroot becomes a sec θ
a2+x2=asec⁡θ,dx=asec⁡2θ dθ\sqrt{a^2 + x^2} = a\sec\theta, \qquad dx = a\sec^2\theta\,d\theta
Uses 1+tan⁡2θ=sec⁡2θ1 + \tan^2\theta = \sec^2\theta (tangent-secant identity).
For x² − a²: x = a sec θroot becomes a tan θ
x2−a2=atan⁡θ,dx=asec⁡θtan⁡θ dθ\sqrt{x^2 - a^2} = a\tan\theta, \qquad dx = a\sec\theta\tan\theta\,d\theta
Uses sec⁡2θ−1=tan⁡2θ\sec^2\theta - 1 = \tan^2\theta.

Steps

StepOn ∫4−x2 dx\int \sqrt{4 - x^2}\,dx
1Match the radical to its pattern and choose the substitution. Read off aa from the constant: 4=224 = 2^2.x=2sin⁡θ,dx=2cos⁡θ dθx = 2\sin\theta, \qquad dx = 2\cos\theta\,d\theta
2Replace x, dx and the radical; simplify with the identity. All three must be replaced. The radical becomes a single trig function.4−4sin⁡2θ=2cos⁡θ\sqrt{4 - 4\sin^2\theta} = 2\cos\theta: ∫2cos⁡θ⋅2cos⁡θ dθ=4∫cos⁡2θ dθ\quad\int 2\cos\theta\cdot 2\cos\theta\,d\theta = 4\int \cos^2\theta\,d\theta
3Integrate in θ. Often a power of sine or cosine.Standard trig antiderivatives ↗4(θ2+sin⁡2θ4)=2θ+2sin⁡θcos⁡θ4\left(\frac{\theta}{2} + \frac{\sin 2\theta}{4}\right) = 2\theta + 2\sin\theta\cos\theta
4Return to x with a reference triangle. From sin⁡θ=x2\sin\theta = \frac{x}{2}: opposite xx, hypotenuse 22, adjacent 4−x2\sqrt{4 - x^2}. So cos⁡θ=4−x22\cos\theta = \frac{\sqrt{4 - x^2}}{2} and θ=arcsin⁡x2\theta = \arcsin\frac{x}{2}.2arcsin⁡x2+x4−x22+C2\arcsin\frac{x}{2} + \frac{x\sqrt{4 - x^2}}{2} + C

Worked examples

Example 1 · a² − x² under the root

x = a sin θ
∫4−x2 dx\int \sqrt{4 - x^2}\,dx
x=2sin⁡θx = 2\sin\theta, dx=2cos⁡θ dθdx = 2\cos\theta\,d\theta
=4∫cos⁡2θ dθ=2θ+sin⁡2θ+C= 4\int \cos^2\theta\,d\theta = 2\theta + \sin 2\theta + C
power-reducing formula
=2arcsin⁡x2+x4−x22+C= 2\arcsin\frac{x}{2} + \frac{x\sqrt{4 - x^2}}{2} + C
sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2\sin\theta\cos\theta, triangle

Example 2 · a² + x² under the root

x = a tan θ
∫dxx2x2+9\int \frac{dx}{x^2\sqrt{x^2 + 9}}
x=3tan⁡θx = 3\tan\theta, dx=3sec⁡2θ dθdx = 3\sec^2\theta\,d\theta, root =3sec⁡θ= 3\sec\theta
=∫3sec⁡2θ dθ9tan⁡2θ⋅3sec⁡θ=19∫cos⁡θsin⁡2θ dθ= \int \frac{3\sec^2\theta\,d\theta}{9\tan^2\theta\cdot 3\sec\theta} = \frac{1}{9}\int \frac{\cos\theta}{\sin^2\theta}\,d\theta
sec⁡θtan⁡2θ=cos⁡θsin⁡2θ\frac{\sec\theta}{\tan^2\theta} = \frac{\cos\theta}{\sin^2\theta}
=−19sin⁡θ+C=−x2+99x+C= -\frac{1}{9\sin\theta} + C = -\frac{\sqrt{x^2 + 9}}{9x} + C
triangle: sin⁡θ=xx2+9\sin\theta = \frac{x}{\sqrt{x^2 + 9}}

Example 3 · x² − a² under the root

x = a sec θ
∫dxx2−1\int \frac{dx}{\sqrt{x^2 - 1}}
x=sec⁡θx = \sec\theta, dx=sec⁡θtan⁡θ dθdx = \sec\theta\tan\theta\,d\theta, root =tan⁡θ= \tan\theta
=∫sec⁡θ dθ=ln⁡∣sec⁡θ+tan⁡θ∣+C= \int \sec\theta\,d\theta = \ln|\sec\theta + \tan\theta| + C
standard antiderivative of secant
=ln⁡∣x+x2−1∣+C= \ln\left|x + \sqrt{x^2 - 1}\right| + C
triangle: tan⁡θ=x2−1\tan\theta = \sqrt{x^2 - 1}

See it happen

Draw the right triangle behind the substitution. For x=2sin⁡θx = 2\sin\theta the side opposite θ\theta is xx, the hypotenuse is 22, and the third side is 4−x2\sqrt{4 - x^2}. Every trig function of θ\theta in your answer is a ratio of those three sides, which is how the answer returns to xx.

Common mistakes

Replacing dx by dθ

✗ dx→dθdx \to d\theta
✓ dx=2cos⁡θ dθdx = 2\cos\theta\,d\theta; the differential changes too

Pairing the wrong substitution with the root

✗ x=asin⁡θx = a\sin\theta for x2−a2\sqrt{x^2 - a^2} gives −a2cos⁡2θ\sqrt{-a^2\cos^2\theta}
✓ x=asec⁡θx = a\sec\theta for x2−a2x^2 - a^2

Leaving the answer in θ

✗ 2θ+sin⁡2θ+C2\theta + \sin 2\theta + C
✓ expand sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2\sin\theta\cos\theta, then use the triangle to return to xx

Using trig substitution when u works

✗ x=2sin⁡θx = 2\sin\theta for ∫x4−x2 dx\int x\sqrt{4 - x^2}\,dx
✓ the factor x dxx\,dx is there: u=4−x2u = 4 - x^2 is faster