\documentclass[leqno,11pt]{article}
 \setlength{\textheight}{10.4in}
 \setlength{\topmargin}{-1in}
 \setlength{\headheight}{0in}
 \setlength{\topsep}{0in}
 \setlength{\marginparwidth}{0in}
 \setlength{\marginparsep}{0in}
 \setlength{\oddsidemargin}{0in}
 \setlength{\evensidemargin}{0in}
 \setlength{\textwidth}{6.4in}
 \setlength{\parskip}{4pt}
 \setlength{\parindent}{0pt}
\usepackage{quiz}
\usepackage{alltt}
\usepackage{../email}
\usepackage{hyperref}
\usepackage{graphicx}
\newif\ifsolutions
 \solutionsfalse

\begin{document}
\section*{Quiz 8}
{\bf Quiz 8, Problem 1}. {\bf Solving Higher Order Constant-Coefficient Equations}

\begin{quote}\sf
{\bf The Algorithm} applies to constant-coefficient homogeneous linear differential equations of order $N$, for example equations like
$$ y'' + 16y=0, \quad y'''' + 4y'' = 0, \quad \frac{d^5y}{dx^5} + 2y''' + y'' = 0.$$
\begin{itemize}
\item[{\bf 1}.] Find the $N$th degree characteristic equation by Euler's substitution $y=e^{rx}$. For instance, $y'' + 16y=0$ has characteristic equation $r^2+16=0$, a polynomial equation of degree $N=2$.
\item[{\bf 2}.] Find all real roots and all complex conjugate pairs of roots satisfying the characteristic equation. List the $N$ roots according to multiplicity.
\item[{\bf 3}.] Construct $N$ distinct Euler solution atoms from the list of roots. Then the general solution of the differential equation is a linear combination of the Euler solution atoms with arbitrary coefficients $c_1,c_2,c_3,\ldots$.

    The solution space is then $S=\SPAN(\mbox{the $N$ Euler solution atoms})$.
\end{itemize}

{\bf Examples}: Constructing Euler Solution Atoms from roots.

Three roots $0,0,0$ produce three atoms $e^{0x}, xe^{0x}, x^2e^{0x}$ or $1,x,x^2$.

Three roots $0,0,2$ produce three atoms $e^{0x},xe^{0x},e^{2x}$.

Two complex conjugate roots $2\pm3i$ produce two atoms $e^{2x}\cos(3x),e^{2x}\sin(3x)$.\begin{quote}\small\sf
{\bf Explained}. The Euler substitution $y=e^{rx}$ produces a solution of the differential equation when $r$ is a complex root of the characteristic equation. Complex exponentials are not used directly. Ever. They are replaced by sines and cosines times real exponentials, which are Euler solution atoms. Euler's formula $e^{i\theta}=\cos\theta+i\sin\theta$ implies $e^{2x}\cos(3x)=e^{2x}\frac{e^{3xi}+e^{-3xi}}{2}=\frac12e^{2x+3xi}+\frac12e^{2x-3xi}$, which is a linear combination of complex exponentials, solutions of the differential equation because of Euler's substitution. Superposition implies $e^{2x}\cos(3x)$ is a solution. Similar for $e^{2x}\sin(3x)$. The independent pair $e^{2x}\cos(3x), e^{2x}\sin(3x)$ replaces both $e^{(2+3i)x}$ and $e^{(2-3i)x}$.
\end{quote}

Four complex conjugate roots listed according to multiplicity as $2\pm3i,2\pm3i$ produce four atoms $e^{2x}\cos(3x),e^{2x}\sin(3x)$, $xe^{2x}\cos(3x),xe^{2x}\sin(3x)$.

Seven roots $1,1,3,3,3,\pm3i$ produce seven atoms $e^x,xe^x,e^{3x},xe^{3x}, x^2e^{3x}, \cos(3x),\sin(3x)$.

Two conjugate complex roots $a\pm bi$ ($b>0$) arising from roots of $(r-a)^2+b^2=0$ produce two atoms $e^{ax}\cos(bx),e^{ax}\sin(bx)$.
\end{quote}

\section*{The Problem}
Solve for the general solution or the particular solution satisfying initial conditions.

(a) \quad $y'' + 4y' = 0$

(b) \quad $y'' + 4y=0$

