Trigonometric Integrals



Friday: Quiz 2
Next: Trig subst.

$\displaystyle \cos^2(x) =\frac{1+\cos(2x)}{2}$   and$\displaystyle \qquad \sin^2(x) = \frac{1-\sin(2x)}{2}.$ (5.2)

Example 5.2.1   Compute $ \int \sin^3(x)dx$.
We use trig. identities and compute the integral directly as follows:

$\displaystyle \int \sin^3(x)dx$ $\displaystyle = \int \sin^2(x) \sin(x) dx$    
  $\displaystyle = \int [1-\cos^2(x)]\sin(x) dx$    
  $\displaystyle = -\cos(x) + \frac{1}{3}\cos^3(x) + c$   (substitution $\displaystyle u=\cos(x)$)    

This always works for odd powers of $ \sin(x)$.

Example 5.2.2   What about even powers?! Compute $ \int \sin^4(x)dx$. We have

$\displaystyle \sin^4(x)$ $\displaystyle = [\sin^2(x)]^2$    
  $\displaystyle = \left[\frac{1-\cos(2x)}{2}\right]^2$    
  $\displaystyle = \frac{1}{4}\cdot \left[ 1 - 2\cos(2x) + \cos^2(2x)\right]$    
  $\displaystyle = \frac{1}{4}\left[ 1 - 2\cos(2x) + \frac{1}{2} + \frac{1}{2} \cos(4x) \right]$    

Thus

$\displaystyle \int \sin^4(x) dx$ $\displaystyle = \int \left[\frac{3}{8} - \frac{1}{2} \cos(2x) + \frac{1}{8} \cos(4x)\right] dx$    
  $\displaystyle = \frac{3}{8} x - \frac{1}{4} \sin(2x) + \frac{1}{32} \sin(4x) + c.$    

Key Trick: Realize that we should write $ \sin^4(x)$ as $ (\sin^2(x))^2$. The rest is straightforward.

Example 5.2.3   This example illustrates a method for computing integrals of trig functions that doesn't require knowing any trig identities at all or any tricks. It is very tedious though. We compute $ \int \sin^3(x)dx$ using complex exponentials. We have

$\displaystyle \cos(x) = \frac{e^{ix} + e^{-ix}}{2}
\qquad
\sin(x) = \frac{e^{ix} - e^{-ix}}{2i}.
$

hence

$\displaystyle \int \sin^3(x)dx$ $\displaystyle = \int \left(\frac{e^{ix} - e^{-ix}}{2i}\right)^3 dx$    
  $\displaystyle = -\frac{1}{8i} \int (e^{ix} - e^{-ix})^3 dx$    
  $\displaystyle = -\frac{1}{8i} \int (e^{ix} - e^{-ix})(e^{ix} - e^{-ix})(e^{ix} - e^{-ix})dx$    
  $\displaystyle = -\frac{1}{8i} \int (e^{2ix} -2 + e^{-2ix})(e^{ix} - e^{-ix})dx$    
  $\displaystyle = -\frac{1}{8i} \int e^{3ix} - e^{ix} - 2e^{ix} + 2e^{-ix} + e^{-ix} - e^{-3ix} dx$    
  $\displaystyle = -\frac{1}{8i} \int e^{3ix}- e^{-3ix} + 3e^{-ix} - 3e^{ix} dx$    
  $\displaystyle = -\frac{1}{8i} \left(\frac{e^{3ix}}{3i} - \frac{e^{-3ix}}{-3i} + \frac{3e^{-ix}}{-i} - \frac{3e^{ix}}{i}\right) + c$    
  $\displaystyle = \frac{1}{4} \left( \frac{1}{3} \cos(3x) - 3\cos(x)\right) + c$    
  $\displaystyle = \frac{1}{12} \cos(3x) - \frac{3}{4}\cos(x) + c$    

The answer looks totally different, but is in fact the same function.

Here are some more identities that we'll use in illustrating some tricks below.

$\displaystyle \frac{d}{dx} \tan(x) = \sec^2(x)
$

and

$\displaystyle \frac{d}{dx} \sec(x) = \sec(x)\tan(x).
$

Also,

$\displaystyle 1 + \tan^2(x) = \sec^2(x).
$

Example 5.2.4   Compute $ \int \tan^3(x) dx$. We have

$\displaystyle \int \tan^3(x) dx$ $\displaystyle = \int\tan(x) \tan^2(x) dx$    
  $\displaystyle = \int \tan(x)\left[\sec^2(x) - 1\right]dx$    
  $\displaystyle = \int \tan(x)\sec^2(x)dx - \int\tan(x) dx$    
  $\displaystyle = \frac{1}{2} \tan^2(x) - \ln\vert\sec(x)\vert + c$    

Here we used the substitution $ u=\tan(x)$, so $ du = \sec^2(x) dx$, so

$\displaystyle \int \tan(x)\sec^2(x)dx
= \int u du = \frac{1}{2}u^2 + c = \frac{1}{2}\tan^2(x) + c.
$

Also, with the substitution $ u=\cos(x)$ and $ du=-\sin(x)dx$ we get

$\displaystyle \int \tan(x)dx
= \int \frac{\sin(x)}{\cos(x)} dx
= -\int \frac{1}{u} du = -\ln\vert u\vert + c = -\ln\vert\sec(x)\vert + c.
$

Key trick: Write $ \tan^3(x)$ as $ \tan(x)\tan^2(x)$.

Example 5.2.5   Here's one that combines trig identities with the funnest variant of integration by parts. Compute $ \int \sec^3(x) dx$.
We have

$\displaystyle \int \sec^3(x)dx = \int \sec(x) \sec^2(x)dx.
$

Let's use integration by parts.

$\displaystyle u$ $\displaystyle = \sec(x)$ $\displaystyle v$ $\displaystyle = \tan(x)$    
$\displaystyle du$ $\displaystyle = \sec(x)\tan(x) dx$ $\displaystyle dv$ $\displaystyle = \sec^2(x)dx$    

The above integral becomes

$\displaystyle \int \sec(x) \sec^2(x)dx$ $\displaystyle = \sec(x) \tan(x) - \int \sec(x) \tan^2(x) dx$    
  $\displaystyle =\sec(x) \tan(x) - \int \sec(x)[\sec^2(x) - 1] dx$    
  $\displaystyle = \sec(x) \tan(x) - \int \sec^3(x) + \int \sec(x) dx$    
  $\displaystyle = \sec(x) \tan(x) - \int \sec^3(x) + \ln\vert\sec(x) + \tan(x)\vert$    

This is familiar. Solve for $ \int \sec^3(x)$. We get

$\displaystyle \int \sec^3(x) dx = \frac{1}{2}\Bigl[
\sec(x) \tan(x) + \ln\vert\sec(x) + \tan(x)\vert \Bigr] + c
$



Subsections
William Stein 2006-03-15