Integration of Trigonometric Functions

Integration of Trigonometric Functions[I]

$\displaystyle \int \sin^{m}{x}\cos^{n}{x}\: dx.$

1. For $m = 1$. Let $t = \cos{x}$. Then $dt = -\sin{x}$ and

$\displaystyle \int \sin^{m}{x}\cos^{n}{x}\: dx = \int \cos^{n}{x}\sin{x}dx = \int t^n (-dt) = -\int t^n \:dt$

For $n=1$. Let $t = \sin{x}$. Then $dt = \cos{x}$ and

$\displaystyle \int \sin^{m}{x}\cos^{n}{x}\: dx = \int \sin^{m}{x}\cos{x}dx = \int t^m dt. $

Understanding By substitution, the integration of a trinometric function can be solved by integration of a rational function.

Example 3..8   Integrate the following function.

$\displaystyle \sin^{3}{x}\cos{x} $

.

SOLUTION Let $t = \sin{x}$. Thne $dt = \cos{x}dx$,

$\displaystyle \int \sin^{3}{x}\cos{x}\: dx = \int t^3 dt = \frac{t^4}{4} + c = \frac{\sin^{4}{x}}{4} + c\ensuremath{ \blacksquare}$

Which function $\int \sin^{3}{x}\cos{x}\:dx$ is the same as $\int (\sin{x})^3 \cos{x}\:dx$. Now which function should be put $t$. $t = \sin{x}$ or $t = \cos{x}$ are possibilities. But letting $t = \cos{x}$, we have $dt = -\sin{x}dx$ and it is impossible to express integrand and $dx$ interms of a function of $t$ and $dt$.

Exercise 3..8   Integrate the following function.

$\displaystyle \sin{x}\cos^{4}{x}$

SOLUTION Let $t = \cos{x}$. Then $dt = -\sin{x}dx$.

$\displaystyle \int \sin{x}\cos^{4}{x}\: dx = \int t^4 (-dt) = -\frac{t^5}{5} + c = -\frac{\cos^{5}{x}}{5} + c\ensuremath{ \blacksquare}$

Integration of Trigonometric Functions[I]

$\displaystyle \int \sin^{m}{x}\cos^{n}{x}\: dx.$

2. If $m$ is odd, then $m-1$ is even. Using $\sin^{2}{x} = 1 - \cos^{2}{x}$, express $\sin^{m-1}{x}$ as in the form of $\cos{x}$. Thus,

$\displaystyle \int \sin^{m-1}{x}\cos^{n}{x}\sin{x}\:dx = \int (1 - \cos^{2}{x})^{\frac{m-1}{2}}\cos^{n}{x}\sin{x}dx.$

Now let $t = \cos{x}$. Then $dt = -\sin{x}dx$ and
$\displaystyle \int (1 - \cos^{2}{x})^{\frac{m-1}{2}}\cos^{n}{x}\sin{x}dx$ $\displaystyle =$ $\displaystyle \int (1 - t^2)^{\frac{m-1}{2}}t^n (-dt)$  

Similarly for $n$ odd.

Example 3..9   Integrate the following function.

$\displaystyle \sin^{3}{x}\cos^{2}{x} $

SOLUTION Since $\sin^{3}{x}$ is odd power of $\sin{x}$,

$\displaystyle \int \sin^{3}{x}\cos^{2}{x}\:dx = \int (1 - \cos^{2}{x})\cos^{2}{x}\sin{x}\:dx$

Now let $t = \cos{x}$. Then $dt = -\sin{x}dx$ and
$\displaystyle \int (1 - \cos^{2}{x})\cos^{2}{x}\sin{x}\:dx$ $\displaystyle =$ $\displaystyle \int (1 - t^2)t^2 (-dt) = -\int (t^2 - t^4)dt$  
  $\displaystyle =$ $\displaystyle -\left(\frac{t^{3}}{3} - \frac{t^{5}}{5}\right) + c = -\frac{\cos^{3}{x}}{3} + \frac{\cos^{5}{x}}{5} + c\ensuremath{ \blacksquare}$  