(c) \quad $y''' + 4y'=0$

(d) \quad $y'' + 4y=0$, $y(0)=1$, $y'(0)=2$

(e) \quad $y'''' + 81y''=0$, $y(0)=y'(0)=0$, $y''(0)=y'''(0)=1$

(f) \quad The characteristic equation is $(r+1)^2(r^2-1)=0$.

(g) \quad The characteristic equation is $(r-1)^2(r^2-1)^2((r+1)^2+9)=0$.

(h) \quad The characteristic equation roots, listed according to multiplicity, are $0,0,-1,2,2,3+4i,3-4i,3+4i,3-4i$.

\rule{\textwidth}{0.5ex}
\vfill\newpage
\rule{\textwidth}{0.5ex}
{\bf Quiz 8, Problem 2}. {\bf Laplace Theory}

\begin{quote}\Large\sf
Laplace theory implements the {\em method of quadrature} for higher order differential equations, linear systems of differential equations, and certain partial differential equations.

Laplace's method {\bf solves differential equations}.
\end{quote}

{\bf The Problem}. Solve by table methods or Laplace's method.

\begin{itemize}
\item[{\bf (a)}]
Forward table. Find $\L(f(t))$ for $f(t)= 3(t+1)^2e^{2t} + 2e^t\sin(3t)$.

\item[{\bf (b)}]
Backward table. Find $f(t)$ for $$\L(f(t))= \dd\frac{4s}{s^2+4} + \frac{s-1}{s^2 - 2s + 5}.$$

\item[{\bf (c)}]
Solve the initial value problem $x''(t) + 2x'(t) + 5 x(t) = e^t$, $x(0)=0$, $x'(0)=1$.

\end{itemize}

\ifsolutions
{\bf Solution (a)}.

$$\begin{array}{lcll}
\L(f(t))&=& \L(3(t+1)^2e^{2t} + 2e^t\sin(3t))& \\
        &=& 3\L((t+1)^2e^{2t}) + 2\L(e^t\sin(3t)) & \mbox{Linearity} \\
        &=& 3\left.\L((t+1)^2)\right|_{s=s-2} +2\left.\L(\sin(3t))\right|_{s=s-1} & \mbox{Shift rule twice} \\
        &=& 3\left.\L(t^2+2t+1)\right|_{s=s-2} +2\left.\L(\sin(3t))\right|_{s=s-1} & \mbox{Expand $(t+1)^2$} \\
        &=& 3\left.\frac{2}{s^3}+\frac{2}{s^2}+\frac{1}{s}\right|_{s=s-2} +2\left.\frac{3}{s^2+9}\right|_{s=s-1} & \mbox{Forward table} \\
        &=& 3\left(\frac{2}{(s-2)^3}+\frac{2}{(s-2)^2}+\frac{1}{s-2}\right) +\frac{6}{(s-1)^2+9} & \mbox{Apply shifts}
        \end{array}
        $$

{\bf Solution (b)}.

$$
\begin{array}{lcll}
\L(f(t))&=& \frac{4s}{s^2+4} + \frac{s-1}{s^2 - 2s + 5} &  \\
        &=& 4\frac{s}{s^2+4} + \frac{s-1}{(s - 1)^2 + 4} & \mbox{Prep for backward table} \\
        &=& 4\L(\cos 2t) + \frac{s-1}{(s - 1)^2 + 4} & \mbox{backward table} \\
        &=& 4\L(\cos 2t) + \left.\frac{s}{s^2 + 4}\right|{s=s-1} & \mbox{shift rule} \\
        &=& 4\L(\cos 2t) + \left.\L(\cos 2t)\right|{s=s-1} & \mbox{backward table} \\
        &=& 4\L(\cos 2t) + \L(e^t\cos 2t ) & \mbox{shift rule} \\
        &=& \L(4\cos 2t) + e^t\cos 2t) & \mbox{Linearity} \\
  f(t) &=&  4\cos 2t + e^t\cos 2t & \mbox{Lerch's cancel rule}      \end{array}
  $$

{\bf Solution (c)}.

$$
\begin{array}{lcll}
\L(x''(t) + 2x'(t) + 5 x(t)) &=& \L(e^t) & \mbox{$\L$ acts like matrix mult} \\
s\L(x') -x'(0)+ 2s\L(x)-2x(0) + 5\L(x) &=& \L(e^t) & \mbox{Parts rule} \\
s(s\L(x)-x(0)) -x'(0)+ 2s\L(x)-2x(0)+5\L(x) &=& \L(e^t) & \mbox{Parts rule} \\
s^2\L(x)-1+ s\L(x)+5\L(x) &=& \L(e^t) & \mbox{Use $x(0)=0,x'(0)=1$} \\
(s^2+ 2s+5)\L(x) &=& 1+\L(e^t) & \mbox{Collect $\L(x)$ left}
\end{array}
$$
$$
\begin{array}{lcll}
\L(x) &=& \frac{s+\L(e^t)}{(s^2+2s+5)} & \mbox{Isolate $\L(x)$ left} \\[2ex]
\L(x) &=& \frac{s+1/(s-1)}{(s^2+ 2s+5)} & \mbox{Forward table} \\[2ex]
\L(x) &=& \frac{s^2-s+1}{(s-1)(s^2+ 2s+5)} & \mbox{Algebra} \\[2ex]
\L(x) &=& \frac{A}{s-1} + \frac{Bs+C}{s^2+ 2s+5} & \mbox{Partial fractions} \\[2ex]
\L(x) &=& \frac{A}{s-1} + \frac{B(s+1)+C-B}{(s+1)^2+ 4} & \mbox{Prepare for shift} \\[2ex]
\L(x) &=& \frac{A}{s-1} + \left.\frac{B(s)+C-B}{(s)^2+ 4}\right|_{s=s+1} & \mbox{Shift rule} \\[2ex]
\L(x) &=& A\L(e^t) +  \left.\left(B\L(\cos 2t)+\frac{C-B}{2}\L(\sin 2t)\right)\right|_{s=s+1} & \mbox{Backward table} \\[2ex]
\L(x) &=& A\L(e^t) +  B\L(e^{-t}\cos 2t)+\frac{C-B}{2}\L(e^{-t}\sin 2t) & \mbox{Shift rule} \\[2ex]
\L(x) &=& \L(Ae^t + Be^{-t}\cos 2t+\frac{C-B}{2}e^{-t}\sin 2t) & \mbox{Linearity} \\[2ex]
x(t) &=& Ae^t + Be^{-t}\cos 2t+\frac{C-B}{2}e^{-t}\sin 2t & \mbox{Lerch's rule}
\end{array}
$$
The partial fraction problem remains:
$$
\frac{s^2-s+1}{(s-1)(s^2+2s+5)}=
\frac{A}{s} + \frac{Bs+C}{s^2+2s+5}
$$
This problem is solved by clearing the fractions, then swapping sides of the equation, to obtain
$$
A(s^2+ 2s+5) + (Bs+C)(s-1) = s^2-s+1.
$$
Substitute three values for $s$ to find 3 equations in 3 unknowns $A,B,C$:
$$
\begin{array}{llcl}
s=0 &  5A-C &=& 1 \\
s=1 & 8 A &=& 1 \\
s=-1 & 4 A + 2B - 2C &=& 3
\end{array}
$$
Then $A=1/8, B=7/8, C=-3/8$ and finally
$$x(t)= Ae^t + Be^{-t}\cos 2t+\frac{C-B}{2}e^{-t}\sin 2t = \frac18e^t-\frac{1}{8}e^{-t}\cos 2t + \frac{3}{8}e^{-t}\sin 2t.$$

\subsection*{Answer Checks}
\begin{verbatim}
# Quiz 8
# Problem 2
# answer check problem 2(a)
f:=3*(t+1)^2*exp(2*t)+2*exp(t)*sin(3*t);
with(inttrans): # load laplace package
laplace(f,t,s);
convert(%,parfrac,s);
# answer check problem 2(b)
F:=4*s/(s^2+4)+(s-1)/(s^2-2*s+5);
invlaplace(F,s,t);
# answer check problem 2(c)
x:='x':de:=diff(x(t),t,t)+2*diff(x(t),t)+5*x(t)=exp(t);
ic:=x(0)=0,D(x)(0)=1;
dsolve([de,ic],x(t));
# answer check problem 2(c), partial fractions
convert((s^2-s+1)/((s-1)*(s^2+2*s+5)),parfrac,s);
\end{verbatim}

%The output appears on the next page
\newpage
\noindent
\includegraphics[scale=0.95]{quiz-11-answer-check-crop1.pdf}
\fi

\end{document}
\endinput
