In Section 5.2 we defined the definite integral as the “signed area under the curve.” In that section we had not yet learned the Fundamental Theorem of Calculus, so we evaluated special definite integrals which described nice, geometric shapes. For instance, we were able to evaluate
\begin{equation}
\int_{-3}^3\sqrt{9-x^2}\ dx = \frac{9\pi}{2}
\label{eq_trigsub1}\tag{6.4.1}
\end{equation}
as we recognized that \(f(x) = \sqrt{9-x^2}\) described the upper half of a circle with radius 3.
We have since learned a number of integration techniques, including Substitution and Integration by Parts, yet we are still unable to evaluate the above integral without resorting to a geometric interpretation. This section introduces Trigonometric Substitution, a method of integration that fills this gap in our integration skill. This technique works on the same principle as Substitution as found in Section 6.1, though it can feel “backward.” In Section 6.1, we set \(u=f(x)\text{,}\) for some function \(f\text{,}\) and replaced \(f(x)\) with \(u\text{.}\) In this section, we will set \(x=f(\theta)\text{,}\) where \(f\) is a trigonometric function, then replace \(x\) with \(f(\theta)\text{.}\)
We start by demonstrating this method in evaluating the integral in (6.4.1). After the example, we will generalize the method and give more examples.
Example6.4.1Using Trigonometric Substitution
Evaluate \(\ds \int_{-3}^3\sqrt{9-x^2}\ dx\text{.}\)
SolutionWe begin by noting that \(9\left(\sin^2(\theta) + \cos^2(\theta)\right) = 9\text{,}\) and hence \(9\cos^2(\theta) = 9-9\sin^2(\theta)\text{.}\) If we let \(x=3\sin(\theta)\text{,}\) then \(9-x^2 = 9-9\sin^2(\theta) = 9\cos^2(\theta)\text{.}\)
Setting \(x=3\sin(\theta)\) gives \(dx = 3\cos(\theta) \ d\theta\text{.}\) We are almost ready to substitute. We also wish to change our bounds of integration. The bound \(x=-3\) corresponds to \(\theta = -\pi/2\) (for when \(\theta = -\pi/2\text{,}\) \(x=3\sin(\theta) = -3\)). Likewise, the bound of \(x=3\) is replaced by the bound \(\theta = \pi/2\text{.}\) Thus
\begin{align*}
\int_{-3}^3\sqrt{9-x^2}\ dx \amp = \int_{-\pi/2}^{\pi/2} \sqrt{9-9\sin^2(\theta) }\ (3\cos(\theta) )\ d\theta\\
\amp = \int_{-\pi/2}^{\pi/2} 3\sqrt{9\cos^2(\theta) } \cos(\theta) \ d\theta\\
\amp =\int_{-\pi/2}^{\pi/2} 3\abs{3\cos(\theta) } \cos(\theta) \ d\theta.\\
\end{align*}
On \([-\pi/2,\pi/2]\text{,}\) \(\cos(\theta)\) is always positive, so we can drop the absolute value bars, then employ a power--reducing formula:
\begin{align*}
\amp = \int_{-\pi/2}^{\pi/2} 9\cos^2(\theta) \ d\theta\\
\amp = \int_{-\pi/2}^{\pi/2} \frac{9}{2}\big(1+\cos(2\theta)\big)\ d\theta\\
\amp = \frac92 \big(\theta +\frac12\sin(2\theta)\big)\Bigg|_{-\pi/2}^{\pi/2}\\
\amp = \frac92\pi\text{.}
\end{align*}
This matches our answer from before.
We now describe in detail Trigonometric Substitution. This method excels when dealing with integrands that contain \(\sqrt{a^2-x^2}\text{,}\) \(\sqrt{x^2-a^2}\) and \(\sqrt{x^2+a^2}\text{.}\) The following Key Idea outlines the procedure for each case, followed by more examples. Each right triangle acts as a reference to help us understand the relationships between \(x\) and \(\theta\text{.}\)
We will now apply Key Idea 3 to a type of problem that we were able to solve using algebra and substitution in Section 6.1. Example 6.4.3 shows an alternate way to approach these problems.
Example6.4.3Using Trigonometric Substitution
Evaluate \(\ds \int \frac{1}{\sqrt{x^2-4}}\ dx\text{.}\)
SolutionUsing Item 3 from Key Idea 6.4.2, we recognize \(a=2\) and set \(x= 2\sec(\theta)\) for \(0 \leq \theta \lt \pi/2\text{.}\) This makes \(dx = 2\sec(\theta)\tan(\theta) \ d\theta\text{.}\) We will use the Pythagorean identity \(\tan^2(\theta)=\sec^2(\theta)-1\) and the fact that \(\tan(\theta)\geq 0\) on the interval. Substituting, we have:
\begin{align*}
\int \frac{1}{\sqrt{x^2-4}}\ dx \amp = \int \frac{1}{\sqrt{4\sec^2(\theta)-4}}\cdot 2 \sec(\theta)\tan(\theta)\ d\theta\\
\amp = 2\int \frac{1}{\sqrt{4(\sec^2(\theta)-1)}}\cdot \sec(\theta)\tan(\theta)\ d\theta\\
\amp = 2\int \frac{1}{\sqrt{4(\tan^2(\theta)}}\cdot\sec(\theta)\tan(\theta)\ d\theta\\
\amp = 2\int \frac{1}{2\abs{\tan(\theta)}}\sec(\theta)\tan(\theta)\ d\theta\\
\amp = \int \sec(\theta)\ d\theta\\
\amp =\ln \abs{\sec(\theta)+\tan(\theta)}
\end{align*}
However, our original integral involved \(x\text{.}\)
Example6.4.4Using Trigonometric Substitution
Evaluate \(\ds \int \frac{1}{\sqrt{5+x^2}}\ dx\text{.}\)
SolutionUsing Item 2Key Idea 6.4.2, we recognize \(a=\sqrt{5}\) and set \(x= \sqrt{5}\tan(\theta)\text{.}\) This makes \(dx = \sqrt{5}\sec^2(\theta) \ d\theta\text{.}\) We will use the fact that \(\sqrt{5+x^2} = \sqrt{5+5\tan^2(\theta) } = \sqrt{5\sec^2(\theta) } = \sqrt{5}\sec(\theta)\text{.}\) Substituting, we have:
\begin{align*}
\int \frac{1}{\sqrt{5+x^2}}\ dx \amp = \int \frac{1}{\sqrt{5+5\tan^2(\theta) }}\sqrt{5}\sec^2(\theta) \ d\theta\\
\amp = \int \frac{\sqrt{5}\sec^2(\theta) }{\sqrt{5}\sec(\theta) } \ d\theta\\
\amp = \int \sec(\theta) \ d\theta\\
\amp = \ln\abs{\sec(\theta) +\tan(\theta) }+C.
\end{align*}
While the integration steps are over, we are not yet done. The original problem was stated in terms of \(x\text{,}\) whereas our answer is given in terms of \(\theta\text{.}\) We must convert back to \(x\text{.}\)
The reference triangle given in Key Idea 6.4.2(b) helps. With \(x=\sqrt{5}\tan(\theta)\text{,}\) we have
\begin{equation*}
\tan(\theta) = \frac x{\sqrt{5}} \text{ and } \sec(\theta) = \frac{\sqrt{x^2+5}}{\sqrt{5}}.
\end{equation*}
This gives
\begin{align*}
\int \frac{1}{\sqrt{5+x^2}}\ dx \amp = \ln\abs{\sec(\theta) +\tan(\theta) }+C\\
\amp = \ln\abs{\frac{\sqrt{x^2+5}}{\sqrt{5}}+ \frac x{\sqrt{5}}}+C.
\end{align*}
We can leave this answer as is, or we can use a logarithmic identity to simplify it. Note:
\begin{align*}
\ln\abs{\frac{\sqrt{x^2+5}}{\sqrt{5}}+ \frac x{\sqrt{5}}}+C \amp = \ln\abs{\frac{1}{\sqrt{5}}\big(\sqrt{x^2+5}+ x\big)}+C\\
\amp = \ln\abs{\frac{1}{\sqrt{5}}} + \ln\abs{\sqrt{x^2+5}+ x}+C\\
\amp = \ln\abs{\sqrt{x^2+5}+ x}+C,
\end{align*}
where the \(\ln\big(1/\sqrt{5}\big)\) term is absorbed into the constant \(C\text{.}\) (In Section 6.6 we will learn another way of approaching this problem.)
Example6.4.5Using Trigonometric Substitution
Evaluate \(\ds \int \sqrt{4x^2-1}\ dx\text{.}\)
SolutionWe start by rewriting the integrand so that it looks like \(\sqrt{x^2-a^2}\) for some value of \(a\text{:}\)
\begin{align*}
\sqrt{4x^2-1} \amp = \sqrt{4\left(x^2-\frac14\right)}\\
\amp = 2\sqrt{x^2-\left(\frac12\right)^2}.
\end{align*}
So we have \(a=1/2\text{,}\) and following Key Idea 6.4.2(c), we set \(x= \frac12\sec(\theta)\text{,}\) and hence \(dx = \frac12\sec(\theta) \tan(\theta) \ d\theta\text{.}\) We now rewrite the integral with these substitutions:
\begin{align*}
\int \sqrt{4x^2-1}\ dx \amp = \int 2\sqrt{x^2-\left(\frac12\right)^2}\ dx\\
\amp = \int 2\sqrt{\frac14\sec^2(\theta) - \frac14}\left(\frac12\sec(\theta) \tan(\theta) \right)\ d\theta\\
\amp =\int \sqrt{\frac14(\sec^2(\theta) -1)}\Big(\sec(\theta) \tan(\theta) \Big)\ d\theta\\
\amp =\int\sqrt{\frac14\tan^2(\theta) }\Big(\sec(\theta) \tan(\theta) \Big)\ d\theta\\
\amp =\int \frac12\tan^2(\theta) \sec(\theta) \ d\theta\\
\amp =\frac12\int \Big(\sec^2(\theta) -1\Big)\sec(\theta) \ d\theta\\
\amp =\frac12\int \big(\sec^3(\theta) - \sec(\theta) \big)\ d\theta.
\end{align*}
We integrated \(\sec^3(\theta)\) in Example 6.3.10, finding its antiderivatives to be
\begin{equation*}
\int \sec^3(\theta) \ d\theta = \frac12\Big(\sec(\theta) \tan(\theta) + \ln\abs{\sec(\theta) +\tan(\theta) }\Big)+C.
\end{equation*}
Thus
\begin{align*}
\int \sqrt{4x^2-1}\ dx \amp =\frac12\int \big(\sec^3(\theta) - \sec(\theta) \big)\ d\theta\\
\amp = \frac12\left(\frac12\Big(\sec(\theta) \tan(\theta) + \ln\abs{\sec(\theta) +\tan(\theta) }\Big) -\ln\abs{\sec(\theta) + \tan(\theta) }\right) + C\\
\amp = \frac14\left(\sec(\theta) \tan(\theta) -\ln\abs{\sec(\theta) +\tan(\theta) }\right)+C.
\end{align*}
We are not yet done. Our original integral is given in terms of \(x\text{,}\) whereas our final answer, as given, is in terms of \(\theta\text{.}\) We need to rewrite our answer in terms of \(x\text{.}\) With \(a=1/2\text{,}\) and \(x=\frac12\sec(\theta)\text{,}\) the reference triangle in Key Idea 6.4.2(c) shows that
\begin{equation*}
\tan(\theta) = \sqrt{x^2-1/4}\Big/(1/2) = 2\sqrt{x^2-1/4} \text{ and } \sec(\theta) = 2x.
\end{equation*}
Thus
\begin{align*}
\frac14\Big(\sec(\theta) \tan(\theta) -\ln\abs{\sec(\theta) +\tan(\theta) }\Big)+C \amp =
\frac14\Big(2x\cdot 2\sqrt{x^2-1/4} - \ln\abs{2x + 2\sqrt{x^2-1/4}}\Big)+C\\
\amp = \frac14\Big(4x\sqrt{x^2-1/4} - \ln\abs{2x + 2\sqrt{x^2-1/4}}\Big)+C.
\end{align*}
The final answer is given in the last line above, repeated here:
\begin{equation*}
\int \sqrt{4x^2-1}\ dx = \frac14\Big(4x\sqrt{x^2-1/4} - \ln\abs{2x + 2\sqrt{x^2-1/4}}\Big)+C.
\end{equation*}
Example6.4.6Using Trigonometric Substitution
Evaluate \(\ds \int \frac{\sqrt{4-x^2}}{x^2}\ dx\text{.}\)
SolutionWe use Key Idea 6.4.2(a) with \(a=2\text{,}\) \(x=2\sin(\theta)\text{,}\) \(dx = 2\cos(\theta)\) and hence \(\sqrt{4-x^2} = 2\cos(\theta)\text{.}\) This gives
\begin{align*}
\int \frac{\sqrt{4-x^2}}{x^2}\ dx \amp = \int \frac{2\cos(\theta) }{4\sin^2(\theta) }(2\cos(\theta) )\ d\theta\\
\amp = \int \cot^2(\theta) \ d\theta\\
\amp = \int (\csc^2(\theta) -1)\ d\theta\\
\amp = -\cot(\theta) -\theta + C.
\end{align*}
We need to rewrite our answer in terms of \(x\text{.}\) Using the reference triangle found in Key Idea 6.4.2(a), we have \(\cot(\theta) = \sqrt{4-x^2}/x\) and \(\theta = \sin^{-1}(x/2)\text{.}\) Thus
\begin{equation*}
\int \frac{\sqrt{4-x^2}}{x^2}\ dx = -\frac{\sqrt{4-x^2}}x-\sin^{-1}\left(\frac x2\right) + C.
\end{equation*}
Trigonometric Substitution can be applied in many situations, even those not of the form \(\sqrt{a^2-x^2}\text{,}\) \(\sqrt{x^2-a^2}\) or \(\sqrt{x^2+a^2}\text{.}\) In the following example, we apply it to an integral we already know how to handle.
Example6.4.7Using Trigonometric Substitution
Evaluate \(\ds \int\frac1{x^2+1}\ dx\text{.}\)
SolutionWe know the answer already as \(\tan^{-1}(x) +C\text{.}\) We apply Trigonometric Substitution here to show that we get the same answer without inherently relying on knowledge of the derivative of the arctangent function.
Using Key Idea 6.4.2(b), let \(x=\tan(\theta)\text{,}\) \(dx=\sec^2(\theta) \ d\theta\) and note that \(x^2+1 = \tan^2(\theta) +1 = \sec^2(\theta)\text{.}\) Thus
\begin{align*}
\int \frac1{x^2+1}\ dx \amp = \int \frac{1}{\sec^2(\theta) }\sec^2(\theta) \ d\theta\\
\amp = \int 1\ d\theta\\
\amp = \theta + C.
\end{align*}
Since \(x=\tan(\theta)\text{,}\) \(\theta = \tan^{-1}(x)\text{,}\) and we conclude that \(\ds \int\frac1{x^2+1}\ dx = \tan^{-1}(x) +C\text{.}\)
The next example is similar to the previous one in that it does not involve a square–root. It shows how several techniques and identities can be combined to obtain a solution.
Example6.4.8Using Trigonometric Substitution
Evaluate \(\ds\int\frac1{(x^2+6x+10)^2}\ dx\text{.}\)
SolutionWe start by completing the square, then make the substitution \(u=x+3\text{,}\) followed by the trigonometric substitution of \(u=\tan(\theta)\text{:}\)
\begin{align*}
\int \frac1{(x^2+6x+10)^2}\ dx =\int \frac1{\big((x+3)^2+1\big)^2}\ dx\amp = \int \frac1{(u^2+1)^2}\ du.\\
\end{align*}
Now make the substitution \(u=\tan(\theta)\text{,}\) \(du=\sec^2(\theta) \ d\theta\text{:}\)
\begin{align*}
\amp = \int \frac1{(\tan^2(\theta) +1)^2}\sec^2(\theta) \ d\theta\\
\amp = \int\frac 1{(\sec^2(\theta) )^2}\sec^2(\theta) \ d\theta\\
\amp = \int \cos^2(\theta) \ d\theta.\\
\end{align*}
Applying a power reducing formula, we have
\begin{align*}
\amp = \int \left(\frac12 +\frac12\cos(2\theta)\right)\ d\theta\\
\amp = \frac12\theta + \frac14\sin(2\theta) + C.
\end{align*}
We need to return to the variable \(x\text{.}\) As \(u=\tan(\theta)\text{,}\) \(\theta = \tan^{-1}(u)\text{.}\) Using the identity \(\sin(2\theta) = 2\sin(\theta) \cos(\theta)\) and using the reference triangle found in Key Idea 6.4.2(b), we have
\begin{equation*}
\frac14\sin(2\theta) = \frac12\frac u{\sqrt{u^2+1}}\cdot\frac 1{\sqrt{u^2+1}} = \frac12\frac u{u^2+1}.
\end{equation*}
Finally, we return to \(x\) with the substitution \(u=x+3\text{.}\) We start with the expression in Equation <<Unresolved xref, reference "eq_extrigsub7"; check spelling or use "provisional" attribute>>:
\begin{align*}
\frac12\theta + \frac14\sin(2\theta) + C \amp = \frac12\tan^{-1}(u) + \frac12\frac{u}{u^2+1}+C\\
\amp = \frac12\tan^{-1}(x+3) + \frac{x+3}{2(x^2+6x+10)}+C.
\end{align*}
Stating our final result in one line,
\begin{equation*}
\int\frac1{(x^2+6x+10)^2}\ dx=\frac12\tan^{-1}(x+3) + \frac{x+3}{2(x^2+6x+10)}+C.
\end{equation*}
Our last example returns us to definite integrals, as seen in our first example. Given a definite integral that can be evaluated using Trigonometric Substitution, we could first evaluate the corresponding indefinite integral (by changing from an integral in terms of \(x\) to one in terms of \(\theta\text{,}\) then converting back to \(x\)) and then evaluate using the original bounds. It is much more straightforward, though, to change the bounds as we substitute.
Example6.4.9Definite integration and Trigonometric Substitution
Evaluate \(\ds\int_0^5\frac{x^2}{\sqrt{x^2+25}}\ dx\text{.}\)
SolutionUsing Key Idea 6.4.2(b), we set \(x=5\tan(\theta)\text{,}\) \(dx = 5\sec^2(\theta) \ d\theta\text{,}\) and note that \(\sqrt{x^2+25} = 5\sec(\theta)\text{.}\) As we substitute, we can also change the bounds of integration.
The lower bound of the original integral is \(x=0\text{.}\) As \(x=5\tan(\theta)\text{,}\) we solve for \(\theta\) and find \(\theta = \tan^{-1}(x/5)\text{.}\) Thus the new lower bound is \(\theta = \tan^{-1}(0) = 0\text{.}\) The original upper bound is \(x=5\text{,}\) thus the new upper bound is \(\theta = \tan^{-1}(5/5) = \pi/4\text{.}\)
Thus we have
\begin{align*}
\int_0^5\frac{x^2}{\sqrt{x^2+25}}\ dx \amp = \int_0^{\pi/4} \frac{25\tan^2(\theta) }{5\sec(\theta) }5\sec^2(\theta) \ d\theta\\
\amp = 25\int_0^{\pi/4} \tan^2(\theta) \sec(\theta) \ d\theta.
\end{align*}
We encountered this indefinite integral in Example 6.4.5 where we found
\begin{equation*}
\int \tan^2(\theta) \sec(\theta) \ d\theta = \frac12\big(\sec(\theta) \tan(\theta) -\ln\abs{\sec(\theta) +\tan(\theta) }\big).
\end{equation*}
So
\begin{align*}
25\int_0^{\pi/4} \tan^2(\theta) \sec(\theta) \ d\theta \amp = \frac{25}2\big(\sec(\theta) \tan(\theta) -\ln\abs{\sec(\theta) +\tan(\theta) }\big)\Bigg|_0^{\pi/4}\\
\amp = \frac{25}2\big(\sqrt2-\ln(\sqrt2+1)\big)\\
\amp \approx 6.661.
\end{align*}
The following equalities are very useful when evaluating integrals using Trigonometric Substitution.
The next section introduces Partial Fraction Decomposition, which is an algebraic technique that turns “complicated” fractions into sums of “simpler” fractions, making integration easier.