Skip to main content

Section 7.3 Trigonometric Substitution

In this section, we will learn another substitution method to evaluate integrals, called the Trigonometric Substitution.

Investigation 7.3.1.

Let’s do a quick review on right triangles and basic trigonometry. There are three right triangles below. We know about a non-right angle \(\theta\) and two sides, \(x\) and \(a\text{.}\) Your task is to
  • find the missing side of the right triangle, and
  • set up a trigonometric ratio using \(\theta\text{,}\) \(x\text{,}\) and \(a\text{.}\)

(a)

Figure 7.3.1. Right Triangle Case I
Solution.
Observe that the missing side is \(\sqrt{a^2 - x^2}\) and \(\sin(\theta) = \dfrac{x}{a}\text{.}\)

(b)

Figure 7.3.2. Right Triangle Case II
Solution.
Observe that the missing side is \(\sqrt{a^2 + x^2}\) and \(\tan(\theta) = \dfrac{x}{a}\text{.}\)

(c)

Figure 7.3.3. Right Triangle Case III
Solution.
Observe that the missing side is \(\sqrt{x^2 - a^2}\) and \(\sec(\theta) = \dfrac{x}{a}\text{.}\)
You may be wondering what all of them have to do with integrals... These three right triangles are the three base cases of trigonometric substitution.
Trigonometric substitution (or trig sub for short), means we are making substitutions using trigonometric functions. Recall a goal of the substitution method back in section 5.7 when we learned the \(u\)-sub is to make the integral easier. An advantage of trig sub here is that we can convert an un-simplified-able expression to a trigonometric expression, and we can manipulate it using trigonometric identities.

Subsection Integrals Involving \(\boldsymbol{a^2 - x^2}\)

When you see an "\(a^2 - x^2\)" in the integral, you may be able to solve it using a trig sub. The \(a^2 - x^2\) should remind you of the first right triangle in the investigation task because the missing side of the triangle is \(\sqrt{a^2 - x^2}\text{.}\)

Example 7.3.4.

