\documentclass[10pt,letter]{exam}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tabularx,ragged2e}
\usepackage{polynom}
\begin{document}

\begin{coverpages}
\begin{center}\huge MATH 3315 - EXAM 3 SPRING 2017 SOLUTION\\
SOLUTION
\end{center}

\begin{flushleft}\vspace{0.5in}
Friday 31 March 2017 \\
Instructor: Tom Cuchta
\end{flushleft}

\textbf{Instructions:}
\begin{itemize}
	\item  Show all work, clearly and in order, if you want to get full
	credit. If you claim something is true \textbf{you must show work backing up your claim}. I reserve the right to take off points if I cannot see how you arrived at your answer (even if your final answer is correct).
	\item Justify your answers algebraically whenever possible to ensure full credit. 	
	\item  Circle or otherwise indicate your final answers.
	\item  Please keep your written answers brief; be clear and to the point.
	\item  Good luck!
\end{itemize}
\vspace{-10pt}
$$\cos^2(x) = \dfrac{1+\cos(2x)}{2}\label{doubleanglecosine}$$
$$\sin^2(x) = \dfrac{1-\cos(2x)}{2}\label{doubleanglesine}$$
$$\displaystyle\int \csc(x) \mathrm{d}x = -\ln(\cot(x)+\csc(x)) + C$$
$$\displaystyle\int \sec(x) \mathrm{d}x = \ln(\tan(x)+\sec(x)) + C$$
To integrate $\sin^m(x)\cos^n(x)$...\\
\begin{tabular}{|ll|}
\hline
$m$ odd & $\longrightarrow$ save a sine and convert rest to cosines \\
$n$ odd & $\longrightarrow$ save a cosine and convert rest to sines
both $m$ and $n$ even \\
$m$ even and $n$ even & $\longrightarrow$ convert all to cosines \\
\hline
\end{tabular}\\
\noindent To integrate $\sec^m(x)\tan^n(x)$... \\
\begin{tabular}{|ll|}
\hline
$m$ even & $\longrightarrow$ save a secant squared factor and convert rest to tangents \\
$n$ odd and $m>0$ & $\longrightarrow$ save a secant-tangent factor and convert rest to secants \\
$m=0$, $n$ even & $\longrightarrow$ convert a $\tan^2$ factor into a $\sec^2$ factor, then expand and repeat as necessary \\
$n=0$, $m$ odd & $\longrightarrow$ use integration by parts \\
\hline 
\end{tabular}\\
\\
The trigonometric substitutions are...\\
\begin{tabular}{|ll|}
\hline
$\sqrt{a^2-x^2}$ & $\longrightarrow x=a\sin(\theta)$ \\
$\sqrt{a^2+x^2}$ & $\longrightarrow x=a\tan(\theta)$ \\
$\sqrt{x^2-a^2}$ & $\longrightarrow x=a\sec(\theta)$ \\
\hline
\end{tabular} \\

\end{coverpages}



\begin{questions}





\question[77] Compute the antiderivative.
\begin{parts}
\part[11] $\displaystyle\int xe^{-17x} \mathrm{d}x$\\
\textit{Solution:} Via integration by parts with $u=x$ and $\mathrm{d}v=e^{-17x}\mathrm{d}x$,\\
\begin{align*}
	\int xe^{-17x}\mathrm{d}x&=uv-\int v\mathrm{d}u\\
							&=x\left(-\dfrac{1}{17}e^{-17x}\right)-\int\left(-\dfrac{1}{17}e^{-17x}\right)\mathrm{d}x\\
							&=-\dfrac{1}{17}xe^{-17x}+\dfrac{1}{17}\int e^{-17x}\mathrm{d}x\\
							&=-\dfrac{1}{17}xe^{-17x}-\dfrac{1}{289}e^{-17x} + C.
\end{align*}
\vfill

