\documentclass[10pt,addpoints]{exam}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{enumerate}
\usepackage{circuitikz}
\pagestyle{head}

\renewcommand*{\arraystretch}{2}

\begin{document}
\begin{coverpages}
\begin{center}\huge MATH 1586 - EXAM 1 - SPRING 2018\\
SOLUTION
\end{center}
\begin{flushleft}\vspace{0.5in}
9 February 2018 \\
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}
\end{coverpages}

\begin{questions}

\question[18] Calculate
\begin{parts}
\part[9] $\displaystyle\int 5x^{17}+ 3x^2-x+1 \mathrm{d}x$ \\
\textit{Solution}: Calculate
\[  \displaystyle\int 5x^{17}+3x^2-x+1 \mathrm{d}x = \dfrac{5x^{18}}{18} + x^3 - \dfrac{x^2}{2} + x + C. \]
\part[9] $\displaystyle\int_3^8 w^2+3 \mathrm{d}w$ \\
\textit{Solution}: Calculate
\[ \begin{array}{ll}
\displaystyle\int_3^8 w^2+3 \mathrm{d}w &= \dfrac{w^3}{3} + 3w \Big|_3^8 \\
&= \left( \dfrac{8^3}{3} + 3(8) \right) - \left( \dfrac{3^3}{3} + 3(3) \right) \\
&= \left( \dfrac{512}{3} + 24 \right) - \left( \dfrac{27}{3} + 9 \right) \\ 
\end{array} \]
\end{parts}

\question[18] Calculate the integral using a $u$-substitution.
\begin{parts}
\part[9] $\displaystyle\int q^2 e^{q^3-1} \mathrm{d}q$ \\
\textit{Solution}: Let $u=q^3-1$, then $\mathrm{d}u=3q^2 \mathrm{d}u$, so $\dfrac{1}{3} \mathrm{d}u = q^2 \mathrm{d}q$. Thus, compute
\[ \begin{array}{ll}
\displaystyle\int q^2 e^{q^3-1} \mathrm{d}q &= \dfrac{1}{3} \displaystyle\int e^u \mathrm{d}u \\
&= \dfrac{1}{3} e^u + C \\
&= \dfrac{1}{3} e^{q^3-1} + C.
\end{array} \]
\part[9] $\displaystyle\int \dfrac{1}{3z-4} \mathrm{d}z$ \\
\textit{Solution}: Let $u=3z-4$ so $\mathrm{d}u=3\mathrm{d}z$, hence $\dfrac{1}{3} \mathrm{d}u = \mathrm{d}z$. Compute
\[ \begin{array}{ll}
\displaystyle\int \dfrac{1}{3z-4} \mathrm{d}z &= \dfrac{1}{3} \displaystyle\int \dfrac{1}{u} \mathrm{d}u \\
&= \dfrac{1}{3} \ln(u) + C \\
&= \dfrac{1}{3} \ln(3z-4) + C.
\end{array} \]
\end{parts}

\question[10] Calculate using integration by parts
$$\displaystyle\int xe^{-2x} \mathrm{d}x.$$
\textit{Solution}: Let $u=x$ and $\mathrm{d}v=e^{-2x} \mathrm{d}x$. Then $\mathrm{d}u=\mathrm{d}x$ and $v = -\dfrac{1}{2} e^{-2x}$. Therefore, by integration by parts,
\[\begin{array}{ll}
\displaystyle\int xe^{-2x} \mathrm{d}x &= -\dfrac{x}{2}e^{-2x} + \dfrac{1}{2} \displaystyle\int e^{-2x} \mathrm{d}x \\
&= -\dfrac{x}{2} e^{-2x} - \dfrac{1}{4} e^{-2x} +C.
\end{array}\]

\question[10] Let $f(t)=e^{9t}$. Let $x>9$. Use the definition of the Laplace transform to compute $\mathscr{L}\{f\}(x)$.  \\
\textit{Solution}: By definition,
\[ \begin{array}{ll}
\mathscr{L}\{f\}(x) &= \displaystyle\int_0^{\infty} e^{9t}e^{-xt} \mathrm{d}t \\
&= \displaystyle\lim_{b \rightarrow \infty} \displaystyle\int_0^b e^{t(9-x)} \mathrm{d}t \\
&= \displaystyle\lim_{b \rightarrow \infty} \dfrac{1}{9-x} e^{t(9-x)} \Big|_0^b \\
&= \dfrac{1}{9-x} \displaystyle\lim_{b \rightarrow \infty} \Big[ e^{b(9-x)} - e^0 \Big] \\
&= \dfrac{1}{9-x} (0-1) \\
&= \dfrac{1}{x-9}.
\end{array} \]


\question[16] Recall Newton's law of cooling:
\[\dfrac{\mathrm{d}T}{\mathrm{d}t} = k(T-T_0),\]
where $T$ denotes the temperature at time $t$, $k$ is a proportionality constant, and $T_0$ is the ambient temperature of the surrounding space. 

