Trigonometric Substitution

This is a new method of substitution, and at first, it can be difficult to get used to. The biggest difference from the substitution methods we've used so far (u-substitution and integration by parts) is that rather than defining a new variable explicitly in terms of xx, like u=u= "some expression of xx," we'll define the new variable (θ\theta in this case) implicitly by writing x=x= "some expression of θ\theta."

Just like before, we'll do this so that the integral becomes something we can handle (usually by means of trig integration, as outlined in the previous section), and we'll have to back-substitute in order to have an answer in terms of xx.

Let's illustrate this process with an example.

Evaluate 11x2 dx\displaystyle\int \dfrac{1}{\sqrt{1-x^2}}\ dx.

Solution

Look carefully at what we have: 1x21-x^2. If we let x=sinθx=\sin \theta, this part will become 1sin2θ1-\sin^2 \theta, which can be replaced with cos2θ\cos^2 \theta, since sin2θ+cos2θ=1.\sin^2 \theta + \cos^2 \theta = 1.

Then we have 1cos2θ dx\int \dfrac{1}{\sqrt{\cos^2 \theta}}\ dx

As always, when we do a substitution, we need to account for dxdx: since x=sinθx=\sin \theta, dx=cosθ dθdx = \cos \theta \ d\theta.

That leaves us with 1cos2θ cosθ dθ=1cosθ cosθ dθ=dθ\int \dfrac{1}{\sqrt{\cos^2 \theta}} \ \cos \theta \ d\theta = \int \dfrac{1}{\cos \theta} \ \cos \theta \ d\theta = \int d\theta

This is something we can integrate: dθ=θ+C\int d\theta = \theta + C

All that remains is to substitute back to get the answer in terms of xx: to do this, go back to where we defined θ\theta: if x=sinθx = \sin \theta, θ=sin1x\theta = \sin^{-1} x.

Thus, 11x2 dx=sin1x+C\int \dfrac{1}{\sqrt{1-x^2}}\ dx = \ans{\sin^{-1} x + C}

Process

This method is very limited: it applies to exactly three forms. All of these are related to the Pythagorean identity and its variations.

Recall that sin2θ+cos2θ=1\sin^2 \theta + \cos^2 \theta = 1 and if we divide each term by cos2θ\cos^2 \theta, we get tan2θ+1=sec2θ.\tan^2 \theta + 1 = \sec^2 \theta.

We've already seen the first form: the problem involved 1x2\sqrt{1-x^2}, so we let x=sinθx=\sin \theta so that the first identity helped us simplify the integral. We could also use x=cosθx=\cos \theta in this case, but for simplicity we'll stick with the sine function.

Case 1: x=asinθx = a \sin \theta

When the integral involves a2x2\sqrt{a^2-x^2}, let x=asinθx=a \sin \theta (in the example above, a=1a=1).

Then dx=acosθ dθdx = a\cos \theta \ d\theta and a2x2=a2a2sin2θ=a1sin2θ=acos2θ=acosθ\begin{aligned} \sqrt{a^2-x^2} &= \sqrt{a^2 - a^2\sin^2 \theta}\ &= a\sqrt{1-\sin^2 \theta}\ &= a\sqrt{\cos^2 \theta}\ &= a \cos \theta \end{aligned}

Evaluate 4x2 dx\displaystyle\int \sqrt{4-x^2} \ dx.

Solution

In this case, a=2a=2 (a2=4a^2=4), so we'll let x=2sinθx=2 \sin \theta.

Then dx=2cosθ dθdx = 2 \cos \theta \ d\theta and 4x2=2cosθ\sqrt{4-x^2} = 2 \cos \theta

Making the substitution: 4x2 dx=2cosθ2cosθ dθ\int \sqrt{4-x^2} \ dx = \int 2 \cos \theta \cdot 2 \cos \theta \ d\theta

To integrate this, recall what we did in the previous section: to integrate cos2θ\cos^2 \theta, we'll need to use the half-angle identity: 4cos2θ dθ=4(12+12cos(2θ)) dθ=2+2cos(2θ) dθ=2θ+sin(2θ)+C\begin{aligned} \int 4 \cos^2 \theta \ d\theta &= \int 4 \left(\dfrac{1}{2} + \dfrac{1}{2}\cos(2\theta)\right)\ d\theta\ &= \int 2 + 2\cos (2\theta) \ d\theta\ &= 2\theta + \sin(2\theta) + C \end{aligned}

Get the answer in terms of xx

This part is a bit tricky. First, we need another identity that we haven't used before: sin(2θ)=2sinθcosθ\sin (2\theta) = 2 \sin \theta \cos \theta

This makes our answer look like 2θ+2sinθcosθ+C2\theta + 2\sin \theta \cos \theta + C

