Trigonometric Substitutions



Return more midterms?
Rough meaning of grades:
$ \qquad$ 29-34 is A
$ \qquad$ 23-28 is B
$ \qquad$ 17-22 is C
$ \qquad$ 11-16 is D
Regarding the quiz--if you do every homework problem that was assigned, you'll have a severe case of deja vu on the quiz! On the exam, we do not restrict ourselves like this, but you get to have a sheet of paper.

The first homework problem is to compute

$\displaystyle \int_{\sqrt{2}}^2 \frac{1}{x^3 \sqrt{x^2-1}} dx.$ (5.4)

Your first idea might be to do some sort of substitution, e.g., $ u=x^2-1$, but $ du=2xdx$ is nowhere to be seen and this simply doesn't work. Likewise, integration by parts gets us nowhere. However, a technique called ``inverse trig substitutions'' and a trig identity easily dispenses with the above integral and several similar ones! Here's the crucial table:
Expression Inverse Substitution Relevant Trig Identity
$ \sqrt{a^2-x^2}$ $ x=a\sin(\theta), -\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2}$ $ 1-\sin^2(\theta) = \cos^2(\theta)$
$ \sqrt{a^2+x^2}$ $ x=a\tan(\theta), -\frac{\pi}{2} < \theta < \frac{\pi}{2}$ $ 1+\tan^2(\theta) = \sec^2(\theta)$
$ \sqrt{x^2-a^2}$ $ x=a\sec(\theta), 0 \leq \theta < \frac{\pi}{2}$ or $ \pi \leq \theta < \frac{3\pi}{2}$ $ \sec^2(\theta) - 1 = \tan^2(\theta)$

Inverse substitution works as follows. If we write $ x=g(t)$, then

$\displaystyle \int f(x) dx = \int f(g(t)) g'(t) dt.
$

This is not the same as substitution. You can just apply inverse substitution to any integral directly--usually you get something even worse, but for the integrals in this section using a substitution can vastly improve the situation.

If $ g$ is a $ 1-1$ function, then you can even use inverse substitution for a definite integral. The limits of integration are obtained as follows.

$\displaystyle \int_{a}^{b} f(x) dx = \int_{g^{-1}(a)}^{g^{-1}(b)} f(g(t)) g'(t) dt.$ (5.5)

To help you understand this, note that as $ t$ varies from $ g^{-1}(a)$ to $ g^{-1}(b)$, the function $ g(t)$ varies from $ a=g(g^{-1}(a)$ to $ b=g(g^{-1}(b))$, so $ f$ is being integrated over exactly the same values. Note also that (5.3.2) once again illustrates Leibniz's brilliance in designing the notation for calculus.

Let's give it a shot with (5.3.1). From the table we use the inverse substition

$\displaystyle x = \sec(\theta).
$

We get

$\displaystyle \int_{\sqrt{2}}^2 \frac{1}{x^3 \sqrt{x^2-1}} dx$ $\displaystyle = \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{1}{\sec(\theta)}{\sqrt{\sec^2(\theta)-1}} \sec(\theta)\tan(\theta) d\theta$    
  $\displaystyle = \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \frac{1}{\sec(\theta)}{\tan(\theta)} \sec(\theta)\tan(\theta) d\theta$    
  $\displaystyle = \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} \cos^(\theta) d\theta$    
  $\displaystyle = \frac{1}{2} \int_{\frac{\pi}{4}}^{\frac{\pi}{3}} 1 + \cos(2\theta) d\theta$    
  $\displaystyle = \frac{1}{2} \left[ \theta + \frac{1}{2}\sin(2\theta)\right]_{\frac{\pi}{4}}^{\frac{\pi}{3}}$    
  $\displaystyle = \frac{\pi}{24} + \frac{\sqrt{3}}{8} - \frac{1}{4}$    

Wow! That was like magic. This is really an amazing technique. Let's use it again to find the area of an ellipse.

Example 5.3.1   Consider an ellipse with radii $ a$ and $ b$, so it goes through $ (0,\pm b)$ and $ (\pm a, 0)$. An equation for the part of an ellipse in the first quadrant is

$\displaystyle y = b \sqrt{1-\frac{x^2}{a^2}} = \frac{b}{a}\sqrt{a^2-x^2}.
$

Thus the area of the entire ellipse is

$\displaystyle A = 4 \int_{0}^a \frac{b}{a}\sqrt{a^2-x^2}   dx.
$

The $ 4$ is because the integral computes $ 1/4$th of the area of the whole ellipse. So we need to compute

$\displaystyle \int_{0}^a \sqrt{a^2-x^2}  dx
$

Obvious substitution with $ u=a^2-x^2$...? nope. Integration by parts...? nope.

Let's try inverse substitution. The table above suggests using $ x = a\sin(\theta)$, so $ dx = a\cos(\theta) d\theta$. We get

