\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{mathrsfs}

\begin{document}
\flushleft\underline{Homework 3 --- MATH 1586 Spring 2018} \\
Recall the technique of integration by parts is of the form
\[\displaystyle\int u \mathrm{d}v = uv - \displaystyle\int v \mathrm{d}u.\] 
Also recall that we derived the antiderivative of the natural logarithm using integration by parts:
\[ \displaystyle\int \ln(x) \mathrm{d}x = x\ln(x)-x + C.\]
Recall that an ``improper integral" of the form $\displaystyle\int_a^{\infty}$ or of the form $\displaystyle\int_{-\infty}^b$ is understood in the following way:
\[ \displaystyle\int_a^{\infty} f(x) \mathrm{d}x = \displaystyle\lim_{b \rightarrow \infty} \displaystyle\int_a^b f(x) \mathrm{d}x.\]
and
\[ \displaystyle\int_{-\infty}^b f(x) \mathrm{d}x = \displaystyle\lim_{a \rightarrow -\infty} \displaystyle\int_a^b f(x) \mathrm{d}x.\]
Finally, recall the definition of the Laplace transform of a function $f$:
$$\mathscr{L}\{f\}(x)=\displaystyle\int_0^{\infty} f(t)e^{-xt} \mathrm{d}t.$$
\begin{enumerate}
\item (``RL-Circuit problem")\\
\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}
 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.

A 25-volt electromotive force is applied to a series circuit in which the inductance is $1$ henry and the resistance is $30$ ohms.
$i' + 30i = 25$

\begin{enumerate}[a.)]
\item What is the differential equation we must solve here? \\
\textit{Solution}: $\dfrac{\mathrm{d}i}{\mathrm{d}t}+30i(t)=25$
\item Calculate $\dfrac{\mathrm{d}}{\mathrm{d}t} \Big[ e^{30t}i(t) \Big]$. What do you notice about this compared to the left-hand side of your differential equation? \\
\textit{Solution}: 
$$\dfrac{\mathrm{d}}{\mathrm{d}t} \Big[ e^{30t}i(t) \Big] \stackrel{\mathrm{product \hspace{2pt} rule}}{=} \left( \dfrac{\mathrm{d}}{\mathrm{d}t} e^{30t} \right) i(t) + e^{30t} \dfrac{\mathrm{d}i}{\mathrm{d}t}=30e^{30t}i(t) + e^{30t} \dfrac{\mathrm{d}i}{\mathrm{d}t}.$$
We notice that the derivative here is the same as the left-hand side of the differential equation multiplied with $e^{30t}$. 
\item  Multiply your differential equation on both sides by $e^{30t}$ and then rewrite the left-hand side as $\dfrac{\mathrm{d}}{\mathrm{d}t} \Big[ e^{30t}i(t) \Big]$. \\
\textit{Solution}: We get
$$\dfrac{\mathrm{d}}{\mathrm{d}t} \Bigg[ e^{30t} i(t) \Bigg] = 25e^{30t}.$$
\item Solve the differential equation by integrating and solving for $i(t)$.  \\
\textit{Solution}: Integrating yields
$$\displaystyle\int \dfrac{\mathrm{d}}{\mathrm{d}t} \Bigg[ e^{30t} i(t) \Bigg] \mathrm{d}t = \displaystyle\int 25 e^{30t} \mathrm{d}t.$$
Since the integral of the derivative of a function is the function itself this gives us the left-hand-side. The right-hand side comes from straightforward integration:
$$e^{30t}i(t) = \dfrac{25}{30}e^{30t} + C.$$
Therefore 
$$i(t) = \dfrac{25}{30} + Ce^{-30t}.$$
(\textit{note: we do not find a value of $C$ here because no initial condition was given!}) 
\end{enumerate}

\item Compute $\displaystyle\int_5^{11} xe^x \mathrm{d}x$. \\
\textit{Solution}: Let $u=x$ and $\mathrm{d}v=e^x \mathrm{d}x$. Then $\mathrm{d}u=\mathrm{d}x$ and $v=e^x$. Therefore by integration by parts:
$$\displaystyle\int xe^x \mathrm{d}x = xe^x - \displaystyle\int e^x \mathrm{d}x = xe^x - e^x.$$
Thus we may compute
$$\displaystyle\int xe^x \mathrm{d}x = xe^x-e^x \Bigg|_5^{11} = \left( 11e^{11}-e^{11} \right) - \left( 5e^5 - e^5 \right).$$

\item Compute $\displaystyle\int x^2 e^x \mathrm{d}x$. \\
\textit{Solution}: Let $u=x^2$ and $\mathrm{d}v=e^x \mathrm{d}x$. Then $\mathrm{d}u=2x \mathrm{d}x$ and $v=e^x$. Thus by integration by parts,
$$\displaystyle\int x^2 e^x \mathrm{d}x = x^2 e^x - 2\displaystyle\int xe^x \mathrm{d}x.$$
To compute $\displaystyle\int xe^x \mathrm{d}x$ we must do integration by parts again. Let $u_2=x$ and $\mathrm{d}v_2=e^x \mathrm{d}x$. Then $\mathrm{d}u_2=\mathrm{d}x$ and $v_2=e^x$. Hence
$$\displaystyle\int xe^x \mathrm{d}x = xe^x - \displaystyle\int e^x \mathrm{d}x = xe^x - e^x + C.$$
Therefore we have shown that
$$\displaystyle\int x^2 e^x \mathrm{d}x = x^2e^x - 2 \left(xe^x-e^x \right) + C_1, \quad C_1=2C.$$