Now finally, we need to figure out what θ\theta, sinθ\sin \theta, and cosθ\cos \theta are in terms of xx.

The first we've already seen: if x=2sinθx=2\sin \theta, we can solve for θ\theta: θ=sin1x2\theta = \sin^{-1} \dfrac{x}{2}

Also, from this we can see that sinθ=x2.\sin \theta = \dfrac{x}{2}.

The last part is to find cosθ\cos \theta. There are two ways to do this:

Algebraic Method

Look back at what we have at the beginning of the problem: 4x2=2cosθcosθ=4x22\sqrt{4-x^2} = 2 \cos \theta \longrightarrow \cos \theta = \dfrac{\sqrt{4-x^2}}{2}

Geometric Method

Since sinθ=x2\sin \theta = \dfrac{x}{2}, we can draw the following right triangle and use it to find cosθ\cos \theta:

Right triangle to find cosine

We get the same answer from this method: cosθ=4x22\cos \theta = \dfrac{\sqrt{4-x^2}}{2}

Final Answer

Putting it all together: 4x2 dx=4cos2θ dθ=2θ+sin(2θ)+C=2θ+2sinθcosθ+C=2sin1x2+2(x2)(4x22)+C=2sin1x2+12x4x2+C\begin{aligned} \int \sqrt{4-x^2}\ dx &= \int 4 \cos^2 \theta \ d\theta\ &= 2\theta + \sin (2\theta) + C\ &= 2\theta + 2 \sin \theta \cos \theta + C\ &= 2\sin^{-1} \dfrac{x}{2} + 2\left(\dfrac{x}{2}\right)\left(\dfrac{\sqrt{4-x^2}}{2}\right) + C\ &= \ans{2\sin^{-1} \dfrac{x}{2} + \dfrac{1}{2}x\sqrt{4-x^2} + C} \end{aligned}

Case 2: x=atanθx = a \tan \theta

When the integral involves a2+x2\sqrt{a^2 + x^2}, let x=atanθx= a \tan \theta. Then dx=asec2θ dθdx = a \sec^2 \theta \ d\theta and a2+x2=a2+a2tan2θ=a1+tan2θ=asec2θ=asecθ\begin{aligned} \sqrt{a^2 + x^2} &= \sqrt{a^2 + a^2 \tan^2 \theta}\ &= a\sqrt{1+\tan^2 \theta}\ &= a\sqrt{\sec^2 \theta}\ &= a \sec \theta \end{aligned}

Evaluate x3x2+9 dx\displaystyle\int \dfrac{x^3}{\sqrt{x^2+9}}\ dx.

Solution

Here a=3a = 3, so let x=3tanθx = 3 \tan \theta. Then dx=3sec2θ dθdx = 3 \sec^2 \theta\ d\theta and x2+9=3secθ.\sqrt{x^2+9} = 3 \sec \theta.

Substitute and simplify: x3x2+9 dx=(3tanθ)33secθ3sec2θ dθ=27tan3θsecθ dθ\begin{aligned} \int \dfrac{x^3}{\sqrt{x^2+9}}\ dx &= \int \dfrac{(3 \tan \theta)^3}{3 \sec \theta} \cdot 3 \sec^2 \theta \ d\theta\ &= \int 27 \tan^3 \theta \sec \theta \ d\theta \end{aligned}

Then look back again at what we did in the previous section: since the power of tangent is odd, we'll let u=secθu=\sec \theta, so that du=secθtanθ dθdu = \sec \theta \tan \theta \ d\theta. Then we'll use the identity tan2θ=sec2θ1\tan^2 \theta = \sec^2 \theta - 1 to rewrite the remainder in terms of secθ\sec \theta: 27tan3θsecθ dθ=27tan2θ secθtanθ dθ=27(sec2θ1)secθtanθ dθ=27u227 du=9u327u+C=9sec3θ27secθ+C\begin{aligned} \int 27 \tan^3 \theta \sec \theta \ d\theta &= \int 27 \tan^2 \theta \ \sec \theta \tan \theta \ d\theta\ &= \int 27 (\sec^2 \theta - 1) \sec \theta \tan \theta \ d\theta\ &= \int 27u^2 - 27 \ du\ &= 9u^3 - 27u + C\ &= 9\sec^3 \theta - 27 \sec \theta + C \end{aligned}

Finally, to get the answer in terms of xx, notice that we found that x2+9=3secθ\sqrt{x^2+9} = 3 \sec \theta so secθ=x2+93\sec \theta = \dfrac{\sqrt{x^2 + 9}}{3}.

The answer, then, is x3x2+9 dx=9(x2+93)327(x2+93)+C\int \dfrac{x^3}{\sqrt{x^2+9}}\ dx = 9\left(\dfrac{\sqrt{x^2 + 9}}{3}\right)^3 - 27 \left(\dfrac{\sqrt{x^2 + 9}}{3}\right) + C