Evaluate the indefinite integral \(\displaystyle \int \frac{x^2\, dx}{\sqrt{9 - x^2}}\)
Hint.
Observe that we can’t simplify the integrand here, and there is no integral formulas we learned before that has a similar form of the integrand (not even the formulas involving inverse trig functions).
You can try making a \(u\)-sub, but Richard can tell you right now that there is no choice of \(u\) that will work out.
You may also be considering using integration by parts. But this involves turning the fraction into a product and it seems complicated to work out all the \(u\)’s and \(v\)’s... You can for sure give it a go but Richard has a feeling that this will be complicated...
Hmm... but is there an easier way to tackle this problem...
Richard is again come to your rescue! He is going to make a suggestion! Let’s try this substitution to let \(x = 3\sin(\theta)\text{.}\) What does the integral look like after we fully substitute all the \(x\)’s with the \(\theta\)’s?
Solution.
Let’s follow Richard’s hint and make the substitution that \(x = 3\sin(\theta)\text{.}\) Then this will imply that \(x^2 = 9\sin^2(\theta)\) and
\begin{align*} \sqrt{9 - x^2} \amp= \sqrt{9 - 9\sin^2(\theta)} \\ \amp= \sqrt{9\left(1 - \sin^2(\theta\right))} \\ \amp= \sqrt{9\cos^2(\theta)}\amp\amp \text{by the Pythagorean Identity} \\ \amp= 3\cos(\theta) \end{align*}
Remember we also want to convert the \(dx\) to something with a \(d\theta\text{.}\) Observe that
\begin{equation*} \frac{dx}{d\theta} = 3\cos(\theta) \qquad\implies\qquad dx = 3\cos(\theta)\, d\theta \end{equation*}
Now it looks like all the \(x\)’s have been converted to \(\theta\)’s. Let’s plug them back into the integral and see whether the integral will become easier.
\begin{equation*} \int \frac{x^2\, dx}{\sqrt{9 - x^2}} = \int \frac{9\sin^2(\theta)\cdot 3\cos(\theta)\, d\theta}{3\cos(\theta)} = 9\int \sin^2(\theta)\, d\theta \end{equation*}
Observe how much easier-looking the integral became after this substitution! We no longer have fractions and square roots! All we had here is a \(\sin^2(\theta)\text{.}\)
You can actually find a formula to evaluate \(\int \sin^2(\theta)\, d\theta\) in SectionΒ 7.2 (more specifically, in SubsectionΒ ).
Now using the formula, we have
\begin{align*} \int \frac{x^2\, dx}{\sqrt{9 - x^2}} \amp= 9\int \sin^2(\theta)\, d\theta \\ \amp= 9\left(\frac{\theta}{2} - \frac{\sin(2\theta)}{4}\right) + C \\ \amp= \frac{9\theta}{2} - \frac{9\sin(2\theta)}{4} + C \end{align*}
The last step here is to plug back whatever \(\theta\) is in terms of \(x\text{.}\) There are actually a trivial way and a technical way to do so.
Trivial Way: Recall the substitution we made is \(x = 3\sin(\theta)\text{.}\) Isolating \(\theta\) will give us \(\theta = \sin^{-1}\left(\frac{x}{3}\right)\text{.}\) Hence, we can plug in the \(\sin^{-1}\left(\frac{x}{3}\right)\) for \(\theta\text{.}\)
\begin{equation*} \frac{9\theta}{2} - \frac{9\sin(2\theta)}{4} + C = \frac{9\sin^{-1}\left(\frac{x}{3}\right)}{2} - \frac{9\sin\left(2\cdot \sin^{-1}\left(\frac{x}{3}\right)\right)}{4} + C \end{equation*}
But look at how messy the answer is... You can for sure simplify this scary-looking answer using the technical way.
P.S.: If all you care about is to obtain a correct answer, however messy it is, put it to Edfinity, and move on, Richard is 80% sure that Edfinity will recognize answers like this if it is correct.
Technical Way: We know \(\theta = \sin^{-1}\left(\frac{x}{3}\right)\text{.}\) There is no way to make it easier. But we can do something fun to plug things in for the \(\sin(2\theta)\text{!}\) By the double angle identity, we know that \(\sin(2\theta) = 2\sin(\theta)\cos(\theta)\text{,}\) and \(\sin(\theta) = \frac{x}{3}\) based on the substitution we made. Then what is \(\cos(\theta)\) in our substitution?
This is a classical MTH 112Z problem to find the cosine value given the sine value. An easier way is to literally draw a right triangle that looks like the first right triangle in the investigation task and figure out the cosine value, as the figure below shows.
Figure 7.3.5. A right triangle with \(\sin(\theta) = \frac{x}{3}\)
Observe that \(\cos(\theta) = \frac{\sqrt{9 - x^3}}{3}\text{.}\) This implies that
\begin{equation*} \sin(2\theta) = 2\sin(\theta)\cos(\theta) = 2\cdot \frac{x}{3}\cdot \frac{\sqrt{9 - x^2}}{3} \end{equation*}
Now plugging in this back to the antiderivative, we have
\begin{align*} \frac{9\theta}{2} - \frac{9\sin(2\theta)}{4} + C \amp= \frac{9\sin^{-1}\left(\frac{x}{3}\right)}{2} - \frac{9}{4}\cdot 2\cdot \frac{x}{3}\cdot \frac{\sqrt{9 - x^2}}{3} + C \\ \amp= \frac{9}{2}\sin^{-1}\left(\frac{x}{3}\right) - \frac{1}{2}x\sqrt{9 - x^2} + C \end{align*}
This answer is the simplified answer.
That was a long example, but it captures the essence of the first case of the trig sub.
If \(a^2 - x^2\) is in the integral, then try the substitution \(x = a\sin(\theta)\text{.}\) Then
\begin{align*} a^2 - x^2 \amp= a^2 - \left(a\sin(\theta)\right)^2 \\ \amp= a^2 - a^2 \sin^2(\theta) \\ \amp= a^2 \left(1 - \sin^2(\theta)\right) \\ \amp= a^2\cos^2(\theta) \end{align*}
and
\begin{equation*} \frac{dx}{d\theta} = a\cos(\theta) \qquad\implies\qquad dx = a\cos(\theta)\, d\theta \end{equation*}
Then we can deal with a (usually) simpler trigonometric integral. Observe that the trigonometric identity that allows us to simplify stuff is
\begin{equation*} \sin^2(\theta) + \cos^2(\theta) = 1 \end{equation*}
For strategies to deal with a trigonometric integral, feel free to consult SectionΒ 7.2.
If you are reading our textbook, this case is labeled as "integrals involving \(\sqrt{a^2 - x^2}\)". The reason why your textbook throw in the square root is because dealing with powers of sine (and cosine) isn’t quite easy. But this will have no impact on the determination of using trig sub itself. So the square root may make the trigonometric integral easier after the trig sub, but the trig sub will work without the square root.
Let’s look at an example of the definite integrals using a trig sub. Recall back in section 5.7 that we need to adjust the limits of integration when doing a \(u\)-sub since we changed the variable. Similarly, trig sub is essentially a substitution method in the sense that we use a new variable \(\theta\text{.}\) So make sure you adjust the limits of integration when doing a trig sub!

