\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}
\centerline{MATH 136 -- Calculus 2}
\centerline{An Application of Integration By Parts:}
\centerline{Reduction Formulas}
\centerline{February 10, 2020}
\vskip 10pt
\noindent
{\it Background}
\vskip 10pt
There are a number of cases where repeated integration by parts can 
be used to completely evaluate integrals.  Instead of working these
out laboriously by hand every time, many mathematicians who need
to use these will use a \emph{reduction formula} that shows the 
general pattern of each application of the parts formula.  These
are usually obtained by consulting a compiled \emph{table of integrals}
rather than worked out by hand.  Here is an example:
$$\int x^n e^{ax}\ dx = \frac{x^n e^{ax}}{a} - \frac{n}{a}\int x^{n-1} e^{ax}\ dx$$
(This is derived by letting $u = x^n$ and $dv = e^{ax}\ dx$ as in an
example from the video on ``parts.'')  If we want to integrate $\int x^3 e^{4x}\ dx$, 
for instance, we apply this reduction formula three times with $n = 3$, then $n = 2$, 
then $n = 1$.  The power of $x$ is eventually reduced to a constant $1$.  
\begin{align*}
\int x^3 e^{4x}\ dx &= \frac{x^3 e^{4x}}{4} - \frac{3}{4} \int x^2 e^{4x}\ dx\\
&= \frac{x^3 e^{4x}}{4} - \frac{3}{4}\left(\frac{x^2e^{4x}}{4} - \frac{2}{4}\int x e^{4x}\ dx\right)\\
&= \frac{x^3 e^{4x}}{4} - \frac{3 x^2 e^{4x}}{16} + \frac{3}{8}\left(\frac{xe^{4x}}{4} - \frac{1}{4}\int e^{4x}\ dx\right)\\
&= \frac{x^3 e^{4x}}{4} - \frac{3 x^2 e^{4x}}{16} + \frac{3x e^{4x}}{32} - \frac{3e^{4x}}{128} + C.
\end{align*}

\vskip 10pt
\noindent
{\it Questions}