After a bit of simplification, we get 13(x2+9)39x2+9+C\ans{\dfrac{1}{3}(\sqrt{x^2+9})^3 - 9\sqrt{x^2+9} + C}

Case 3: x=asecθx= a \sec \theta

When the integral involves x2a2\sqrt{x^2-a^2}, let x=asecθx=a\sec \theta. Then dx=asecθtanθ dθdx = a \sec \theta \tan \theta\ d\theta and x2a2=a2sec2θa2=asec2θ1=atan2θ=atanθ\begin{aligned} \sqrt{x^2-a^2} &= \sqrt{a^2 \sec^2 \theta - a^2}\ &= a\sqrt{\sec^2 \theta - 1}\ &= a \sqrt{tan^2 \theta}\ &= a \tan \theta \end{aligned}

Evaluate x21x dx\displaystyle\int \dfrac{\sqrt{x^2-1}}{x}\ dx.

Solution

Since this fits the third case with a=1a=1, let x=secθx = \sec \theta. Thus dx=secθtanθ dθdx = \sec \theta \tan \theta\ d\theta and x21=tanθ.\sqrt{x^2-1} = \tan \theta.

Substitute: x21x dx=tanθsecθsecθtanθ dθ=tan2θ dθ\begin{aligned} \int \dfrac{\sqrt{x^2-1}}{x}\ dx &= \int \dfrac{\tan \theta}{\sec \theta} \cdot \sec \theta \tan \theta \ d\theta\ &= \int \tan^2 \theta \ d\theta \end{aligned}

To integrate this, replace tan2θ\tan^2 \theta with sec2θ1\sec^2 \theta - 1 and remember that sec2θ dθ=tanθ+C\int \sec^2 \theta \ d\theta = \tan \theta + C Thus x21x dx=tan2θ dθ=sec2θ1 dθ=tanθθ+C\begin{aligned} \int \dfrac{\sqrt{x^2-1}}{x}\ dx &= \int \tan^2 \theta \ d\theta\ &= \int \sec^2 \theta - 1\ d\theta\ &= \tan \theta - \theta + C \end{aligned}

