\documentclass[12pt]{article}
\usepackage{linalg}
\setlength{\oddsidemargin}{0in} \setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.4in} \setlength{\textheight}{8.5in}
\setlength{\parskip}{5pt} \setlength{\topmargin}{0pt}
\setlength{\parindent}{0pt}
%\newenvironment{exercises}{\begin{list}{}{}}{\end{list}}
\newenvironment{solution}[1]{\protect\par{\bf Notes on Problem #1}.~\small\rm}{\protect\par\normalsize\rm}
%\long\def\answer#1{\begin{quote}\sf {\large\sf Answer:}\par #1\end{quote}}
\long\def\answer#1{}
\def\SeparatedPages#1{#1}
%\def\SeparatedPages#1{}
\def\prob#1#2{\item[{\normalsize\bf #1}] {\bf #2}}
%\def\L{{\cal L}}
%\def\dd{\displaystyle}
\def\BF#1{{\bf #1}}
\newif\ifsolutions
\solutionsfalse

\begin{document}
\thispagestyle{empty} 
%{\large\bf Name}.
%\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
%\hfill%{\large\bf Section}. \underline{~~~~~~~~~~~~~~~~~}
\def\EJECT{\SeparatedPages{\vfill Use this page to start your solution.
Attach extra pages as needed, then staple.\eject
\thispagestyle{empty} {\large\bf Name}.
\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} \hfill
S2009 Midterm 2, 2280 8:35}}
\def\EJECTEND{\SeparatedPages{\vfill Use this page to start your solution.
Attach extra pages as needed, then staple.\eject}}

\begin{center}\Large\bf
Differential Equations 2280\\
Midterm Exam 2\\
Wednesday, 1 April 2009
\end{center}

{\bf Instructions}: This in-class exam is 50 minutes. No
calculators, notes, tables or books. 

{\large\bf Do four problems only}. The problems should be those
that you did not do on 25 March 2009.

No answer check is expected.
Details count $75$\%. The answer counts $25$\%.

\EJECT

\begin{exercises}
\prob{1.}{(ch3)} ~\newline
Using Euler's theorem on atoms and the characteristic equation for
higher order constant-coefficient differential equations, solve
(a), (b), (c) and (d).

(a) [25\%] Find a homogeneous constant-coefficient differential equation with
           solutions $2e^{-x}$, $e^{-x}-e^{2x/3}$, $e^{-x}+e^{x}$.

(b) [25\%] Solve $y^{(6)} + 2y^{(5)}+ 5y^{(4)} = 0$.

(c) [25\%] Given characteristic equation 
 $ r(r+4)(r^3+4r^2)^3(r^2+4r+5)=0$, solve the differential equation.

(d) [25\%] Given $4x''(t) + 12x'(t) + 73x(t) = 0$, which
represents an unforced damped spring-mass system with $m=4$, $c=12$, $k=73$.
 Solve the differential equation [15\%]. Classify the answer as
over-damped, critically damped or under-damped [5\%]. Illustrate
in a drawing of the physical model the meaning of constants $m$, $c$, $k$
[5\%].
% expand((2*r+3+8*I)*(2*r+3-8*I));
\ifsolutions
\begin{solution}{1} ~\newline
Part (a)\newline
 {\bf 1}: $r^2+r+1=0$, $y=c_1y_1+c_2y_2$, $y_1=e^{-x/2}\cos(\sqrt3
x/2)$, $y_2=e^{-x/2}\sin(\sqrt3 x/2)$.\newline
 {\bf 2}: $r^{iv}+4r^2=0$, roots $r=0,0,2i,-2i$. Then
 $y=(c_1+c_2x)e^{0x}+c_3\cos 2x + c_4\sin 2x$. \newline
 {\bf 3}: Write as $(r-a)^2(r+a)^2(r^2+16)^3=0$ where $a=\sqrt3$.
 Then $y=u_1e^{ax}+u_2e^{-ax}+u_3\cos 4x + u_5\sin 3x$. The
 polynomials are $u_1=c_1+c_2x$, $u_2=c_3+c_4x$,
 $u_3=c_5+c_6x+c_7x^2$, $u_4=c_8+c_9x+c_{10}x^2$.

Part (b)\newline
Use $4r^2+4r+1=0$ and the quadratic formula to obtain roots
$r=-1/2,-1/2$. Case 2 of the recipe gives $y=(c_1+c_2t)e^{-t/2}$.
This is critically damped. The illustration shows a spring,
dampener and mass with labels $k$, $c$, $m$, $x$ and the
equilibrium position of the mass.
\end{solution}
\fi

\end{exercises}
\EJECT

\begin{exercises}
\prob{2.}{(ch3)} ~\newline
(a) [25\%] The trial solution $y$ with fewest atoms, according to the
method of undetermined coefficients, contains no solution of the
homogeneous equation. Explain why $y= d_1x^2 + d_2x^3$ is a
trial solution with fewest atoms for $y'' = x$.

(b) [75\%] Determine for $ y^{(4)} + 4y^{(2)} = x^3 +
2e^{4x}+5\sin 2x$ the corrected trial solution for $y_p$ according
to the method of undetermined coefficients. 
Do not evaluate the
undetermined coefficients! The trial solution should be the one with
fewest atoms.



%(b) [40\%] The corrected trial solution in undetermined coefficients for
%$y^{(4)}(t)+y''(t)=t- \sin t$ can be constructed from $T(s)\L(t - s\sin
%t)$ where $T(s)$ is the transfer function. Show the Laplace and partial
%fraction details necessary to obtain the corrected trial solution. 
%
%Note 1. Don't find $y_p(t)$ -- find the trial solution with symbols
%$d_1$, $d_2$, \ldots.
%
%Note 2. Certain partial fraction terms are removed before forming the trial
%solution. Document where it happens, but don't explain why.

\ifsolutions
\begin{solution}{2} ~\newline
The homogeneous solution is $y_h=c_1+c_2x+c_3e^{3x}+c_4e^{-3x}$,
because the characteristic polynomial has roots $0$, $0$, $3$,
$-3$.

{\bf \fbox{1}~} An initial trial solution $y$ is constructed for
atoms $1$, $x$, $e^{3x}$, $e^{-3x}$, $\cos x$, $\sin x$ giving
$$\begin{array}{lcl}
 y &=& y_1+y_2+y_3+y_4,\\
 y_1 &=& (d_1+d_2x)e^{3x},\\
 y_2 &=& d_3+d_4x+d_5x^2+d_6x^3,\\
 y_3 &=& d_7e^{-3x},\\
 y_4 &=& d_8\cos x + d_9\sin x.
\end{array}
$$
Linear combinations of the listed independent atoms are supposed
to reproduce, by assignment of constants, all derivatives of the
right side of the differential equation.

{\bf \fbox{2}~} The fixup rule is applied individually to each of
$y_1$, $y_2$, $y_3$, $y_4$ to give the \BF{corrected trial
solution}
$$\begin{array}{lcl}
y &=& y_1+y_2+y_3,\\
 y_1 &=& x(d_1+d_2x)e^{3x},\\
 y_2 &=& x^2(d_3+d_4x+d_5x^2+d_6x^3),\\
 y_3 &=& x(d_7e^{-3x}),\\
 y_4 &=& d_8\cos x + d_9\sin x.
\end{array}
$$
The powers of $x$ multiplied in each case are designed to
eliminate terms in the initial trial solution which duplicate
atoms appearing in the homogeneous solution $y_h$. The factor is
exactly $x^s$ of the Edwards-Penney table, where $s$ is the
multiplicity of the characteristic equation root $r$ that produced
the related atom in the homogeneous solution $y_h$. By design,
unrelated atoms are unaffected by the fixup rule, and that is why
$y_4$ was unaltered.

{\bf \fbox{3}~} Undetermined coefficient step skipped, according
to the problem statement.

{\bf \fbox{4}~} Undetermined coefficient step skipped, according
to the problem statement.


\end{solution}
\fi

\end{exercises}
\EJECT

\begin{exercises}        
\prob{3.}{(ch3 and ch7)} ~\newline
(a) [50\%] Find by any applicable method
the steady-state periodic solution for the current equation $
I'' + 2I' + 5I = -10\sin(t)$.
\newline
(b) [50\%] Find by variation of parameters a particular solution $y_p$ for the equation
$y''=1-x$. Show all steps in variation of parameters. Check the answer
by quadrature.

\ifsolutions
\begin{solution}{3} ~\newline
Solve $x''+2x'+6x=0$ by the recipe to get $x_h=c_1x_1+c_2x_2$,
$x_1=e^{-t}\cos\sqrt5 t$, $x_2=e^{-t}\sin\sqrt5 t$.  Compute the
Wronskian $W=x_1x_2'-x_1'x_2=\sqrt5 e^{-2t}$. Then for
$f(t)=5\cos(3t)$,
$$
 x_p=x_1\int x_2\frac{-f}{W}dt+x_2\int x_1\frac{f}{W}dt.
 $$
 The integrations are horribly difficult, so the
 method of choice is undetermined coefficients.

The trial solution is $x=d_1\cos 3t + d_2\sin 3t$. Substitute the
trial solution to obtain the answers $d_1=-1/3$, $d_2=2/3$. The
unique periodic solution $x_{\mbox{ss}}$ is extracted from the
general solution $x=x_h+x_p$ by crossing out all negative
exponential terms (terms which limit to zero at infinity). If
$x_p=d_1\cos 3t + d_2\sin 3t = (1/3)(-\cos 3t + 2\sin 3t)$, then
$$
x_{\mbox{ss}}=\frac{-1}{3}\cos 3t + \frac{2}{3}\sin 3t.
$$
\end{solution}
\fi

\end{exercises}
\EJECT

\begin{exercises}        
\prob{4.}{(ch7)} ~\newline
(a) [50\%] Solve by Laplace's method
$x'' + 2x' + x = e^t$, $x(0)=x'(0)=0$.

(b) [25\%] Assume $f(t)$ is of exponential order. Find $f(t)$ in the relation
$$\dd\left.\frac{d}{ds}\L(f(t))\right|_{s \to (s-3)}=\L(f(t)-t).$$

(c) [25\%] Derive an integral formula for $y(t)$ by Laplace transform
methods from
$$y''(t)+4y'(t)+4y(t)=f(t),\quad y(0)=y'(0)=0.$$

\end{exercises}
\EJECT           

\begin{exercises}
\prob{5.}{(ch7)} ~\newline
  (a) [30\%] Solve $\L(f(t))=\dd\frac{1}{(s^2+s)(s^2-s)}$ for $f(t)$.
  \newline
  (b) [20\%] Solve for $f(t)$ in the equation
  $\L(f(t))= \dd \frac{s+1}{s^2+4s+5}$.
  \newline
   (c) [20\%] Let $u(t)$ denote the unit step. Solve for $f(t)$ in the
   relation
  $$\L(f)=\dd\frac{d}{ds}\L(u(t-1)\sin 2t)$$
   (d) [30\%] Compute $\L(e^{2t}f(t))$ for
  $$f(t)=\dd\frac{e^t-e^{-t}}{t}.$$


\end{exercises}
\EJECTEND


\end{document}
\endinput
\begin{exercises}
\prob{4.}{(ch5)} ~\newline
 The eigenanalysis method says that the system
$\.x' = A\.x$ has general solution $\.x(t)=c_1\.v_1e^{\lambda_1
t}+c_2\.v_2e^{\lambda_2 t}+c_3\.v_3e^{\lambda_3 t}$. In the
solution formula, $(\lambda_i,\.v_i)$, $i=1,2,3$, is an eigenpair
of $A$.  Given
$$A=\left[\begin{array}{rrr}
 5 & 1 &  1  \\
 1 & 5 &  1  \\
 0 & 0 &  7
 \end{array}\right],$$
 then \newline
 (a) [75\%] Display eigenanalysis details for $A$. \newline
 (b) [25\%] Display the solution $\.x(t)$ of $\.x'(t)=A\.x(t)$.


