Skip to main content

Section 5.2 Trigonometric Substitutions

The last major technique for integration is the technique of trigonometric substitutions. While these are just a new type of substitution, they are a very counter-intuitive class of substitutions which deserve their own section. Other substitutions were set up by looking for compositions (inside function where the derivative of the inside was also present), or sometimes trying to simplify denominator. Here, the substitution strategy is entirely new.
The integrals in this section will rely heavily on the techniques of Section 5.1: the general technique will be to reduce a certain class of integrals to a trigonometric integral and then proceed to use the previous developed techniques for trig integrals. Like many integration techniques, the current technique doesn’t really solve integrals directly instead, it reduces them to a previously understood type of integral.

Subsection 5.2.1 A Review of Pythagorus

The famous pythagorean theorem says gives the relationship between the side lengths of a right triangle: \(a^2 + b^2 = c^2\text{,}\) where \(c\) is the length of the longest side, the hypotenuse. The importance of this theorem comes from its ubiquity in solving geometric problems. Many geometric problems can be restated in terms of right triangles.
Alternatively, as I’ve argued in previous calculus material, the pythagorean theorem can be reinterpreted as a theorm about circles. A point a circle of radius \(c\) has \(x\) coordinate \(a = c \cos \theta\) and \(y\) coordinate \(b = c \sin \theta\text{.}\) The radius of length \(c\) forms the hypotenuse of a right triangle, with the other two sides being the \(x\) and \(y\) coordinates. The pythagoreaon theorem is equivalent to the fundamental trig identity: \(c^2 \cos^2 \theta + c^2 \sin^2 \theta = c^2\) or, if I cancel the \(c^2\text{,}\) \(\cos^2 \theta + \sin^2 \theta = 1\text{.}\) Thus, the pythagorean theorem can be seen as a way of making calculations for circle geometry as much as for triangle geometry. The circle is a fundamental shape in many geometric problems, again illustrating the importance of the pythagorean theorem.
I’ve just reviewed and argued that the pythagorean theorem is ubiquitous in solving all kinds of very concrete geometric problems. Let me be more explicit about the kinds of mathematics that come from this ubiquity. If I know two sides of a right triangle and need to find the third, I rearrange the pythagorean theorem to find the missing quantity.
  • If I need to find \(a\text{,}\) I solve to get \(a = \sqrt{c^2 - b^2}\text{.}\)
  • If I need to find \(b\text{,}\) I solve to get \(b = \sqrt{c^2 - a^2}\text{.}\)
  • If I need to find \(c\text{,}\) I solve to get \(c = \sqrt{a^2 + b^2}\text{.}\)
So, solving with pythagorus leads to expressions where I have a square root with a sum or difference of squares inside it. Now let me consider a situation where I have functions involving the pythagorean theorem. If I let one of the three sides of the triangle be the independent variable, I can get three different expressions: \(\sqrt{a^2 - x^2}\text{,}\) \(\sqrt{x^2 - a^2}\) and \(\sqrt{x^2 + a^2}\text{.}\) Functions that come from the use of the pythagorean theorem in geometry invariably have one of these three forms.

Subsection 5.2.2 Trigonometric Substitution