\item Compute $\displaystyle\int (2x+3)e^{2x} \mathrm{d}x$. \\
\textit{Solution}: Let $u=2x+3$ and $\mathrm{d}v=e^{2x} \mathrm{d}x$. Then $\mathrm{d}u=2 \mathrm{d}x$ and $v=\dfrac{1}{2}e^{2x}$. Using integration by parts, we compute
$$\displaystyle\int (2x+3)e^{2x} \mathrm{d}x = (2x+3)\dfrac{e^{2x}}{2} - \dfrac{2}{2}\displaystyle\int e^{2x} \mathrm{d}x=\dfrac{(2x+3)e^{2x}}{2} - \dfrac{1}{2}e^{2x} + C.$$

\item Compute $\displaystyle\int_2^3 \ln(x) \mathrm{d}x$. \\
\textit{Solution}: We know already that $\displaystyle\int \ln(x) \mathrm{d}x = x\ln(x)-x+C$. Use that to compute
$$\displaystyle\int_2^3 \ln(x) \mathrm{d}x = x\ln(x)-x \Bigg|_2^3 = (3\ln(3)-3)-(2\ln(2)-2).$$

\item Let $f(t)=e^{7t}$. 
\begin{enumerate}
\item What integral must you solve in order to calculate $\mathscr{L}\{f\}(x)$ (for $x>7$)? \\
\textit{Solution}: We must calculate
$$\mathscr{L}\{f\}(x) = \displaystyle\int_0^{\infty} e^{7t} e^{-xt} \mathrm{d}t.$$
\item Calculate $\mathscr{L}\{f\}(x)$ as an improper integral. \\
\textit{Solution}: Calculate for $x>7$,
$$\begin{array}{ll}
\mathscr{L}\{f\}(x) &= \displaystyle\int_0^{\infty} e^{7t} e^{-xt} \mathrm{d}t \\
&= \displaystyle\lim_{b \rightarrow \infty} \displaystyle\int_0^b e^{(7-x)t} \mathrm{d}t \\
&\stackrel{u=(7-x)t,\frac{1}{7-x}\mathrm{d}u=\mathrm{d}t}{=} \displaystyle\lim_{b  \rightarrow \infty} \dfrac{1}{7-x} \displaystyle\int_{t=0}^{t=b} e^u \mathrm{d}u \\
&=\dfrac{1}{7-x} \displaystyle\lim_{b \rightarrow \infty}  e^{(7-x)t} \Bigg|_0^b \\
&=\dfrac{1}{7-x} \displaystyle\lim_{b \rightarrow \infty}  \Bigg[e^{(7-x)b}-1  \Bigg]  \\
&= \dfrac{-1}{7-x} \\
&= \dfrac{1}{x-7}.
\end{array}$$
Note that the limit of $e^{(7-x)b}$ tends to zero since whenever $x>7$ we have $7-x<0$. 
\end{enumerate}

\item Let $f(t)=t$. 
\begin{enumerate}
\item Let $x>0$. What integral must you solve in order to calculate $\mathscr{L}\{f\}(x)$? \\
\textit{Solution}: $\displaystyle\int_0^{\infty} te^{-xt} \mathrm{d}t$
\item Calculate $\mathscr{L}\{f\}(x)$ using integration by parts and improper integration. \\
\textit{Solution}: Let $u=t$ and $\mathrm{d}v=e^{-xt}$. Then $\mathrm{d}u=\mathrm{d}t$ and $v=-\dfrac{1}{x} e^{-xt}$. So,
$$\displaystyle\int te^{-xt} \mathrm{d}t = -\dfrac{t}{x}e^{-xt} - \displaystyle\int \left(- \dfrac{1}{x} \right) e^{-xt} \mathrm{d}t =\dfrac{-te^{-xt}}{x} - \dfrac{e^{-xt}}{x^2}$$
Therefore we see that
$$\begin{array}{ll}
\displaystyle\int_0^{\infty} te^{-xt} \mathrm{d}t &= \displaystyle\lim_{b \rightarrow \infty} \displaystyle\int_0^b te^{-xt} \mathrm{d}t \\
&= \displaystyle\lim_{b \rightarrow \infty} -te^{-xt}- \dfrac{e^{-xt}}{x^2} \Bigg|_0^b \\
&= \displaystyle\lim_{b \rightarrow \infty} \left( -be^{-xb} - \dfrac{e^{-xb}}{x^2} \right) - \left( 0 - \dfrac{1}{x^2} \right) \\
&= \dfrac{1}{x^2}.
\end{array}$$
\end{enumerate}

\end{enumerate}
\end{document}