\ifsolutions
\begin{solution}{4} ~\newline
Answer (1): The eigenpairs are
$$
 5,  \colvector{1\\ 1\\ 0};\quad 4, \colvector{-1\\ -1\\ 1};\quad
  3, \colvector{1\\ -1\\ 0}.
$$
Answer (2): The eigenanalysis method implies
$$
\.x(t)=c_1e^{5t}  \colvector{1\\ 1\\ 0}+ c_2e^{ 4t} \colvector{-1\\ -1\\
1}+ c_3e^{3t} \colvector{1\\ -1\\ 0}.
$$
\end{solution}
\fi


\end{exercises}
\EJECT

\begin{exercises}
\prob{5.}{(ch5)} ~\newline
(a) [40\%]  Find the eigenvalues of the matrix
$A=\left[\begin{array}{rrrr}
 4 & 1 & -1 & 0 \\
 1 & 4 & -2 & 1 \\
 0 & 0 &  2 & 0 \\
 0 & 0 &  2 & 4
 \end{array}\right]$.
%with(linalg):
%B:=matrix([[4,1,-1,0],[1,4,-2,1],[0,0,2,0],[0,0,2,4]]);
%eigenvals(B);
%dsolve({diff(y(x),x)=2*y(x),y(0)=1},y(x));
%dsolve({diff(y(x),x)=3*y(x)+exp(2*x),y(0)=0},y(x));
%dsolve({diff(y(x),x)=4*y(x)+(-exp(-x)+1)*exp(3*x),y(0)=0},y(x));
%dsolve({diff(y(x),x)=5*y(x)+(1/2*exp(-2*x)-exp(-x)+1/2)*exp(4*x),y(0)=0},y(x));