From the previous section, I argued that functions involving the three terms \(\sqrt{a^2 - x^2}\text{,}\) \(\sqrt{x^2 - a^2}\) and \(\sqrt{x^2 + a^2}\) are important and common. We often also have to do integrals with these kinds of functions. The technique I use to solve integrals that involve one of these three forms is trigonometric substitution. I am going to replace the variable \(x\) with a suitable trigonometric function.
So why trigonometry? The idea is to use the square identities (\(\cos^2 x + \sin^2 x = 1\text{,}\) \(1 + \tan^2 x = \sec^2 x\) and \(\cot^2 x + 1 = \csc^2 x\)) to get rid of the square root. The square roots are the real barrier to these integrals; other than a couple very specific forms that have a simple antiderivatives, I don’t know how to integrate these square roots. The trig substitution, along with the use of these square identities, is going to get rid of the square root. In doing so, it will change the integral into a trig integral, so that the techniques of Section 5.1 can hopefully be applied. I’ll work through the three types in turn.
  • \begin{equation*} \sqrt{a^2 - x^2} \end{equation*}
    For an integral involving this expression, the appropriate substitution is \(x = a \sin \theta\text{,}\) with differential \(dx = a \cos \theta d \theta\text{.}\) This substitution removes the square root when I replace \(1 - \sin^2 \theta\) with \(\cos^2 \theta\) using the square identity \(\sin^2 \theta + \cos^2 \theta + 1\text{.}\)
    \begin{equation*} \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{equation*}
    I’d like to avoid the absolute value, so I restrict the domain of this substitution to \(\theta \in \left[ \frac{-\pi}{2}, \frac{\pi}{2} \right]\) where cosine is positive. This restriction also means that the substitution is monontonic, which is a necessary but rarely mentioned condition for substitutions.
  • \begin{equation*} \sqrt{a^2 + x^2} \end{equation*}
    For an integral involving this expression, the appropriate substitution is \(x = a \tan \theta\text{,}\) with differential \(dx = a \sec^2 \theta d \theta\text{.}\) This substitution removes the square root when I replace \(\tan^2 \theta + 1\) with \(\sec^2 \theta\) using the square identity \(\tan^2 \theta + 1 = \sec^2 \theta\text{.}\)
    \begin{equation*} \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{equation*}
    I’d like to avoid the absolute value, so I restrict the domain of this substitution to \(\theta \in \left( \frac{-\pi}{2}, \frac{\pi}{2} \right)\) where secant is positive. This restriction also means that the substitution is monontonic and defined. I exclude the endpoints, since tangent is undefined on these endpoints.
  • \begin{equation*} \sqrt{x^2 - a^2} \end{equation*}
    For an integral involving this expression, the appropriate substitution is \(x = a \sec \theta\text{,}\) with differential \(dx = a \tan \theta \sec \theta d \theta\text{.}\) This substitution removes the square root when I replace \(\sec^2 \theta - 1\) with \(\tan^2 \theta\) using the square identity \(\tan^2 \theta + 1 = \sec^2 \theta\text{.}\)
    \begin{equation*} \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{equation*}
    I’d like to avoid the absolute value, so I restrict the domain of this substitution to \(\theta \in \left[0, \frac{\pi}{2} \right)\) where secant is positive. This restriction also means that the substitution is monontonic. I exclude the right endpoint, since secant is undefined at that endpoint.
This information is summarized in the following table.
\begin{align*} \text{ Integrand } \amp \sqrt{a^2 - x^2}\\ \text{ Substitution } \amp x = a \sin \theta\\ \text{ Identity } \amp \sin^2 \theta + \cos^2 \theta = 1\\ \text{ Calculation } \amp \sqrt{a^2 - x^2} = \sqrt{a^2(1-\sin^2 \theta)} = a \cos \theta\\ \text{ Domain } \amp \frac{-\pi}{2} \leq \theta \leq \frac{\pi}{2} \end{align*}
\begin{align*} \text{ Integrand } \amp \sqrt{a^2 + x^2}\\ \text{ Substitution } \amp x = a \tan \theta\\ \text{ Identity } \amp \tan^2 \theta + 1 = \sec^2 \theta\\ \text{ Calculation } \amp \sqrt{a^2 + x^2} = \sqrt{a^2(1+\tan^2 \theta)} = a \sec \theta\\ \text{ Domain } \amp \frac{-\pi}{2} \leq \theta \leq \frac{\pi}{2} \end{align*}
\begin{align*} \text{ Integrand } \amp \sqrt{x^2 - a^2}\\ \text{ Substitution } \amp x = a \sec \theta\\ \text{ Identity } \amp \tan^2 \theta + 1 = \sec^2 \theta\\ \text{ Calculation } \amp \sqrt{x^2 - a^2} = \sqrt{a^2(\sec^2 \theta - 1)} = a \tan \theta\\ \text{ Domain } \amp 0 \leq \theta \leq \frac{\pi}{2} \end{align*}

Subsection 5.2.3 Examples with Trig Substitutions

I’ll present four examples to try to illustrate the method. In each example, I look for the appropriate trig substitution. Sometimes I might need to do some algebra to get the square root into one of the three forms introduced above.

Example 5.2.1.