When a cake is removed from an oven, its temperature is $250^{\circ} F$. 5 minutes later, it is $230^{\circ} F$. How long will it take for the cake to cool down to $90^{\circ} F$ in a room that is $70^{\circ} F$? \\
\textit{Solution}: We are told that $T_0=70$ and two values: $T(0)=250$ and $T(5)=230$. With this information, we know that the differential equation is
\[ \dfrac{\mathrm{d}T}{\mathrm{d}t} = k(T-70). \]
Separate variables in this equation to get
\[ \dfrac{1}{T-70} \mathrm{d}T = k \mathrm{d}t. \]
Integrate both sides to get
\[ \ln(T-70) = kt + C. \]
Plug both sides into $e^x$ to obtain
\[ T-70 = e^{k+C}=C_1e^{kt}, \quad C_1=e^C. \]
Thus we have found
\[ T = 70 + C_1 e^{kt}. \]
To find $C_1$, use the condition $T(0)=250$ to see
\[ \underbrace{250}_{\mathrm{given}} = T(0) = \underbrace{70+C_1e^0}_{\mathrm{calculated}}.\]
Thus since $e^0=1$, we get $180=C_1$. Thus our model is
\[ T = 70 + 180e^{kt}. \]
To find $k$, we use the condition $T(5)=230$ to get
\[ \underbrace{230}_{\mathrm{given}} = T(5) = \underbrace{70+80e^{5k}}_{\mathrm{calculated}}.\]
Solving this for $k$ yields 
\[ \dfrac{1}{5} \ln \left( \dfrac{160}{180} \right)=\dfrac{1}{5} \ln \left( \dfrac{8}{9} \right)=k. \]
Thus our model is 
\[ T = 70 + 80 e^{\frac{1}{5}\ln \left( \frac{8}{9} \right)t}. \]
Finally, we must find the time $t$ for which $T(t)=90$. This means we must solve
\[ \underbrace{90}_{\mathrm{given}} = T(t) = \underbrace{70+80e^{\frac{1}{5}\ln \left( \frac{8}{9} \right)t}}_{\mathrm{calculated}}. \]
Solving for $t$ yields
$$t=5\dfrac{\ln\left( \frac{20}{80} \right)}{\ln \left( \frac{8}{9} \right)}\approx 58.84 \text{ minutes}.$$

\question[28] In a series circuit containing only a resistor ($R$, measured in ohms), an inductor ($L$, measured in henries which are $\mathrm{ohm}\cdot \mathrm{sec}$), and a current at time $t$, $i(t)$ (measured in amps), Kirchoff's second law states that the sum of the voltage drop across the inductor $\left( L \dfrac{\mathrm{d}i}{\mathrm{d}t} \right)$ and the voltage drop across the resistor ($iR$) is the same as the impressed voltage ($E(t)$) on the circuit. We obtain the differential equation for the current $i(t)$
$$L \dfrac{\mathrm{d}i}{\mathrm{d}t} + Ri(t) = E(t),$$
where $L$ and $R$ are constants known as the inductance and resistance.

\begin{figure}[h!]
  \begin{center}
    \begin{circuitikz}
      \draw (0,0)
      to[V,v=$E$] (0,2) % The voltage source
      to[L=$L$] (2,2)
      to[short] (2,0) % The resistor
      to[R=$R$] (0,0);
    \end{circuitikz}
  \end{center}
\end{figure}

A 12-volt electromotive force is applied to a series circuit in which the inductance is $1$ henry and the resistance is $8$ ohms.

\begin{parts}
\part[4] What is the differential equation we must solve here? \\
\textit{Solution}: $\dfrac{\mathrm{d}i}{\mathrm{d}t} + 8 i = 12$
\part[7] Calculate $\dfrac{\mathrm{d}}{\mathrm{d}t} \Big[ e^{8t}i(t) \Big]$. \\
\textit{Solution}: Compute
\[ \dfrac{\mathrm{d}}{\mathrm{d}t} \left[ e^{8t} i(t) \right] = 8e^{8t}i(t) + e^{8t} \dfrac{\mathrm{d}i}{\mathrm{d}t}.\]
\part[7]  Multiply your differential equation on both sides by $e^{8t}$ and then rewrite the left-hand side as $\dfrac{\mathrm{d}}{\mathrm{d}t} \Big[ e^{8t}i(t) \Big]$. \\
\textit{Solution}: We get
\[ \dfrac{\mathrm{d}}{\mathrm{d}t} \left[ e^{8t} i(t) \right] = 12 e^{8t}.\]
\part[10] Solve the differential equation by integrating and solving for $i(t)$.  \\
(\textit{note: we do not find a value of $C$ here because no initial condition was given!})  \\
\textit{Solution}: Integrating on the left cancels the $\dfrac{\mathrm{d}}{\mathrm{d}t}$ yielding
\[e^{8t}i(t) = 12\displaystyle\int e^{8t} \mathrm{d}t=\dfrac{12}{8} e^{8t} + C=\dfrac{3}{2}e^{8t}+C.\]
Thus we have
\[ i(t) = \dfrac{3}{2} + Ce^{-8t}. \]
\end{parts}

\end{questions}

\newpage

\begin{center}\underline{Formulas}\end{center}
If $F(x)$ is an antiderivative of $f(x)$, then
\[\displaystyle\int_a^b f(x) \mathrm{d}x = F(b)-F(a).\]
Integration by parts:
\[ \displaystyle\int u \mathrm{d}v = uv - \displaystyle\int v \mathrm{d}u \]
Improper integral:
\[\displaystyle\int_a^{\infty} f(x) \mathrm{d}x = \displaystyle\lim_{b \rightarrow \infty} \displaystyle\int_a^b f(x) \mathrm{d}x\] 
Antiderivative of $\ln$:
\[\displaystyle\int \ln(x) \mathrm{d}x = x\ln(x)-x+C\]
Laplace transform:
\[\mathscr{L}\{f\}(x)=\displaystyle\int_0^{\infty} f(t)e^{-xt} \mathrm{d}t \]

\end{document}