(b) [60\%] Display the general solution of $\.u'=A\.u$ according to Putzer's
spectral formula. Don't expand matrix products, in order to save time.
However, do compute the coefficient functions $r_1$, $r_2$, $r_3$, $r_4$.
 The correct answer for $r_4$, using $\lambda$ in increasing magnitude,
is 
$ y(x) = -\frac16 e^{2x}+\frac12 e^{3x}-\frac12 e^{4x}+\frac16 e^{5x}$.

\ifsolutions
\begin{solution}{5} ~\newline
(a) Subtract $\lambda$ from the diagonal elements of $A$ and expand
the determinant $\det(A-\lambda I)$ to obtain the characteristic
polynomial $(1-\lambda)(1-\lambda)(4-\lambda)(1-\lambda)=0$. The
eigenvalues are the roots: $\lambda=1,1,1,4$. Used here was the
{\em cofactor rule} for determinants. Sarrus' rule does not apply
for $4\times 4$ determinants (an error) and the triangular rule
likewise does not directly apply (another error).

% exp(t), t*exp(t), 1/2*t^2*exp(t), 
% 1/27*exp(4*t)-1/27*exp(t)-1/9*t*exp(t)-1/6*t^2*exp(t)])

(b) Let
$$B=\left[\begin{array}{rrrr}
 1 & 0 & 0 & 0 \\
 1 & 1 & 0 & 0 \\
 0 & 1 &  1 & 0 \\
 0 & 0 &  1 & 4
 \end{array}\right].$$
Define functions $r_1$, $r_2$, $r_3$, $r_4$ to be the components of the
vector solution $\.r(t)$ to the initial value problem 
$$\.r'=B\.r,\quad \.r(0)=\colvector{1\\ 0\\ 0\\ 0}.$$
Solving, 
$$ r_1=e^t,\quad r_2=te^t, \quad r_3=t^2e^t/2,$$
$$ r_4=\frac{1}{27}e^{4t} - \frac{1}{27}e^t - \frac{1}{9}te^t - \frac{1}{6}t^2e^t.$$
Define
$$P_1=I,\quad P_2=A-I,\quad P_3=(A-I)^2, \quad P_4=(A-I)^3.$$
Then $ \.u=\left(r_1P1+r_2P_2+r_3P_3+r_4P_4\right)\.u_0$ implies
$$ \.u=\left(r_1I+r_2(A-I)+r_3(A-I)^2+r_4(A-I)^3\right)\.u_0$$
\end{solution}
\fi
\end{exercises}
\EJECTEND