Example 7.3.6.

Evaluate the definite integral \(\displaystyle \int_\frac{1}{2}^1 \frac{\sqrt{1 - x^2}}{x^2}\, dx\)
Hint.
Observe that the integral contain \(1 - x^2\text{,}\) which takes the form of \(a^2 - x^2\text{,}\) where \(a = 1\text{.}\) Then what trig sub should we do here?
In addition, this in a definite integral. Given that we are essentially changing the variable from \(x\) to \(\theta\text{,}\) we will need to adjust the limits of integration!
Solution.
Let \(x = \sin(\theta)\text{.}\) Then we know that \(x^2 = \sin^2(\theta)\text{,}\)
\begin{equation*} \sqrt{1 - x^2} = \sqrt{1 - \sin^2(\theta)} = \sqrt{\cos^2(\theta)} = \cos(\theta) \end{equation*}
and
\begin{equation*} \frac{dx}{d\theta} = \cos(x) \qquad\implies\qquad dx = \cos(x)\, d\theta \end{equation*}
Remember we also need to adjust the limits of integration!!
  • When \(x = 1\text{,}\) then \(1 = \sin(\theta)\text{,}\) which implies that \(\theta = \sin^{-1}(1) = \dfrac{\pi}{2}\text{;}\)
  • When \(x = \dfrac{1}{2}\text{,}\) then \(\dfrac{1}{2} = \sin(\theta)\text{,}\) which implies that \(\theta = \sin^{-1}\left(\dfrac{1}{2}\right) = \dfrac{\pi}{6}\text{.}\)
Now let’s plug everything back to the integral and see if the integral becomes easier.
\begin{align*} \int_\frac{1}{2}^1 \frac{\sqrt{1 - x^2}}{x^2}\, dx \amp= \int_\frac{\pi}{6}^\frac{\pi}{2} \frac{\cos(\theta)}{\sin^2(\theta)}\cdot \cos(\theta)\, d\theta \\ \amp= \int_\frac{\pi}{6}^\frac{\pi}{2} \frac{\cos^2(\theta)}{\sin^2(\theta)}\, d\theta \\ \amp= \int_\frac{\pi}{6}^\frac{\pi}{2} \cot^2(\theta)\, d\theta \end{align*}
Observe that this trig integral does look easier than what we started. SectionΒ 7.2 is the section about integrating trig integrals so you may be able to find some clues there to evaluate this integral. It turns out that one of the integral formulas we learned back in SectionΒ 5.3 when we un-did the derivative formulas in calculus 1 is useful (see TheoremΒ 5.3.15).
\begin{align*} \int_\frac{\pi}{6}^\frac{\pi}{2} \cot^2(\theta)\, d\theta \amp = \int_\frac{\pi}{6}^\frac{\pi}{2} \left(\csc^2(\theta) - 1\right)\, d\theta \amp\amp \text{by the Pythagorean Identity} \\ \amp= \left(-\cot(\theta) - \theta\right)\bigg|_{\theta = \frac{\pi}{6}}^\frac{\pi}{2} \\ \amp= \left(-\cot\left(\frac{\pi}{2}\right) - \frac{\pi}{2}\right) - \left(-\cot\left(\frac{\pi}{6}\right) - \frac{\pi}{6}\right) \\ \amp= - \frac{\pi}{2} + \sqrt{3} + \frac{\pi}{6} \\ \amp\approx 0.684853256372 \end{align*}