\begin{equation*} \int \sqrt{1-4x^2} dx \end{equation*}
This example is close to \(\sqrt{a^2 - x^2}\text{,}\) but there is a coefficient in front of the \(x\text{.}\) I need to remove this to use the trig substitution. I do this by writing \(1\) as \(\frac{4}{4}\) and factoring the \(4\) out of the square root.
\begin{equation*} \int \sqrt{1-4x^2} dx = \int \sqrt{\frac{4}{4} - 4x^2} dx = \int \sqrt{4 \left( \frac{1}{4} - x^2 \right)} dx = \int 2 \sqrt{\frac{1}{4} - x^2} dx \end{equation*}
Then I can apply the trig substitution \(x = a \sin \theta\) with \(a = \frac{1}{2}\text{.}\)
\begin{align*} \text{ Substitution: } \amp\\ \amp x = \frac{1}{2} \sin \theta\\ \amp dx = \frac{1}{2} \cos \theta d \theta\\ \text{ Calculation: } \amp\\ \amp \sqrt{\frac{1}{4} - x^2} = \sqrt{\frac{1}{4} - \frac{\sin^2 \theta}{4}} = \frac{1}{2} \sqrt{1 - \sin^2 \theta} = \frac{1}{2} \cos \theta \end{align*}
Putting these pieces in gives me a new integral. Notice that with trig substitution, replacing the \(dx\) term is always easy. I don’t need to any extra algebra to construct the right term; the \(dx\) is always replace by an expression in \(\theta\) according to the table above. After doing the the substitution, I get a trig integral with \(\cos^2 \theta\text{.}\) I use a half-angle identity to do this trig integral, splitting into two reasonable integrals by linearity.
\begin{align*} \int \sqrt{1-4x^2} dx \amp = 2 \int \frac{1}{2} \cos \theta \frac{1}{2} \cos \theta d \theta\\ \amp = \frac{1}{2} \int \cos^2 \theta d\theta\\ \amp = \frac{1}{2} \int \frac{1 + \cos 2 \theta}{2} d\theta\\ \amp = \frac{1}{4} \int d \theta + \int \frac{1}{4} \cos 2 \theta d\theta\\ \amp = \frac{\theta}{4} + \frac{\sin 2\theta}{8} + c \end{align*}
Now I need to reverse the substitution. This can be a tricky part of trig substitutions. I have expressions from the table for \(\sin \theta\) and \(\cos \theta\text{,}\) so I need to change the result of my integral into those functions. My antiderivative has a \(\sin 2\theta\) term, so I expand that with a double angle identity. Then I can replace the sine and cosine terms. For \(\theta\) by itself, I can invert the substitution \(x = \frac{1}{2} \sin \theta\) to get \(\theta = \arcsin 2x\) and use that to replace \(\theta\text{.}\)
\begin{align*} \int \sqrt{1-4x^2} dx \amp = \frac{\theta}{4} + \frac{2 \sin \theta \cos \theta}{8} + c\\ \amp = \frac{\arcsin 2x}{4} + \frac{2 \cdot 2x \cdot 2\sqrt{\frac{1}{4}-x^2}}{8} + c\\ \amp = \frac{\arcsin 2x}{4} + \frac{x\sqrt{1-4x^2}}{2} + c \end{align*}

Example 5.2.2.

\begin{equation*} \int \frac{\sqrt{x^2-9}}{x^3} dx \end{equation*}
No algebra is required here to setup the trig substitution. This is in the form for a secant substitution. In the substitution, I calculate expressions for sine and cosine as well, since they will be useful for the reverse substitution.
\begin{align*} \text{ Substitution: } \amp\\ x \amp = 3 \sec \theta\\ dx \amp = 3 \sec \theta \tan \theta d \theta\\ \text{ Calculation: } \amp\\ \sqrt{x^2-9} \amp = 3 \sqrt{\sec^2 \theta - 1} = 3 \tan \theta\\ \cos \theta \amp = \frac{3}{x}\\ \sin \theta \amp = \sqrt{1 - \cos^2 \theta} = \sqrt{1 - \frac{9}{x^2}} \end{align*}
I can replace all the pieces using the substitution, the differential, and the square root calculation. After replacing, I simplify the trig integral by changing everything into sine and cosine. All the cosines cancel off, leaving just a sine term. I use a half angle identity to solve this trig integral, splitting it into two reasonable pieces by linearity.
\begin{align*} \int \frac{\sqrt{x^2-9}}{x^3} dx \amp = \int \frac{\sqrt{9 \sec^2 \theta - 9}}{27 \sec^3 \theta} 3 \sec \theta \tan \theta d \theta\\ \amp = \frac{1}{27} \int \frac{3 \tan \theta}{\sec^3 \theta} 3\sec \theta \tan \theta d \theta = \frac{1}{3} \int \frac{\tan^2 \theta}{\sec^2 \theta} d \theta\\ \amp = \frac{1}{3} \int \sin^2 \theta d\theta = \frac{1}{3} \int \frac{1-\cos 2\theta}{2} d \theta\\ \amp = \frac{1}{3} \int \frac{1}{2} d \theta - \frac{1}{3} \int \frac{\cos 2\theta}{2} d\theta\\ \amp = \frac{\theta}{6} - \frac{\sin 2\theta}{12} + c \end{align*}
Now I need to reverse the substitution. I use a double angle identity to write \(\sin 2\theta\) in terms of \(\sin \theta\) and \(\cos \theta\text{,}\) so that I can replace those expressions using the original substitution. To replace \(\theta\text{,}\) I take the original substitution and solve for \(\theta\) to get \(\theta = \arcsec \left( \frac{x}{3} \right)\text{.}\)
\begin{align*} \int \frac{\sqrt{x^2-9}}{x^3} dx \amp = \frac{\theta}{6} - \frac{2 \sin \theta \cos \theta}{12} + c\\ \amp = \frac{\arcsec\left(\frac{x}{3} \right)}{6} - \frac{1}{6} \sqrt{1 - \frac{9}{x^2}} \frac{3}{x} + c\\ \amp = \frac{\arcsec\left(\frac{x}{3} \right)}{6} - \frac{\sqrt{x^2-9}}{2x^2} + c \end{align*}