$\displaystyle \int_{0}^{\frac{\pi}{2}} \sqrt{a^2 - a^2\sin^2(\theta)} d\theta$ $\displaystyle = a^2 \int_{0}^{\frac{\pi}{2}} \cos^2(\theta) d\theta$ (5.6)
  $\displaystyle = \frac{a^2}{2}\int_{0}^{\frac{\pi}{2}} 1+\cos(2\theta) d\theta$ (5.7)
  $\displaystyle = \frac{a^2}{2}\left[ \theta + \frac{1}{2}\sin(2\theta) \right]_0^{\frac{\pi}{2}}$ (5.8)
  $\displaystyle = \frac{a^2}{2}\cdot \frac{\pi}{2} = \frac{\pi a^2}{4}.$ (5.9)

Thus the area is

$\displaystyle 4 \frac{b}{a} \frac{\pi a^2}{4}
= \pi a b.
$

Consistency Check: If the ellipse is a circle, i.e., $ a=b=r$, this is $ \pi r^2$, which is a well-known formula for the area of a circle.

Remark 5.3.2   Trigonometric substitution is useful for functions that involve $ \sqrt{a^2-x^2}$, $ \sqrt{x^2+a^2}$, $ \sqrt{x^2-a}$, but not all at once!. See the above table for how to do each.

One other important technique is to use completing the square.

Example 5.3.3   Compute $ \int \sqrt{5 + 4x - x^2}  dx$. We complete the square:

$\displaystyle 5 + 4x - x^2 = 5 - (x - 2)^2 + 4 = 9 - (x-2)^2.
$

Thus

$\displaystyle \int \sqrt{5 + 4x - x^2}   dx
= \int \sqrt{9 - (x-2)^2}   dx.
$

We do a usual substitution to get rid of the $ x-2$. Let $ u=x-2$, so $ du=dx$. Then

$\displaystyle \int \sqrt{9 - (x-2)^2}   dx
= \int \sqrt{9 - y^2}   dy.
$

Now we have an integral that we can do; it's almost identical to the previous example, but with $ a=9$ (and this is an indefinite integral). Let $ y = 3\sin(\theta)$, so $ dy = 3\cos(\theta)d\theta$. Then

$\displaystyle \int \sqrt{9 - (x-2)^2}   dx$ $\displaystyle = \int \sqrt{9 - y^2}   dy$    
  $\displaystyle = \int \sqrt{3^2 - 3^2\sin^2(\theta)} 3\cos(\theta) d\theta$    
  $\displaystyle = 9 \int \cos^2(\theta)  d\theta$    
  $\displaystyle = \frac{9}{2} \int 1 + \cos(2\theta) d\theta$    
  $\displaystyle = \frac{9}{2} \left(\theta + \frac{1}{2}\sin(2\theta)\right) + c$    

Of course, we must transform back into a function in $ x$, and that's a little tricky. Use that

$\displaystyle x - 2 = y = 3\sin(\theta),$

so that

$\displaystyle \theta = \sin^{-1}\left(\frac{x-2}{3}\right).
$

$\displaystyle \int \sqrt{9 - (x-2)^2}   dx$ $\displaystyle = \cdots$    
  $\displaystyle = \frac{9}{2} \left(\theta + \frac{1}{2}\sin(2\theta)\right) + c$    
  $\displaystyle =\frac{9}{2} \left[\sin^{-1}\left(\frac{x-2}{3}\right) + \sin(\theta)\cos(\theta) \right] + c$    
  $\displaystyle =\frac{9}{2} \left[\sin^{-1}\left(\frac{x-2}{3}\right) + \left(\frac{x-2}{3}\right) \cdot \left(\frac{\sqrt{9-(x-2)^2}}{3}\right) \right] + c.$    

Here we use that $ \sin(2\theta) = 2\sin(\theta)\cos(\theta)$. Also, to compute $ \cos(\sin^{-1}\left(\frac{x-2}{3}\right))$, we draw a right triangle with side lengths $ x-2$ and $ \sqrt{9-(x-2)^2}$, and hypotenuse $ 3$.

Example 5.3.4   Compute

$\displaystyle \int \frac{1}{\sqrt{t^2-6t+13}} dt
$

To compute this, we complete the square, etc.

$\displaystyle \int \frac{1}{\sqrt{t^2-6t+13}} dt
$ $\displaystyle = \int \frac{1}{\sqrt{(t-3)^2 + 4}} dt$    

[[Draw triangle with sides $ 2$ and $ t-3$ and hypotenuse $ \sqrt{(t-3)^2 + 4}$. Then

$\displaystyle t-3$ $\displaystyle = 2\tan(\theta)$    
$\displaystyle \sqrt{(t-3)^2 + 4}$ $\displaystyle = 2\sec(\theta) = \frac{2}{\cos(\theta)}$    
$\displaystyle dt$ $\displaystyle = 2\sec^2(\theta) d\theta$    

Back to the integral, we have

$\displaystyle \int \frac{1}{\sqrt{(t-3)^2 + 4}} dt$ $\displaystyle = \int \frac{2\sec^2(\theta)}{2\sec(\theta)} d\theta$    
  $\displaystyle = \int \sec(\theta) d\theta$    
  $\displaystyle = \ln \vert \sec(\theta) + \tan(\theta)\vert + c$    
  $\displaystyle = \ln\left\vert \sqrt{(t-3)^2 + 4}{2} + \frac{t-3}{2}\right\vert + c.$    

William Stein 2006-03-15