If there is an odd power, then use $\cos^{2}{x} + \sin^{2}{x} = 1$ to write $\sin^{3}{x}\cos^{2}{x} = \sin^{2}{x}\cos^{2}{x}\sin{x}$.

Exercise 3..9   Integrate the following function $\displaystyle{\sin^{3}{x}\cos^{3}{x} }$.

SOLUTION Let $t = \sin{x}$. Then $dt = \cos{x}dx$ and
$\displaystyle \int \sin^{3}{x}\cos^{3}{x} dx$ $\displaystyle =$ $\displaystyle \int \sin^{3}{x}\cos^{2}{x}\cos{x} dx$  
       
  $\displaystyle =$ $\displaystyle \int \sin^{3}{x}(1 - \sin^{2}{x})\cos{x} dx$  
  $\displaystyle =$ $\displaystyle \int t^{3}(1 - t^{2})dt = \int (t^3 - t^5)dt$  
  $\displaystyle =$ $\displaystyle \frac{t^{4}}{4} - \frac{t^{6}}{6} + c = \frac{\sin^{4}{x}}{4} - \frac{\sin^{6}{x}}{6} + c\ensuremath{ \blacksquare}$  

Since the power of $\sin{x}$ and the power of $\cos{x}$ are odd, we can use either one of them. $\sin^{3}{x}\cos^{3}{x} = \sin^{2}{x}\cos^{3}{x}\sin{x} = (1-\cos^{2}{x})\cos^{3}{x}\sin{x}$.

Trig $\to$ Rational Function
Let $\sqrt{1+x^2}$ be the hypoteneus of the right triangle. Then $\cos^2{x},\sin^{2}{x}$ can be expressed as rational functions. Also note that the derivative of $\tan{x}$ is expressed as a square of a function $\frac{1}{\cos^{2}{x}}$.

Figure 3.2: even function
\includegraphics[width=3.5cm]{SOFTFIG-3/trigevensub1.eps}

Integration of Trigonometric Function[I]

$\displaystyle \int \sin^{m}{x}\cos^{n}{x}\: dx.$

3. Suppose that $m$ and $n$ are both even. Now let $t = \tan{x}$. Then we can express $\sin^{2}{x}, \cos^{2}{x}, dx$ by using $t$. Consider the right triangle with the adjacent of the angle $x$ is 1 and the opposite is $t$. Then $t = \tan{x}$ and

$\displaystyle \cos^{2}{x} = (\cos{x})^2 = (\frac{1}{\sqrt{1+t^2}})^2 = \frac{1}{1+t^2},$

$\displaystyle \sin^{2}{x} = (\sin{x})^2 = (\frac{t}{\sqrt{1+t^2}})^2 = \frac{t^2}{1+t^2}.$

Also,

$\displaystyle dt = \frac{1}{\cos^{2}{x}}dx = \frac{1}{\frac{1}{t^2+1}}dx = (t^2 + 1)dx$

Thus

$\displaystyle dx = \frac{dt}{t^2 + 1}.$

Example 3..10   Find the following indefinite integrals.
1. $\displaystyle{\sin^{2}{x}\cos^{2}{x}}$2. $\displaystyle{\frac{\sin^{2}{x}}{\cos^{4}{x}} }$

SOLUTION 1. Instead of using $t = \tan{x}$, it is easier to use double angle formula.

$\cos(x-x) = \cos^{2}{x} + \sin^{2}{x}$, $\cos{2x} = \cos(x+x) = \cos^{2}{x} - \sin^{2}{x}$. Thus adding both sides of equation,

$\displaystyle 1 + \cos{2x} = 2\cos^{2}{x}.$

Take the difference

$\displaystyle 1 - \cos{2x} = 2\sin^{2}{x}.$

$\displaystyle \sin^{2}{x} = \frac{1 - \cos{2x}}{2}, \cos^{2}{x} = \frac{1 + \cos{2x}}{2}$


