Trig Substitution

By using suitable substitutions, we can convert integrals involving sums or differences of $x^2$ and $a^2$, or of $u^2$ and $a^2$ when $u$ is a function of $x$,  into trig integrals.  Often these resulting integrals are easy, and if not you can use the methods of trig integrals to try and solve them. 

Trig substitution overview

  • For integrals involving $a^2 + x^2$, use the substitution $$x=a\tan(\theta),\qquad dx = a \sec^2(\theta)\,d\theta.$$
  • For integrals involving $a^2-x^2$, use the substitution $$x=a\sin(\theta),\qquad dx=a\cos(\theta)\, d\theta.$$
  • For integrals involving $x^2-a^2$, use the substitution $$x=a\sec(\theta),\qquad dx = a\sec(\theta)\tan(\theta)\,d\theta.$$
  • For integrals involving a quadratic expression that is not a sum of squares, "complete the square": $$x^2 + bx + c = (x+b/2)^2 + c-(b/2)^2$$ and then use the substitution $u=x+b$.

No matter which substitution we use, we end up with an integral involving $\theta$ and trig functions of $\theta$.  Understand that while you can always make a trig substitution, the resulting integral may or may not be possible to solve.  As is true with other techniques of integration, we try it and see if it works.  Here, works means after using the technique, we can evaluate the integral.  If the technique doesn't work, we try something else.

Example: Evaluate $\displaystyle\int {\sqrt{x^2+6x+10}}\, dx.$
Solution: We first complete the square to get $x^2+6x+10=(x+3)^2+1$ and then use the $u$-substitution $ u=x+3$ This gives us $\displaystyle\int{\sqrt{(x+3)^2+1}}\, dx= \int \sqrt{u^2+1}\,du   \overset{\fbox{$ \,\,u\,=\,\tan\theta,\\ du\,=\,\sec^2(\theta)\,d\theta$}\\}{=}  \int \left(\sqrt{\tan^2(\theta)+1}\right)\sec^2(\theta)\,d\theta =\int \sec^3(\theta)\,d\theta.$  We computed this integral in a previous example, using parts twice, getting $$\int \sec^3(\theta)\,d\theta= \frac{\sec(\theta)\tan(\theta) + \ln\lvert\sec(\theta)+\tan(\theta)\rvert}{2}+C,$$ so what we've left to do is to substitute back $u$ and then $x$. Notice that $\sec(\theta)=\sqrt{1+u^2}$, by using right triangles. All together, we have $$ \hspace{-3cm} \int {\sqrt{x^2+6x+10}}\, dx =\frac{\left(\sqrt{1+u^2}\right)u+ \ln\Bigl\lvert\left(\sqrt{1+u^2}\right)+u\Bigr\rvert}{2}+C$$$$\qquad\qquad =\frac{\left(\sqrt{1+(x+3)^2}\right)(x+3)+ \ln\Bigl\lvert\left(\sqrt{1+(x+3)^2}\right)+x+3\Bigr\rvert}{2}+C $$ If this had been a definite integral, you would now be able to evaluate it using your antiderivative.