\part[11] $\displaystyle\int \dfrac{1}{x^3+4x} \mathrm{d}x$\\
\textit{Solution:} First, we use partial fraction decomposition for the integrand. First, we factor $x^3+4x=x\left(x^2+4\right)$. Then our decomposition must be $$\dfrac{1}{x\left(x^2+4\right)}=\dfrac{A}{x}+\dfrac{Bx+C}{x^2+4}$$ $$1=A\left(x^2+4\right)+\left(Bx+C\right)x$$
This leads to the system of equations $$\left\{\begin{array}{lll}A+B&=0&(i)\\ C&=0&(ii)\\4A&=1&(iii)\end{array}\right.$$ From $(ii)$ we have that $C=0$ and from $(iii)$ we have that $A=\frac{1}{4}$. Combining with $(i)$, we get that $B=-\frac{1}{4}$. Thus $$\dfrac{1}{x^3+4x}=\dfrac{1}{4x}-\dfrac{x}{4\left(x^2+4\right)}$$ and we compute
$$\int \dfrac{1}{x^3+4x}\mathrm{d}x =\dfrac{1}{4}\int \dfrac{1}{x}\mathrm{d}x-\dfrac{1}{4}\int\dfrac{x}{x^2+4}\mathrm{d}x.$$

Using $u$-substitution on the second integral with $u=x^2+4$,
$$\dfrac{1}{4}\int \dfrac{1}{x}\mathrm{d}x-\dfrac{1}{4}\int\dfrac{x}{x^2+4}\mathrm{d}x = \dfrac{1}{4}\int \dfrac{1}{x}\mathrm{d}x -\dfrac{1}{8}\int\dfrac{1}{u}\mathrm{d}u=\dfrac{1}{4}\log(x)-\dfrac{1}{8}\log(x^2+4)+C.$$
\vfill
%\part Determine $\displaystyle\int \arctan(x) \mathrm{d}x$ using the fact that $\dfrac{\mathrm{d}}{\mathrm{d}x} \arctan(x)=\dfrac{1}{1+x^2}$.

\part[11] $\displaystyle\int \sin^2(x)\cos^2(x) \mathrm{d}x$\\
\textit{Solution:} 
\begin{align*}
	\int \sin^2(x)\cos^2(x)\mathrm{d}x&=\int \left(\dfrac{1-\cos(2x)}{2}\right)\left(\dfrac{1+\cos(2x)}{2}\right)\mathrm{d}x\\
									&=\dfrac{1}{4}\int\left(1-\cos^2(2x)\right)\mathrm{d}x\\
									&=\dfrac{1}{4}\int 1\mathrm{d}x-\dfrac{1}{4}\int\cos^2(2x)\mathrm{d}x\\
									&=\dfrac{1}{4}x-\dfrac{1}{4}\int\dfrac{1+\cos(4x)}{2}\mathrm{d}x\\
									&=\dfrac{1}{4}x-\dfrac{1}{8}\int 1\mathrm{d}x-\dfrac{1}{8}\int\cos(4x)\mathrm{d}x\\
									&=\dfrac{1}{4}x-\dfrac{1}{8}x-\dfrac{1}{32}\sin(4x)\\
									&=\dfrac{1}{8}x-\dfrac{1}{32}\sin(4x)+C.
\end{align*}
\vfill

\part[11] $\displaystyle\int e^x \cos(x) \mathrm{d}x$\\
\textit{Solution:} Using integration by parts with $u=\cos(x)$ and $\mathrm{d}v=e^x$,
\begin{align}
	\int e^x\cos(x)\mathrm{d}x&=e^x\cos(x)+\int e^x\sin(x)\mathrm{d}x.
\end{align}
Now let $\tilde{u}=\sin(x)$ and $\mathrm{d}\tilde{v}=e^x$ to get that
\begin{align}
	\int e^x\sin(x)\mathrm{d}x&=e^x\sin(x)-\int e^x\cos(x)\mathrm{d}x.
\end{align}
Combining (1) and (2) we have
\begin{align*}
	\int e^x\cos(x)\mathrm{d}x&=e^x\cos(x)+e^x\sin(x)-\int e^x\cos(x)\mathrm{d}x\\
	2\int e^x\cos(x)\mathrm{d}x&=e^x\cos(x)+e^x\sin(x)\\
	\int e^x\cos(x)\mathrm{d}x&=\dfrac{1}{2}e^x\cos(x)+\dfrac{1}{2}e^x\sin(x)+C.
\end{align*}
\vfill

\newpage
\part[11] $\displaystyle\int \tan^3(x)\sec^2(x) \mathrm{d}x$\\
\textit{Solution:}
\begin{align*}
\displaystyle\int \tan^3(x)\sec^2(x) \mathrm{d}x &= \displaystyle\int \sec(x)\tan(x) \sec^3(x) \mathrm{d}x - \displaystyle\int \sec(x)\tan(x) \sec(x) \mathrm{d}x \\
&\stackrel{u=\sec(x)}{=} \displaystyle\int u^3 \mathrm{d}u - \displaystyle\int u \mathrm{d}u \\
&= \dfrac{u^4}{4} - \dfrac{u^2}{2} \\
&= \dfrac{\sec^4(x)}{4} - \dfrac{\sec^2(x)}{2}+C
\end{align*}
\vfill

%\part $\displaystyle\int \sec^6(x) \mathrm{d}x$
\part[11] $\displaystyle\int \dfrac{3}{x\sqrt{9-x^2}} \mathrm{d}x$\\
\textit{Solution:} Let $x=3\sin(\theta)$. Then $\mathrm{d}x=3\cos(\theta)\mathrm{d}\theta$ and 
\begin{align*}
	\dfrac{3}{x\sqrt{9-x^2}}&=\dfrac{3}{3\sin(\theta)\sqrt{9-9\sin^2(\theta)}}\\
							&=\dfrac{1}{3\sin(\theta)\cos(\theta)}.
\end{align*}
Then
\begin{align*}
	\int \dfrac{3}{x\sqrt{9-x^2}} \mathrm{d}x&=\int \dfrac{1}{3\sin(\theta)\cos(\theta)}3\cos(\theta)\mathrm{d}\theta\\
											&=\int \dfrac{1}{\sin(\theta)}\mathrm{d}\theta\\
											&=-\ln\left(\cot(\theta)+\csc(\theta)\right)\\
											&=-\ln\left(\dfrac{\sqrt{9-x^2}}{x}+\dfrac{3}{x}\right) + C
\end{align*}
\vfill

\part[11] $\displaystyle\int \dfrac{x^3}{x-4} \mathrm{d}x$\\
\textit{Solution:}  We use polynomial long division to simplify the integrand:\\

	\polylongdiv{x^3}{x-4}
	
	Thus
\begin{align*}
	\int \dfrac{x^3}{x-4} \mathrm{d}x &= \int \left(x^2+4x+16+\dfrac{64}{x-4}\right)\mathrm{d}x\\
									&=\int\left(x^2+4x+16\right)\mathrm{d}x+64\dfrac{1}{x-4}\mathrm{d}x\\
									&=\dfrac{1}{3}x^3+2x^2+16x+64\log\left(x-4\right)+C.
\end{align*}
\vfill

\end{parts}
\newpage

\question[12] Compute the improper integral.

\begin{parts}
\part[6] $\displaystyle\int_2^{\infty} \dfrac{1}{\sqrt{x}} \mathrm{d}x$\\
\textit{Solution:}
\begin{align*}
	\int_2^{\infty} \dfrac{1}{\sqrt{x}} \mathrm{d}x&=\lim_{b\to\infty} \int_{2}^{b}x^{-1/2}\mathrm{d}x\\
													&=\lim_{b\to\infty} 2x^{1/2}\Bigg|_2^{b}\\
													&=\infty
\end{align*}
so that the integral \textbf{does not converge.}
\vfill

\part[6] $\displaystyle\int_2^{\infty} e^{-x} \mathrm{d}x$\\
\textit{Solution:}
\begin{align*}
	\int_2^{\infty} e^{-x} \mathrm{d}x&= \lim_{b\to\infty} \int_{2}^{b} e^{-x} \mathrm{d}x\\
									&=\lim_{b\to\infty} -e^{-x}\Bigg|_2^{b}\\
									&=\lim_{b\to\infty} \left(e^{-2}-e^{-b}\right)\\
									&=e^{-2}.
\end{align*}
\vfill

\end{parts}

\question[11] Compute the limit.

\begin{parts}
\part[5] $\displaystyle\lim_{x \rightarrow 0} \dfrac{\sin(3x)}{\sin(2x)}$\\
\textit{Solution:}
$$\lim_{x \rightarrow 0} \dfrac{\sin(3x)}{\sin(2x)}\stackrel{\mathrm{L.H.}}{=}\lim_{x \rightarrow 0} \dfrac{3\cos(3x)}{2\cos(2x)}=\dfrac{3}{2}.$$

\vfill

\part[6] $\displaystyle\lim_{x \rightarrow \infty} \dfrac{e^{x^2+1}}{e^{x^2+3x+1}+1}$\\
\textit{Solution:}
\begin{align*}
	\lim_{x \rightarrow \infty} \dfrac{e^{x^2+1}}{e^{x^2+3x+1}+1}&\stackrel{\mathrm{L.H.}}{=}\lim_{x \rightarrow \infty} \dfrac{2xe^{x^2+1}}{(2x+3)e^{x^2+3x+1}}\\
					&=\dfrac{2x}{(2x+3)e^{3x}}\\
					&=0.
\end{align*}
\vfill

\end{parts}

\end{questions}

\end{document}