$\displaystyle \int \sin^{2}{x}\cos^{2}{x}\:dx$ $\displaystyle =$ $\displaystyle \int \frac{(1-\cos{2x})(1+\cos{2x})}{4}\:dx$  
  $\displaystyle =$ $\displaystyle \int \frac{1-\cos^{2}{2x}}{4}\:dx$  
  $\displaystyle =$ $\displaystyle \frac{1}{4}\left(\int 1 - \frac{1 + \cos{4x}}{2}\right)\:dx = \fr...
...{4}\left(x - \frac{x}{2} - \frac{\sin{4x}}{8}\right)\ensuremath{ \blacksquare}$  

2. Let $t = \tan{x}$. Then $\cos^{2}{x} = \frac{1}{1+t^2}$, $\sin^{2}{x} = \frac{t^2}{1+t^2}$, $dx = \frac{1}{t^2 + 1}dt$. Thus
$\displaystyle \int \frac{\sin^{2}{x}}{\cos^{4}{x}}dx$ $\displaystyle =$ $\displaystyle \int \frac{t^2}{1+t^2}(1+t^2)^2 \frac{1}{t^2 + 1}dt = \int t^2dt = \frac{t^3}{3} + c$  
  $\displaystyle =$ $\displaystyle \frac{1}{3}\tan^{3}{x} + c$  

Check
$\cos^{2}{2x} = \frac{1 + \cos{4x}}{2}$.

Exercise 3..10   Integrate the following function.
1. $\tan^{2}{x}$2. $\displaystyle{\frac{1}{\cos{x}}}$

SOLUTION

1. Let $t = \tan{x}$ and express $\tan{x} = \frac{\sin{x}}{\cos{x}}$. Then

$\displaystyle dx = \frac{1}{1 + t^{2}} dt\hskip 0.5cm \cos^{2}{x} = \frac{1}{1+t^2}\hskip 0.5cm \sin^{2}{x} = \frac{t^2}{1+t^2}.$

Thus
$\displaystyle \int \tan^{2}{x} dx$ $\displaystyle =$ $\displaystyle \int \frac{\frac{t^2}{1+t^2}}{\frac{1}{1+t^2}}\cdot \frac{1}{1+t^2}dt = \int \frac{t^{2}}{1 + t^2} dt$  
  $\displaystyle =$ $\displaystyle \int \frac{1 + t^{2} - 1}{1+ t^{2}} dt = \int [1 - \frac{1}{1+ t^2}] dt$  
  $\displaystyle =$ $\displaystyle t - \tan^{-1}{t} + c = \tan{x} - x + c$  

Alternative Solution
$\displaystyle \int \tan^{2}{x} dx$ $\displaystyle =$ $\displaystyle \int \frac{\sin^{2}{x}}{\cos^{2}{x}} dx = \int \frac{1 - \cos^{2}{x}}{\cos^{2}{x}} dx$  
  $\displaystyle =$ $\displaystyle \int (\sec^{2}{x} - 1) dx = \tan{x} - x + c
\ensuremath{ \blacksquare}$  

2. $\displaystyle{\frac{1}{\cos{x}} = \frac{\cos{x}}{\cos^{2}{x}} = \frac{\cos{x}}{1-\sin^{2}{x}}}$. Then it is in the form of [1]-2.

$\displaystyle \int \frac{1}{\cos{x}}\:dx$ $\displaystyle =$ $\displaystyle \int \frac{\cos{x}}{1-\sin^{2}{x}}\:dx$  

Now, $t = \sin{x}$ and $dt = \cos{x}dx$
$\displaystyle \int \frac{1}{\cos{x}}\:dx$ $\displaystyle =$ $\displaystyle \int \frac{dt}{1-t^2} = \int \frac{1}{(1+t)(1-t)}dt.$  

Using partial fraction decomposition,

$\displaystyle \frac{1}{(1+t)(1-t)} = \frac{A}{1+t} + \frac{B}{1-t}.$

Clear the denominator,

$\displaystyle 1 = A(1-t) + B(1+t) = (-A+B)t + A + B.$