Example 5.2.3.

\begin{equation*} A = 4 \int_0^a \frac{b}{a} \sqrt{a^2-x^2} dx \end{equation*}
Here is an example with bounds. This particular example is quite useful: it calculates the area of the ellipse \(\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1\text{.}\) It does this by restricting to the quarter of the ellipse in the first quadrant, where the area is the area under the curve \(y = \frac{b}{a} \sqrt{a^2-x^2}\) for \(x \in [0,a]\text{,}\) and then multiplying by \(4\) to get the area of the whole ellipse.
This is a sine substitution. Since this is a definite integral, I also have to deal with the bounds. Working with the bounds is a little tricky: to get the new bounds in \(\theta\text{,}\) I have to invert the sine function (in this case, simply by refering to a unit circle diagram).
\begin{align*} A \amp = 4 \int_0^a \frac{b}{a} \sqrt{a^2-x^2} dx\\ \text{ Substitution: } \amp\\ \amp x = a \sin \theta\\ \amp dx = a \cos \theta d \theta\\ \text{ Calculation: } \amp\\ \amp \sqrt{a^2 - x^2} = \sqrt{a^2(1-\sin^2 \theta)} = a \cos \theta\\ \text{ Bounds: } \amp\\ \amp x = 0 \implies \theta = \arcsin (0) = 0\\ \amp x = a \implies \theta = \arcsin \left( \frac{a}{a} \right) = \arcsin (1) = \frac{\pi}{2} \end{align*}
Now I have all the pieces, so I can do the substitution. Again, the substitution results in a squared trig function which I solve with a half-angle identity. Since this is a definite integral, I don’t need to reverse the substitution. I can just finish the substitution with the new bounds.
\begin{align*} A \amp = 4 \int_0^{\frac{\pi}{2}} \frac{b}{a} \sqrt{a^2 - a^2 \sin^2 \theta} a \cos \theta d \theta\\ \amp = \frac{4ba^2}{a} \int_0^{\frac{\pi}{2}} \cos^2 \theta d\theta\\ \amp = 4ab \int_0^{\frac{\pi}{2}} \frac{1 + \cos 2\theta}{2} d\theta\\ \amp = \frac{4ab}{2} \left( \int_0^{\frac{\pi}{2}} 1 d\theta + \int_0^{\frac{\pi}{2}} \cos 2\theta d\theta \right)\\ \amp = \frac{2ab\pi}{2} + \left. 2ab\frac{\sin 2\theta}{2} \right|_0^{\frac{\pi}{2}} = \pi ab + 0 - 0 = \pi ab \end{align*}
Therefore, the area of an ellipse with major axis \(a\) and minor axis \(b\) is \(\pi ab\text{.}\) This area matches with the area of a circle; when \(a=b\text{,}\) this expression gives an area of \(\pi a^2\) where \(a\) is the radius of the circle.

Example 5.2.4.