Subsection Integrals Involving \(\boldsymbol{a^2 + x^2}\)

When you see an "\(a^2 + x^2\)" in the integral, you may also be able to solve it using a trig sub. The \(a^2 + x^2\) should remind you of the second right triangle in the investigation task because the missing side of the triangle is \(\sqrt{a^2 + x^2}\text{.}\)

Example 7.3.7.

Evaluate the indefinite integral \(\displaystyle \int \frac{dx}{x^2\sqrt{4 + x^2}}\)
Hint.
Similarly, there is no way to simplify this integral. Also, \(u\)-sub and integration by parts won’t work either.
Richard is feeling generous and he is providing another suggestion! Let’s try the substitution to let \(x = 2\tan(\theta)\text{.}\) Does the integral become easier-looking after we fully substitute all the \(x\)’s with the \(\theta\)’s?
Solution.
Let’s again follow Richard’s hint and make the substitution that \(x = 2\tan(\theta)\text{.}\) Then this implies that \(x^2 = 4\tan^2(\theta)\) and
\begin{align*} \sqrt{4 + x^2} \amp= \sqrt{4 + 4\tan^2(\theta)} \\ \amp= \sqrt{4\left(1 + \tan^2(\theta)\right)} \\ \amp= \sqrt{4\sec^2(\theta)} \amp\amp\text{by the Pythagorean Identity} \\ \amp= 2\sec(\theta) \end{align*}
Remember we also want to convert the \(dx\) to something with a \(d\theta\text{.}\) Observe that
\begin{equation*} \frac{dx}{d\theta} = 2\sec^2(\theta) \qquad\implies\qquad dx = 2\sec^2(\theta)\, d\theta \end{equation*}
Now it looks like all the \(x\)’s have been converted to \(\theta\)’s. Let’s plug them back into the integral and see whether the integral will become easier.
\begin{equation*} \int \frac{dx}{x^2\sqrt{4 + x^2}} = \int \frac{2\sec^2(\theta)\, d\theta}{4\tan^2(\theta)\cdot 2\sec(\theta)} = \frac{1}{4}\int \frac{\sec(\theta)}{\tan^2(\theta)}\, d\theta \end{equation*}
Hmm... it seems like the integral still looks complicated. But a good thing with trig is that we can convert everything into sine and cosine!
\begin{equation*} \frac{1}{4}\int \frac{\sec(\theta)}{\tan^2(\theta)}\, d\theta = \frac{1}{4}\int \frac{\frac{1}{\cos(\theta)}}{\frac{\sin^2(\theta)}{\cos^2(\theta)}}\, d\theta = \frac{1}{4}\int \frac{\cos(\theta)}{\sin^2(\theta)}\, d\theta \end{equation*}
Now this integral is definitely u-sub-able! The strategy is similar to the integral of tangent and cotangent in SectionΒ 7.2 (more specifically, in SubsectionΒ ).
Let \(u = \sin(\theta)\text{.}\) Then \(du = \cos(\theta)\, d\theta\text{.}\) This implies that
\begin{align*} \frac{1}{4}\int \frac{\cos(\theta)}{\sin^2(\theta)}\, d\theta \amp= \frac{1}{4}\frac{du}{u^2} \\ \amp= \frac{1}{4}\int u^{-2}\, du \\ \amp= -\frac{1}{4}\cdot \frac{1}{u} + C \\ \amp= -\frac{1}{4}\cdot \frac{1}{\sin(\theta)} \\ \amp= -\frac{1}{4}\csc(\theta) + C \end{align*}
Now that we found the antiderivative, we will need to plug back whatever \(\theta\) is in terms of \(x\text{.}\) Again, there is the trivial way and the technical way to do so (and this is really about simplification so we don’t end up getting an inverse trig function inside a trig function).
Trivial Way: Recall the substitution we made is \(x = 2\tan(\theta)\text{.}\) Isolating \(\theta\) will give us \(\theta = \tan^{-1}\left(\frac{x}{2}\right)\text{.}\) Hence, we can plug in the \(\tan^{-1}\left(\frac{x}{2}\right)\) for \(\theta\text{.}\)
\begin{equation*} -\frac{1}{4}\csc(\theta) + C = -\frac{1}{4}\csc\left(\tan^{-1}\left(\frac{x}{2}\right)\right) + C \end{equation*}
But the answer is really messy mainly because there is an inverse trig function inside a trig function. It seems like we may be able to simplify the answer.
Technical Way: We can do the same trick of constructing a right triangle (the right triangle should look like the second right triangle in the investigation task) and figure out what the \(\csc(\theta)\) value is, as the figure below shows.
Figure 7.3.8. A right triangle with \(\tan(\theta) = \frac{x}{2}\)
Observe that \(\csc(\theta) = \frac{\sqrt{4 + x^2}}{x}\text{.}\) Now plugging this back to the antiderivative, we have
\begin{align*} -\frac{1}{4}\csc(\theta) + C \amp= -\frac{1}{4}\cdot \frac{\sqrt{4 + x^2}}{x} + C \end{align*}
This was also a long example, but it again captures the essence of the second case of the trig sub.
If \(a^2 + x^2\) is in the integral, then try the substitution \(x = a\tan(\theta)\text{.}\) Then
\begin{align*} a^2 + x^2 \amp= a^2 + \left(a\tan(\theta)\right)^2 \\ \amp= a^2 + a^2 \tan^2(\theta) \\ \amp= a^2 \left(1 + \tan^2(\theta)\right) \\ \amp= a^2\sec^2(\theta) \end{align*}
and
\begin{equation*} \frac{dx}{d\theta} = a\sec^2(\theta) \qquad\implies\qquad dx = a\sec^2(\theta)\, d\theta \end{equation*}
Then we can deal with a (usually) simpler trigonometric integral. Observe that the trigonometric identity that allows us to simplify stuff is
\begin{equation*} 1 + \tan^2(\theta) = \sec^2(\theta) \end{equation*}
For strategies to deal with a trigonometric integral, feel free to consult SectionΒ 7.2.
If you are reading our textbook, this case is labeled as "integrals involving \(\sqrt{a^2 + x^2}\)". This is similar to the first case of the trig sub that having a square root will just make the trig integral we get after the trig sub to be easier (and half of the time, it actually doesn’t), but the square root should have no impact on the determination of using trig sub.