which implies $-A+B = 0, A+B = 1$. Then $A = \frac{1}{2}, B = \frac{1}{2}$. Thus,
$\displaystyle \int \frac{1}{\cos{x}}\:dx$ $\displaystyle =$ $\displaystyle \frac{1}{2} \int \big(\frac{1}{1+t} + \frac{1}{1-t}\big)\:dt = \frac{1}{2} \big(\log\vert 1+t\vert - \log\vert 1-t\vert\big) + c$  
  $\displaystyle =$ $\displaystyle \frac{1}{2} \log\vert\frac{1+t}{1-t}\vert + c = \frac{1}{2}\log\vert\frac{1+\sin{x}}{1-\sin{x}}\vert + c.$  

Alternative Solution $(\log\vert\sec{x} + \tan{x}\vert)' = \frac{\sec{x}\tan{x} + \sec^{2}{x}}{\sec{x} + \tan{x}} = \sec{x} = \frac{1}{\cos{x}}$. Thus, $\int \frac{1}{\cos{x}}\:dx = \log\vert\sec{x} + \tan{x}\vert + c$
Note that $\frac{1}{2}\log\vert\frac{1+\sin{x}}{1-\sin{x}}\vert + c = \frac{1}{2}\log\vert...
...ert = \log\vert\frac{1+\sin{x}}{\cos{x}}\vert = \log\vert\sec{x} + \tan{x}\vert$.

$x = 2\tan^{-1}{x}$ The substitution by $x = 2\tan^{-1}{x}$ is applied at the last choice.

Figure 3.3: trig substitution
\includegraphics[width=3.5cm]{SOFTFIG-3/trigsubxover2.eps}

The hypoteneus is given by $\sqrt{1+t^2}$ and the angle is given by $\frac{x}{2}$. Then every trigonometric function can be expressed as a rational function.

Integration of Trigonometric Functions[II]

$\displaystyle \int \sin^{m}{x}\cos^{n}{x}\:dx$

Let $x = 2\tan^{-1}{t}$. Then

$\displaystyle dx = d(2 \tan^{-1}{t}) = \frac{2dt}{1+t^{2}}.$

Now consider the right triangle with the angle $\frac{x}{2}$,the adjacent to the angle 1, and opposite to the angle $t$.

$\displaystyle \cos{\frac{x}{2}} = \frac{1}{\sqrt{1+t^2}}, \sin{\frac{x}{2}} = \frac{t}{\sqrt{1+t^2}}$

Thus,
$\displaystyle \sin{x}$ $\displaystyle =$ $\displaystyle \sin{2\cdot\frac{x}{2}} = 2\sin{\frac{x}{2}}\cos{\frac{x}{2}} = 2 \frac{t}{\sqrt{1 + t^2}}\frac{1}{\sqrt{1 + t^2}} = \frac{2t}{1+t^{2}}$  
$\displaystyle \cos{x}$ $\displaystyle =$ $\displaystyle \cos{2\cdot \frac{x}{2}} = \cos^{2}{\frac{x}{2}} - \sin^{2}{\frac{x}{2}} = \frac{1}{1 + t^2} - \frac{t^2}{1 + t^2} = \frac{1-t^{2}}{1+t^{2}}.$  

Example 3..11   Find the integral $\displaystyle{\int \frac{1}{1+\cos{x}}}$.

SOLUTION It is not in the form [1]. Then let $t = \tan{\frac{x}{2}}$, $x = 2\tan^{-1}{t}$.

$\displaystyle dx = \frac{2}{1+ t^2}dt,  \cos{x} = \frac{1 - t^2}{1 + t^2}. $

Thus,
$\displaystyle \int \frac{dx}{1 + \cos{x}}$ $\displaystyle =$ $\displaystyle \int \frac{\frac{2dt}{1 + t^2}}{1 + \frac{1 - t^2}{1 + t^2}} = \int \frac{2}{1 + t^2 + 1 - t^2}dt$  
  $\displaystyle =$ $\displaystyle \int dt = t + c = \tan{\left(\frac{x}{2}\right)} + c