\begin{enumerate}
\item[(A)] Derive these reduction formulas for $n \ge 1$:
$$\int x^n \cos(ax)\ dx = \frac{x^n \sin(ax)}{a} - \frac{n}{a}\int x^{n-1}\sin(ax)\ dx$$
and 
$$\int x^n \sin(ax)\ dx = \frac{-x^n \cos(ax)}{a} + \frac{n}{a}\int x^{n-1}\cos(ax)\ dx$$
by integrating by parts (once each).
\item[] {\it Answer:}  Let $u = x^n$ and $dv = \cos(ax)\ dx$ for the first and $dv = \sin(ax)\ dx$ for
the second.  The formula follows immediately from the parts formula since $du = n x^{n-1}\ dx$
and $v = \frac{\sin(ax)}{a}$ for the first and $v = \frac{-\cos(ax)}{a}$ for the second. 
\item[(B)] Using the two reduction formulas from part (A) in sequence, integrate:
$$\int x^2 \cos(3x)\ dx$$
\item[] {\it Answer:}  We use the cosine formula first with $n = 2$, then the sine formula
with $n = 1$:
\begin{align*}
\int x^2\cos(3x)\ dx &= \frac{x^2 \sin(3x)}{3} - \frac{2}{3}\int x \sin(3x)\ dx\\
&= \frac{x^2\sin(3x)}{3} - \frac{2}{3}\left(\frac{-x\cos(3x)}{3} + 
\frac{1}{3}\int\cos(3x)\ dx\right)\\
&= \frac{x^2\sin(3x)}{3} + \frac{2x\cos(3x)}{9} - \frac{2\sin(3x)}{27} + C.
\end{align*}
\item[(C)] Derive the following reduction formula by applying parts with $u = \sin^{n-1}(x)$
and $dv = \sin(x)\ dx$: 
$$\int \sin^n(x)\ dx = \frac{-\sin^{n-1}(x)\cos(x)}{n} + \frac{n-1}{n} \int \sin^{n-2}(x)\ dx.$$
\item[]  {\it Answer:}  We have $du = (n-1)\sin^{n-2}(x)\cos(x)\ dx$ and $v = -\cos(x)$.
Applying the parts formula, we have 
$$\int\sin^n(x)\ dx = -\sin^{n-1}(x)\cos(x) + (n-1)\int \sin^{n-2}(x)\cos^2(x)\ dx$$
Now, we use the trig identity $\cos^2(x) = 1 - \sin^2(x)$ to subsitute for the factor
$\cos^2(x)$ in the integral on the right, multiply out, and split into two integrals.
This yields the equation:
$$\int\sin^n(x)\ dx = -\sin^{n-1}(x)\cos(x) + (n-1)\int\sin^{n-2}(x)\ dx - (n-1)\int\sin^n(x)\ dx$$
The last term on the right is the same integral we started with.  But since we
have the coefficient $-(n-1)$ we can add $(n-1)\int\sin^n(x)\ dx$ to both sides then divide 
by $n$ to get the required formula.
\item[(D)]  Use the formula from (C) to compute $\int \sin^5(x)\ dx$.
\item[] {\it Answer:}  We use the formula with $n = 5$ and $n = 3$.  When we get
down to the first power, we don't need the formula any more!
\begin{align*}
\int\sin^5(x)\ dx &= \frac{-\sin^4(x)\cos(x)}{5} + \frac{4}{5}\int \sin^3(x)\ dx\\
&= \frac{-\sin^4(x)\cos(x)}{5} + 
\frac{4}{5}\left(\frac{-\sin^2(x)\cos(x)}{3} + \frac{2}{3}\int \sin(x)\ dx\right)\\
&= \frac{-\sin^4(x)\cos(x)}{5} - \frac{4\sin^2(x)\cos(x)}{15} - \frac{8\cos(x)}{15} + C
\end{align*}
(Note:  The trickiest part of these is remembering to multiply all the factors that 
are introduced by the $\frac{n-1}{n}$ multiplying the integral each time you apply
the formula!)
\item[(E)]  Derive the following reduction formula for $n \ge 2$:
$$\int \tan^n(u)\ du = \frac{\tan^{n-1}(u)}{n-1} - \int \tan^{n-2}(u)\ du.$$
(Hint:  This does \emph{not} come from an integral by parts, 
but rather uses a ``clever'' application
of the trig identity $\tan^2(x) = \sec^2(x) - 1$.)
The case $n = 1$ is handled by a separate formula we have seen before ($u$-subsitution):
$$\int \tan(u)\ du = -\ln|\cos(u)| + C$$
\item[] {\it Answer:}  We break the $\tan^n(x)$ up as $\tan^{n-2}(x)\cdot \tan^2(x)$
then use the identity.  Separating into two integrals gives:
$$\int\tan^n(x)\ dx = \int \tan^{n-2}(x)\sec^2(x)\ dx - \int \tan^{n-2}(x)\ dx.$$
The first integral has the form $\int u^{n-2}\ du$ for $u = \tan(x)$.  This yields 
$$\int\tan^n(x)\ dx = \frac{\tan^{n-1}(x)}{n-1} - \int \tan^{n-2}(x)\ dx$$
and we're done!  Note again:  This is \emph{not integration by parts!}
\item[(F)] Use the formulas from (E) to integrate
$$\int \tan^5(x)\ dx$$
\item[] {\it Answer:}  We have 
\begin{align*}
\int \tan^5(x)\ dx &= \frac{\tan^4(x)}{4} - \int \tan^3(x)\ dx\\
&= \frac{\tan^4(x)}{4} - \frac{\tan^2(x)}{2} + \int\tan(x)\ dx\\
&= \frac{\tan^4(x)}{4} - \frac{\tan^2(x)}{2} - \ln|\cos(x)| + C.
\end{align*}
\end{enumerate}
\end{document}