Subsection Integrals Involving \(\boldsymbol{x^2 - a^2}\)

By now, you may get the idea that we may be able to make a trig sub to deal with the integrals involving \(x^2 - a^2\text{.}\) The answer is yes! This will be the third case of the trig sub.
If \(x^2 - a^2\) is in the integral, then try the substitution \(x = a\sec(\theta)\text{.}\) Then
\begin{align*} x^2 - a^2 \amp= \left(a\sec(\theta)\right)^2 - a^2 \\ \amp= a^2 \sec^2(\theta) - a^2 \\ \amp= a^2 \left(\sec^2(\theta) - 1\right) \\ \amp= a^2 \tan^2(\theta) \end{align*}
and
\begin{equation*} \frac{dx}{d\theta} = a\sec(\theta)\tan(\theta) \qquad\implies\qquad dx = a\sec(\theta)\tan(\theta)\, d\theta \end{equation*}
Then we can deal with a (usually) simpler trigonometric integral. Observe that the trigonometric identity that allows us to simplify stuff is
\begin{equation*} 1 + \tan^2(\theta) = \sec^2(\theta) \end{equation*}

Example 7.3.9.

Evaluate the definite integral \(\displaystyle \int_1^4 \frac{\sqrt{t^2 + 4t - 5}}{t + 2}\, dt\)
Hint.
Observe that there is no \(x^2 - a^2\) in the integral... But there has to be a \(x^2 - a^2\) in the integral (or why Richard put this problem as an example here)...
This is an algebraic trick you will need for an Edfinity problem. To force out some squares in the integrand, you may consider doing a completing the square on the trinomial.
If the method of completing the square sounds familiar but you don’t remember much of it, Google it or ask Richard (he has a very pretty diagram about it when he teaches this in MTH 95 at PCC).
Solution.
Using the method of completing the square on the trinomial inside the square root, we obtain
\begin{equation*} t^2 + 4t - 5 = \left(t + \frac{4}{2}\right)^2 - 5 - \left(\frac{4}{2}\right)^2 = (t + 2)^2 - 9 \end{equation*}
Then we can rewrite the problem as follows:
\begin{equation*} \int_1^4 \frac{(t + 2)^2 - 9}{t + 2}\, dt \end{equation*}
Observe that now we are observing a \(x^2 - a^2\) in the integrand if \(x = t + 2\) and \(a = 3\text{.}\) This implies a small little \(u\)-sub (or \(x\)-sub) to match the format of this case using trig sub.
\begin{align*} \int_1^4 \frac{(t + 2)^2 - 9}{t + 2}\, dt \amp= \int_{x(1)}^{x(4)} \frac{\sqrt{x^2 - 3^2}}{x}\, dx \\ \amp= \int_{3}^{6} \frac{\sqrt{x^2 - 3^2}}{x}\, dx \end{align*}
Now this integral looks like something we can do a trig sub on! Let \(x = 3\sec(\theta)\text{.}\) Then
\begin{align*} \sqrt{x^2 - 3^2} \amp= \sqrt{3^2\sec^2(\theta) - 3^2} \\ \amp= \sqrt{3^2\left(\sec^2(\theta) - 1\right)} \\ \amp= \sqrt{3^2 \tan^2(\theta)} \amp\amp\text{by the Pythagorean Identity} \\ \amp= 3\tan(\theta) \end{align*}
and
\begin{equation*} \frac{dx}{d\theta} = 3\sec(\theta)\tan(\theta) \qquad\implies\qquad dx = 3\sec(\theta)tan(\theta)\, d\theta \end{equation*}
Also, since we changed the variable from \(x\) to \(\theta\text{,}\) we will need to adjust the limits of integration.
  • When \(x = 6\text{,}\) then \(6 = 3\sec(\theta)\text{,}\) which implies that \(\theta = \sec^{-1}\left(\frac{6}{3}\right) = \dfrac{\pi}{3}\text{;}\)
  • When \(x = 3\text{,}\) then \(3 = 3\sec(\theta)\text{,}\) which implies that \(\theta = \sec^{-1}\left(\dfrac{3}{3}\right) = 0\text{.}\)