\ensuremath{ \blacksquare}$  

Exercise 3..11   Find the integral $\displaystyle{\int\sec^{3}{x}}$.

$\int \sec^3{x}dx = \int \frac{1}{\cos^3{x}}dx = \int \frac{\cos{x}}{\cos^4{x}}dx = \int \frac{\cos{x}}{(1-\sin^2{x})^2}$.

Check
Exercise3-10-2. By alternative solution, $\int \sec{x}\:dx = \log\vert sec{x} + \tan{x}\vert + c$.
SOLUTION
$\left\{\begin{array}{lcl}
f = \sec{x} & & g' = \sec^2{x}\\
&\searrow& \\
f' = \sec{x}\tan{x} &\leftarrow& g = \tan{x}
\end{array}\right.$
$\displaystyle \int{\sec^3{x}} \; dx$ $\displaystyle =$ $\displaystyle \int \sec^2{x}\sec{x}\; dx$  
  $\displaystyle =$ $\displaystyle \sec{x}\tan{x} - \sec{x}\tan^2{x}\;dx$  
  $\displaystyle =$ $\displaystyle \sec{x}\tan{x} - \int \sec^3{x}\; dx + \int \sec{x}\; dx.$  

Now let $I = \int \sec^3{x}\; dx$. Then
$\displaystyle 2I$ $\displaystyle =$ $\displaystyle \sec{x}\tan{x} + \int \sec{x}\;dx$  
  $\displaystyle =$ $\displaystyle \sec{x}\tan{x} + \log\vert\sec{x} + \tan{x}\vert + c.$  

Thus,

$\displaystyle I = \frac{1}{2}\left(\sec{x}\tan{x} + \log\vert\sec{x} + \tan{x}\vert \right) + c\ensuremath{ \blacksquare}$

Exercise A

1.
Work out the following integrals

(a) $\displaystyle{\int{\sin^3{x}\cos{x}} dx}$ (b) $\displaystyle{\int{\sin^2{3x}\cos{3x}} dx}$ (c) $\displaystyle{\int{\cos^2{x}} dx}$

(d) $\displaystyle{\int{\cos^{3}{x}}  dx }$ (e) $\displaystyle{\int{\cos^{4}{x}\sin^3{x}} dx}$ (f) $\displaystyle{\int{\sin{2x}\cos{3x}} dx}$

(g) $\displaystyle{\int{\sin{2x}\sin{x}} dx}$ (h) $\displaystyle{\int{\cos{x}\cos{2x}} dx}$ (i) $\displaystyle{\int{\tan{x}\sec^2{x}} dx}$

(j) $\displaystyle{\int{\sec^3{x}} dx}$

Exercise B

1.
Work out the following integrals

(a) $\displaystyle{\int{\sin^3{x}} dx}$ (b) $\displaystyle{\int{\sin^2{3x}} dx}$ (c) $\displaystyle{\int{\sin^3{x}\cos^2{x}} dx}$

(d) $\displaystyle{\int{\cos{3x}\sin{2x}}  dx }$ (e) $\displaystyle{\int{\sin^5{x}} dx}$ (f) $\displaystyle{\int{\sec^2{\pi x}} dx}$ (g) $\displaystyle{\int{\tan^3{x}} dx}$

(h) $\displaystyle{\int{\tan^2{x}\sec^2{x}} dx}$ (i) $\displaystyle{\int{\tan^3{x}\sec^3{x}} dx}$ (j) $\displaystyle{\int{\sec^5{x}} dx}$

(k) $\displaystyle{\int{\frac{dx}{3 - 2\cos{x}}}}$ (l) $\displaystyle{\int{\frac{\sin{x}}{2 - \sin{x}}} dx}$ (m) $\displaystyle{\int{\frac{1 + \sin{x}}{1 + \cos{x}}} dx}$

(n) $\displaystyle{\int{\frac{\sin^2{x}}{\sin^2{x} - \cos^2{x}}} dx}$ (o) $\displaystyle{\int{\frac{dx}{1 + \tan{x}}}}$