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

\begin{document}
\centerline{MATH 136 -- Calculus 2}
\centerline{Practice Day on integration ``by parts''}
\centerline{February 7, 2020}
\vskip 10pt
\noindent
{\it Background}
\vskip 10pt
{\bf Note:}  At this point we will move to Chapter 7 in the textbook.  We
will return to discuss some of the applications of integration from 
Chapter 6 after we do the techniques of integration from Chapter 7. 
\vskip 10pt
The integration by parts method is based on the product rule for derivatives, 
but we usually apply it by remembering the ``parts formula:"
$$\int u\ dv = uv - \int v\ du.$$
The idea is that we break up an integral we want to compute into a $u$ and a $dv$.
We compute $du = \frac{du}{dx}\ dx$ and $v = \int dv$ and apply the parts formula.
\emph{We then have to finish by integrating} $\int v\ du$.   
If we have made a good choice, then the integral $\int v\ du$ is simpler, or at least
no harder than the integral we started from.  
\vskip 10pt
\noindent
{\it Questions}
\vskip 10pt
\noindent
Integrate by parts
\begin{enumerate}
\item $\displaystyle \int x e^{2x}\ dx$
\item[] {\it Solution:}  Let $u = x$, $dv = e^{2x}\ dx$.  Then $du = dx$ and $v = \frac{1}{2} e^{2x}$.  By
the parts formula
$$\int x e^{2x}\ dx = \frac{x}{2} e^{2x} - \frac{1}{2} \int e^{2x}\ dx = \frac{x}{2} e^{2x} - \frac{1}{4} e^{2x} + C$$
\item $\displaystyle \int x^2 \cos(\pi x)\ dx$
\item[] {\it Solution:}  For this one, we will need to integrate by parts twice, taking $u = $ power of $x$ each time:
\begin{align*}
\int x^2\cos(\pi x)\ dx &= \frac{x^2\sin(\pi x)}{\pi} - \frac{2}{\pi} \int x \sin(\pi x)\ dx\\
&= \frac{x^2\sin(\pi x)}{\pi} - \frac{2}{\pi} \left( \frac{-x \cos(\pi x)}{\pi} + \frac{1}{\pi} \int \cos(\pi x)\ dx\right)\\
&= \frac{x^2\sin(\pi x)}{\pi} + \frac{2x\cos(\pi x)}{\pi^2} - \frac{2\sin(\pi x)}{\pi^3} + C
\end{align*}
\item $\displaystyle \int x^7 \ln(3x)\ dx$
\item[] {\it Solution:}  This is the case where we \emph{do not} want to let $u = $ power of $x$.  Take
$u = \ln(3x)$ and $dv = x^7\ dx$.  Then $du = \frac{3\ dx}{3x} = \frac{dx}{x}$ and $v = \frac{x^8}{8}$.  So 
\begin{align*}
\int x^7\ln(3x)\ dx &= \frac{x^8\ln(3x)}{8} - \int \frac{x^8}{8}\cdot \frac{1}{x}\ dx\\
&= \frac{x^8\ln(3x)}{8} - \int \frac{x^7}{8}\ dx \quad {\rm (simplify)}\\
&= \frac{x^8\ln(3x)}{8} - \frac{x^8}{64} + C.
\end{align*}
\item $\displaystyle \int \sin^{-1}(x)\ dx$
\item[] {\it Solution:}  Let $u = \sin^{-1}$ and $dv = dx$.  Then $du = \frac{dx}{\sqrt{1 - x^2}}$ and $v = x$.
We apply the parts formula and then do a substitution on the remaining integral:  
$$\int\sin^{-1}(x)\ dx = x\sin^{-1}(x) - \int\frac{x\ dx}{\sqrt{1 - x^2}} = x\sin^{-1}(x) + \sqrt{1 - x^2} + C$$
\item A more challenging one:  $\displaystyle \int e^{3x} \sin(5x)\ dx$.  Hint: you'll
need to integrate by parts twice, and it will seem as though you are going in circles.
But be of good cheer and persist -- things will work out because you get the same
integral again, but multiplied by a constant that lets you solve for it.
\item[] {\it Solution:}  Let $u = e^{3x}$ both times and $dv = $ trig function both times.  The final answer is: 
$$\frac{e^{3x}}{34}\left(3\sin(5x) - 5\cos(5x)\right) + C.$$  
\item Check by differentiating (and simplifying!):
$$\int \sec(x)\ dx = \ln|\sec(x) + \tan(x)| + C$$
\item[] Differentiating, we have 
$$\frac{d}{dx}\ln|\sec(x) + \tan(x)| = \frac{\sec(x)\tan(x) + \sec^2(x)}{\sec(x) + \tan(x)}$$
Factor $\sec(x)$ out of both terms on the top, then cancel the $\sec(x) + \tan(x)$.  
You get $\sec(x)$ after this simplification.   This shows the desired formula.
\item Another challenging one:  $\displaystyle \int \sec^3(x)\ dx$.  Hint:
Try making $u = \sec(x)$ and $dv = \sec^2(x)\ dx$.  You'll also need the trig identity 
$1 + \tan^2(x) = \sec^2(x)$ and the previous formula for $\int \sec(x)\ dx$.  
\item[] {\it Solution:}  Using the Hint, $du = \sec(x)\tan(x)\ dx$ and $v = \tan(x)$, so 
$$\int \sec^3(x)\ dx = \sec(x)\tan(x) - \int \sec(x)\tan^2(x)\ dx$$
But we have by the identity $\tan^2(x) = \sec^2(x) - 1$, so substituting for the $\tan^2(x)$
in the integral on the right:
$$\int \sec^3(x)\ dx = \sec(x)\tan(x) - \int\sec^3(x)\ dx + \int\sec(x)\ dx$$
Now we add $\int \sec^3(x)\ dx$ to both sides, then divide by 2 to get
$$\int \sec^3(x)\ dx = \frac{\sec(x)\tan(x)}{2} + \frac{1}{2}\int\sec(x)\ dx = 
\frac{\sec(x)\tan(x)}{2} + \frac{1}{2}\ln|\sec(x) + \tan(x)| + C.$$ 
\end{enumerate}
\end{document}

\begin{figure}
\begin{center}
\includegraphics[width=.8\linewidth]{needleregion.png}
\end{center}
\caption{The region for problem 4.}
\end{figure}

\end{document}