\begin{equation*} \int_{\frac{\sqrt{2}}{3}}^{\frac{2}{3}} \frac{1}{x^5\sqrt{9x^2-1}} dx \end{equation*}
This is a long and complicated example. First, I need to do some algebra to put this in the right form to use a trig substitution. I write \(1 = \frac{9}{9}\) and factor a \(9\) out of the square root.
\begin{equation*} \int_{\frac{\sqrt{2}}{3}}^{\frac{2}{3}} \frac{1}{x^5\sqrt{9x^2-1}} dx = \int_{\frac{\sqrt{2}}{3}}^{\frac{2}{3}} \frac{1}{3x^5\sqrt{x^2 - \frac{1}{9}}} dx \end{equation*}
Now I can use a secant substitution. I need to change the bounds as well, which involes inverting the secant function. By taking reciprocals, I can instead invert the cosine function, which is more familiar. (I can use the unit circle or special triangles to find these inverse values of cosine.)
\begin{align*} \text{ Substitution: } \amp\\ \amp x = \frac{1}{3} \sec \theta\\ \amp dx = \frac{1}{3} \sec \theta \tan \theta d \theta\\ \text{ Calculation: } \amp\\ \amp \sqrt{x^2 - \frac{1}{9}} = \sqrt{\frac{1}{9}(\sec^2 \theta - 1)} = \sqrt{ \frac{1}{9} \tan^2 \theta} = \frac{1}{3} \tan \theta \\ \text{ Bounds: } \amp\\ \amp x = \frac{\sqrt{2}}{3} \implies \sec \theta = \sqrt{2} \\ \amp \implies \cos \theta = \frac{1}{\sqrt{2}} \implies \theta = \frac{\pi}{4}\\ \amp x = \frac{2}{3} \implies \sec \theta = 2 \\ \amp \implies \cos \theta = \frac{1}{2} \implies \theta = \frac{\pi}{3} \end{align*}
Now I have all the pieces to do the substitution. I replace everything, leading to a pretty complicated expression.
\begin{align*} \int_{\frac{\sqrt{2}}{3}}^{\frac{2}{3}} \frac{}{3x^5 \sqrt{x^2 - \frac{1}{9}}} dx \amp = \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{\frac{1}{3} \sec \theta \tan \theta}{3 \frac{\sec^5 \theta}{3^5} \sqrt{\frac{\sec^2 \theta}{9} - \frac{1}{9}}} d\theta \end{align*}
I need to simplify this to make sense of it. I can use the calculation above to repalce the square root in the denominator. Then I can cancel some powers of 3. I can also cancel a secant which shows up in the numerator and denominator.
\begin{align*} \amp = \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{3^6}{3^2} \frac{\tan \theta}{\sec^4 \theta \tan \theta} d \theta \end{align*}
Now I’ll change the secant into cosine. The tangent cancels, making this reasonable.
\begin{align*} \amp = 81 \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \cos^4 \theta d \theta \end{align*}
This is an even power, so I use the half-angle identity. After using the identity, I need to expand the resulting binomial into three terms and split the integral up by linearity.
\begin{align*} \amp = 81 \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \left( \frac{1 + \cos 2\theta}{2} \right)^2 d \theta\\ \amp = 81 \left( \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{1}{4} d\theta + \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{\cos 2\theta}{2} d \theta + \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{\cos^2 2 \theta}{4} d\theta \right) \end{align*}
The first two integrals are reasonable to do. The third integral needs another half-angle identity. After that identity, I split up the last integral into two reasonable integrals. Finally, I can evaluate all these things on their bounds and do a bunch of arithmetic to simplify the resulting solution.
\begin{align*} \amp = 81 \left( \frac{\frac{\pi}{3} - \frac{\pi}{4}}{4} + \left. \frac{\sin 2\theta}{4} \right|_{\frac{\pi}{4}}^{\frac{\pi}{3}} + \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{1}{4} \frac{1 + \cos (4\theta)}{2} d \theta \right)\\ \amp = 81 \left(\frac{\pi}{48} + \frac{\sqrt{3}}{8} - \frac{1}{4} + \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{1}{8} d\theta + \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{\cos 4\theta}{8} d\theta \right)\\ \amp = 81 \left(\frac{\pi}{48} + \frac{\sqrt{3}}{8} - \frac{1}{4} + \frac{\pi}{96} + \left. \frac{\sin 4\theta}{32} \right|_{\frac{\pi}{4}}^{\frac{\pi}{3}} \right)\\ \amp = 81 \left(\frac{\pi}{48} + \frac{\pi}{96} \frac{\sqrt{3}}{8} - \frac{1}{4} - \frac{\sqrt{3}}{64} + 0 \right)\\ \amp = 81 \left( \frac{2\pi + \pi}{96} + \frac{8\sqrt{3} - \sqrt{3}}{64} - \frac{1}{4} \right) \\ \amp = 81 \left( \frac{3\pi}{96} + \frac{7\sqrt{3}}{64} - \frac{16}{64} \right)\\ \amp = 81 \left( \frac{\pi}{32} + \frac{7\sqrt{3} - 16}{64} \right) = \frac{81}{64} ( 2\pi + 7\sqrt{3} - 16) \doteq 3.047 \end{align*}