Now let’s plug everything back to the integral and see if the integral becomes easier.
\begin{align*} \int_{3}^{6} \frac{\sqrt{x^2 - 3^2}}{x}\, dx \amp= \int_0^\frac{\pi}{3} \frac{3\tan(\theta)}{3\sec(\theta)}\cdot 3\sec(\theta)\tan(\theta)\, d\theta \\ \amp= \int_0^\frac{\pi}{3} \tan^2(\theta)\, d\theta \end{align*}
The integral is definitely easier and we can evaluate it using the Pythagorean Identity.
\begin{align*} \int_0^\frac{\pi}{3} \tan^2(\theta)\, d\theta \amp= \int_0^\frac{\pi}{3} \left(\sec^2(\theta) + 1\right)\, d\theta \\ \amp= \left(\tan(\theta) + \theta\right)\bigg|_{\theta = 0}^\frac{\pi}{3} \\ \amp= \tan\left(\frac{\pi}{3}\right) + \frac{\pi}{3} \\ \amp= \sqrt{3} + \frac{\pi}{3} \\ \amp= 2.77924835877 \end{align*}

Worksheet Some Exercises for this section

I included some practice problems that cover some main concepts in this section. You don’t need to turn it in, but I highly encourage you to work on this with your classmates. I may take problems here to be your in-class practice problems, homework problems, and/or exam problems. Reach out to Richard for help if you get stuck or have any questions.
I will only include the final answer to some of the problems for you to check your result. If you want to check your work, talk to Richard and he is happy to discuss the process with you.

Exercise Group.

Evaluate the following integrals
1.
\(\displaystyle \int \frac{dx}{\left(16 - x^2\right)^\frac{3}{2}}\)
5.
\(\displaystyle \int \frac{x^2\, dx}{\left(x^2 + 1\right)^\frac{3}{2}}\)

Exercise Group.

Evaluate the following integral by first using a \(u\)-sub.

8.

Evaluate the integral \(\displaystyle \int x^3\sqrt{9 - x^2}\text{.}\) You will need to find a good strategy to evaluate the trigonometric integral in SectionΒ 7.2.