Finally, look back at the beginning of the problem, and you'll find that tanθ=x21 and θ=sec1x\tan \theta = \sqrt{x^2-1} \textrm{ and } \theta = \sec^{-1} x so the final answer is x21x dx=x21sec1x+C\int \dfrac{\sqrt{x^2-1}}{x}\ dx = \ans{\sqrt{x^2-1} - \sec^{-1} x + C}

  1. x39x2 dx\displaystyle\int x^3 \sqrt{9-x^2}\ dx

  2. Let x=3sinθx=3 \sin \theta. Then dx=3cosθ dθdx=3\cos \theta \ d\theta and 9x2=3cosθ\sqrt{9-x^2} = 3\cos \theta. x39x2 dx=27sin3θ3cosθ3cosθ dθ=243sin3θcos2θ dθ=243sin2θcos2θsinθ dθ=243(1cos2θ)cos2θsinθ dθ\begin{aligned} \int x^3 \sqrt{9-x^2}\ dx &= \int 27 \sin^3 \theta \cdot 3 \cos \theta \cdot 3 \cos \theta \ d\theta\ &= \int 243 \sin^3 \theta \cos^2 \theta \ d\theta\ &= \int 243 \sin^2 \theta \cos^2 \theta \sin \theta \ d\theta\ &= \int 243 (1 - \cos^2 \theta) \cos^2 \theta \sin \theta \ d\theta \end{aligned} Then let u=cosθu=\cos \theta, so that du=sinθ dθ-du = \sin \theta\ d\theta. 243(1cos2θ)cos2θsinθ dθ=243(1u2)u2 du=243u2+243u4 du=81u3+2435u5+C=81cos3θ+2435cos5θ+C=3(9x2)3+15(9x2)5+C\begin{aligned} \int 243 (1 - \cos^2 \theta) \cos^2 \theta \sin \theta \ d\theta &= \int -243 (1-u^2) u^2 \ du\ &= \int -243u^2 + 243u^4 \ du\ &= -81u^3 + \dfrac{243}{5}u^5 + C\ &= -81\cos^3 \theta + \dfrac{243}{5}\cos^5 \theta + C\ &= \ans{-3(\sqrt{9-x^2})^3 + \dfrac{1}{5}(\sqrt{9-x^2})^5 + C} \end{aligned}

  3. x3x2+100 dx\displaystyle\int \dfrac{x^3}{\sqrt{x^2+100}}\ dx

  4. Let x=10tanθx=10 \tan \theta. Then dx=10sec2θ dθdx=10\sec^2 \theta \ d\theta and x2+100=10secθ\sqrt{x^2+100} = 10\sec \theta. x3x2+100 dx=1000tan3θ10secθ10sec2θ dθ=1000tan3θsecθ dθ=1000tan2θsecθtanθ dθ=1000(sec2θ1)secθtanθ dθ\begin{aligned} \int \dfrac{x^3}{\sqrt{x^2+100}}\ dx &= \int \dfrac{1000 \tan^3 \theta}{10 \sec \theta} \cdot 10\sec^2 \theta \ d\theta\ &= \int 1000 \tan^3 \theta \sec \theta \ d\theta\ &= \int 1000 \tan^2 \theta \sec \theta \tan \theta \ d\theta\ &= \int 1000 (\sec^2 \theta - 1) \sec \theta \tan \theta \ d\theta \end{aligned} Then let u=secθu=\sec \theta, so that du=secθtanθ dθdu = \sec \theta \tan \theta\ d\theta. 1000(sec2θ1)secθtanθ dθ=1000(u21) du=10003u31000u+C=10003sec3θ1000secθ+C=13(x2+100)3100x2+100+C\begin{aligned} \int 1000 (\sec^2 \theta - 1) \sec \theta \tan \theta \ d\theta &= \int 1000 (u^2-1) \ du\ &= \dfrac{1000}{3}u^3 - 1000u + C\ &= \dfrac{1000}{3}\sec^3 \theta - 1000 \sec \theta + C\ &= \ans{\dfrac{1}{3}(\sqrt{x^2+100})^3 - 100 \sqrt{x^2+100} + C} \end{aligned}

  5. x316x2 dx\displaystyle\int \dfrac{x^3}{\sqrt{16-x^2}}\ dx

  6. Let x=4sinθx=4 \sin \theta. Then dx=4cosθ dθdx=4\cos \theta \ d\theta and 16x2=4cosθ\sqrt{16-x^2} = 4\cos \theta. x316x2 dx=64sin3θ4cosθ4cosθ dθ=64sin3θ dθ=64sin2θsinθ dθ=64(1cos2θ)sinθ dθ\begin{aligned} \int \dfrac{x^3}{\sqrt{16-x^2}}\ dx &= \int \dfrac{64 \sin^3 \theta}{4 \cos \theta} \cdot 4 \cos \theta \ d\theta\ &= \int 64 \sin^3 \theta \ d\theta\ &= \int 64 \sin^2 \theta \sin \theta \ d\theta\ &= \int 64 (1 - \cos^2 \theta) \sin \theta \ d\theta \end{aligned} Then let u=cosθu=\cos \theta, so that du=sinθ dθ-du = \sin \theta\ d\theta. 64(1cos2θ)sinθ dθ=64(1u2) du=64+64u2 du=64u+643u3+C=64cosθ+643cos3θ+C=1616x2+13(16x2)3+C\begin{aligned} \int 64 (1 - \cos^2 \theta) \sin \theta \ d\theta &= \int -64 (1-u^2) \ du\ &= \int -64 + 64u^2 \ du\ &= -64u + \dfrac{64}{3}u^3 + C\ &= -64\cos \theta + \dfrac{64}{3}\cos^3 \theta + C\ &= \ans{-16\sqrt{16-x^2} + \dfrac{1}{3}(\sqrt{16-x^2})^3 + C} \end{aligned}

  7. xx2+4 dx\displaystyle\int x \sqrt{x^2+4}\ dx

  8. Let x=2tanθx=2 \tan \theta. Then dx=2sec2θ dθdx=2\sec^2 \theta \ d\theta and x2+4=2secθ\sqrt{x^2+4} = 2\sec \theta. xx2+4 dx=2tanθ2secθ2sec2θ dθ=8tanθsec3θ dθ=8sec2θsecθtanθ dθ\begin{aligned} \int x \sqrt{x^2+4}\ dx &= \int 2\tan \theta \cdot 2 \sec \theta \cdot 2 \sec^2 \theta \ d\theta\ &= \int 8 \tan \theta \sec^3 \theta \ d\theta\ &= \int 8 \sec^2 \theta \sec \theta \tan \theta \ d\theta\ \end{aligned} Then let u=secθu=\sec \theta, so that du=secθtanθ dθdu = \sec \theta \tan \theta\ d\theta. 8sec2θsecθtanθ dθ=8u2 du=83u3+C=83sec3θ+C=13(x2+4)3+C\begin{aligned} \int 8 \sec^2 \theta \sec \theta \tan \theta \ d\theta &= \int 8u^2 \ du\ &= \dfrac{8}{3}u^3 + C\ &= \dfrac{8}{3}\sec^3 \theta + C\ &= \ans{\dfrac{1}{3}(\sqrt{x^2+4})^3 + C} \end{aligned}