\documentclass[12pt]{article}
%\pagestyle{empty}
\setlength{\topmargin}{-1in}
\setlength{\oddsidemargin}{-.3in}
\setlength{\textheight}{9in}
\setlength{\textwidth}{7.2in}

\usepackage{amsfonts}


\newcommand{\mbf}{\mathbf}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\ra}{\rightarrow}

\newcommand{\sol}{{\bf Solution: }}
\newcommand{\dx}{\ensuremath{\; dx}}
\newcommand{\dy}{\ensuremath{\; dy}}


\begin{document}

Key for TEST 2


\begin{enumerate}



\item  (10 points)  Find a particular solution to the non-homogeneous differential equation:
\[
y'' + y = 5e^x \sin x
\]
\sol 
Here we use the method of undetermined coefficients.
We first look the homogeneous system and see that the characteristic equation is $r^2+r=0$.
In other words, it has solutions $\pm i$ which means that the solution to the homogeneous
equation is
\[
y_c = c_1\sin x + c_2 \cos x
\]
The solution we are looking for looks like
\[
y_p = e^x(A \sin x + B \cos x)
\]
Notice that none of these terms appears in the complimentary solution.
We plug $y_p$ into the DE and see that we must have $A=1$ and $B=2$.
So, our particular solution is
\[
y_p = e^x(\sin x -2\cos x)
\]

\item  (15 points)  Consider a mass - spring - shock absorber system as in figure 3.4.1 of the book.
This is the standard picture I've drawn many times.
The mass weighs 1 kg and the spring is stretched 2 meters by a force of 20 Newtons.
The shock absorber provides 2 Newtons of resistance for each meter per second of speed of the mass.
Let $x$ be the distance of the mass from its equilibrium position.
\begin{enumerate}
\item  What is the differential equation that represents this set up?
\item  Find the general solution to this system.
\item  Now suppose the mass is acted on by a constant force of 30 Newtons to the left.
What is the new differential equation and its general solution??
\item  Determine (mathematically -- do not use a a physical argument) what the limiting behavior of this system
now is for any initial conditions.  
(Discuss $\lim_{t \ra \infty} x(t)$ for any solution $x(t)$).
\item  Explain this limiting behavior from a physical viewpoint 
(why does the mass-spring system act this way?)
\end{enumerate}
\sol
\begin{enumerate}
\item  $x''+2x'+10x=0$
\item  We just solve the equation $r^2+2r+10=0$ and see that this has solutions $r=-1\pm 3i$.
This means that the general solution to this homogeneous equation is
\[
x_c = e^{-t}(c_1 \cos(3t) +c_2 \sin(3t))
\]
\item  $x''+2x'+10x=-30$.  We find a particular solution.
We try $x_p=A$ and determine that $A=-3$.
Thus we have 
\begin{eqnarray*}
x_p & = & -3 \\
x_c & = & e^{-t}(c_1 \cos(3t) +c_2 \sin(3t)) \\
x & = & x_p + x_c = -3 + e^{-t}(c_1 \cos(3t) +c_2 \sin(3t))
\end{eqnarray*}
\item  To detemine what the limiting behavior, we take the limit:
\begin{eqnarray*}
\lim_{t \ra \infty} x & = &
	-3 + e^{-t}(c_1 \cos(3t) +c_2 \sin(3t)) \\
	& = & -3
\end{eqnarray*}
In other words, we eventually end up with the mass 3 meters to the left of equilibrium.
\item  The damping will eventually stop any oscillations and the constant force will eventually move the spring
3 meters to the left of equilibrium.
This is expected becuase the only force on the spring will be the 30 Newtons.
\end{enumerate}



\item  (15 points)  Consider the following system of differential equations
(where prime (') denotes derivative with respect to $t$):
\begin{eqnarray*}
x'' & = & 6x +12t -7z + 5t\cos t \\
y^{(3)} & = & 87ty+6z' \\
z'' & = & 8t^3z - y' \sin t
\end{eqnarray*}
\begin{enumerate}
\item  Convert this system to a first order system.
\item  Is this first order system linear?  Why or why not?  
Is it homogeneous?  Why or why not?
\end{enumerate}
\sol
\begin{enumerate}
\item  We make the following substitutions:
\begin{eqnarray*}
x_1 & = & x \\
x_2 & = & x_1'=x' \\
y_1 & = & y \\
y_2 & = & y_1'=y' \\
y_3 & = & y_2'=y'' \\
z_1 & = & z \\
z_2 & = & z_1'=z'
\end{eqnarray*}
These substitutions lead to the following system
\begin{eqnarray*}
x_1' & = & x_2 \\
x_2' & = & 6x_1 +12t -7z_1 + 5t\cos t \\
y_1' & = & y_2 \\
y_2' & = & y_3 \\
y_3' & = & 87ty_1+6z_2 \\
z_1' & = & z_2 \\
z_2' & = & 8t^3z_1 - y_2 \sin t
\end{eqnarray*}
\item  This is a linear system.
We can put it into the for
\[
\mbf{X} = \mbf{P}(t)\mbf{X}+\mbf{F}(t)
\]
where
\[
\mbf{X} = 
\left[
\begin{array}{c}
x_1 \\
x_2 \\
y_1 \\
y_2 \\
y_3 \\
z_1 \\
z_2
\end{array}
\right]
\qquad
\mbf{P}(t) =
\left[
\begin{array}{rrrrrrr}
0 & 1 & 0 & 0 & 0 & 0 & 0 \\
6 & 0 & 0 & 0 & 0 & -7 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 87t & 0 & 0 & 0 & 6 \\
0 & 0 & 0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & -\sin t & 0 & 8t^3 & 0
\end{array}
\right]
\qquad
\mbf{F}(t) =
\left[
\begin{array}{c}
0 \\
12t+5t\cos t \\
0 \\
0 \\
0 \\
0 \\
0
\end{array}
\right]
\]
This system is not homogeneous because $\mbf{F} \neq 0$.
\end{enumerate}


\item  (20 points) Consider the system:
\[
t \mbf{X}'=\mbf{A}\mbf{X}
\]
To find a solution to this system, we try the solution $\mbf{x}=\mbf{v}t^r$ where
$\mbf{v}$ is a constant vector and $r \in \R$.
\begin{enumerate}
\item  Find conditions on the constant vector $\mbf{v}$, 
and the scalar $r$ so that choice of $\mbf{x}$ gives a solution.
\item  Apply the procedure above to find the general solution to
\[
t \mbf{X}' = 
\left[
\begin{array}{cc}
5 & -1 \\
3 & 1 
\end{array}
\right] \mbf{X}
\]
\item  Prove that what you found in the previous part is really the general solution.
\\
(What I'm looking for here is an argument appealing to Theorem 3 of section 5.1.)
\end{enumerate}

\sol
\begin{enumerate}
\item  We take $\mbf{x}=\mbf{v}t^r$ and plug it in to the equation:
\begin{eqnarray*}
t\mbf{x}' & = & \mbf{A}\mbf{x} \\
t \mbf{v}{r}t^{r-1} & = & \mbf{A}\mbf{v}t^r \\
\mbf{A}\mbf{v} & = & r \mbf{v}
\end{eqnarray*}
In other words, $\mbf{v}$ is an eigenvector with eigenvalue $r$.
This is the condition.
(Notice that something wrong happens when $r=-1$.)

\item  To solve this, we look for eigenvectors and eigenvalues.
We do the normal stuff to find eigenvalues and eigenvectors and find:
\begin{eqnarray*}
\lambda_1=4  &&  
	v_1 = \left[
	\begin{array}{c}
	1 \\ 1
	\end{array}
	\right] \\
\lambda_2=2  &&  
	v_1 = \left[
	\begin{array}{c}
	1 \\ 3
	\end{array}
	\right]
\end{eqnarray*}
Thus our solutions are
\[
\mbf{x}_1 = 
	\left[	\begin{array}{c} 1 \\ 1	\end{array} \right] t^4
\qquad
\mbf{x}_2 = 
	\left[	\begin{array}{c} 1 \\ 3	\end{array} \right] t^2
\]
Our general solution now looks like
\begin{eqnarray*}
\mbf{x} & = & c_1\mbf{x}_1 + c_2\mbf{x}_2 \\
& = & c_1\left[	\begin{array}{c} 1 \\ 1	\end{array} \right] t^4 + c_2\left[	\begin{array}{c} 1 \\ 3	\end{array} \right] t^2
\end{eqnarray*}

\item  We double check that $\mbf{x}_1$ and $\mbf{x}_2$ are solutions to the system.
We then compute the Wronskian:
\begin{eqnarray*}
W(\mbf{x}_1,\mbf{x_2}) & = & 
\det \left[
\begin{array}{rr}
	t^4 & t^2 \\
	t^4 & 3t^2 
\end{array}
\right] \\
& = & 3t^6-t^6 = 2t^6
\end{eqnarray*}
Thus these are linearly independant for $t \neq 0$.
This is no surprise since the DE looks like $\mbf{X}'=\frac{1}{t}\mbf{A}\mbf{X}$, 
thus we dont really expect good things to happen when $t=0$.
In any case, theorem 3 of section 5.1 says that since $\mbf{x}_1$ and $\mbf{x}_2$ 
are linearly independant solutions,
the $\mbf{x}=c_1\mbf{x}_1+c_2\mbf{x_2}$ is a general solution.
\end{enumerate}


\item  (20 points) Consider the system
\begin{eqnarray*}
\frac{dx}{dt} & = & y-x(x^2+y^2) \\
\frac{dy}{dt} & = & -x-y(x^2+y^2)
\end{eqnarray*}
\begin{enumerate}
\item  Show that $(0,0)$ is an isolated critical point of this system and that 
this is an almost linear system in a neighborhood of $(0,0)$.
\item  What type of critical point is $(0,0)$ of the linear system? (and why of course)
\item  What type of critical point is $(0,0)$ of the non-linear system?
\\
Hints: Note that $r^2=x^2+y^2$.  
As a first step, take the derivative of this implicitly and see if you can show $\frac{dr}{dt}<0$.
\end{enumerate}
\sol
\begin{enumerate}
\item  The system looks like:
\begin{eqnarray*}
\frac{dx}{dt} & = & y + ( -x^3-xy^2) \\
\frac{dy}{dt} & = & -x + (-x^2y-y^3)
\end{eqnarray*}
It should be fairly clear that $(0,0)$ is an isolated critical point.
Perhaps the easiest way to show this is to solve the system of equations:
\begin{eqnarray*}
y-x(x^2+y^2) & = & 0 \\
-x-y(x^2+y^2) & = & 0
\end{eqnarray*}
Letting $r^2 = x^2+y^2$ we see that:
\begin{eqnarray*}
y & = & xr^2 \\
x & = & -yr^2
\end{eqnarray*}
Putting these together gives $y=-yr^4$ and thus we must have $y=0$. 
Using this we see that $x=0$, and therefore, the only critical point is $(0,0)$ which must not be isolated.

To see that the system is almost linear around $(0,0)$ we can write
\begin{eqnarray*}
\frac{dx}{dt} & = & y + f(x,y) \\
\frac{dy}{dt} & = & -x + g(x,y)
\end{eqnarray*}
where $f(x,y)=-x^3-xy^2$ and $g(x,y)=-x^2y-y^3$.
To show that this is almost linear we need to show the following:
\[
\lim_{(x,y) \ra (0,0)} \frac{f(x,y)}{\sqrt{x^2+y^2}} = 0
\qquad
\lim_{(x,y) \ra (0,0)} \frac{g(x,y)}{\sqrt{x^2+y^2}} = 0
\]
Or we need to show that
\[
\lim_{(x,y) \ra (0,0)} \frac{-x(x^2+y^2)}{\sqrt{x^2+y^2}} = 0
\qquad
\lim_{(x,y) \ra (0,0)} \frac{-y(x^2+y^2)}{\sqrt{x^2+y^2}} = 0
\]
But these limits are just
\[
\lim_{(x,y) \ra (0,0)} -x\sqrt{x^2+y^2}
\qquad
\lim_{(x,y) \ra (0,0)} -y\sqrt{x^2+y^2}
\]
which are both clearly 0.  Therefor we have an almost linear system.

\item  The associated linear system is $\mbf{X}'=\mbf{A}\mbf{X}$
where 
\[
\mbf{A}= \left[
\begin{array}{rr}
	0 & 1 \\
	-1 & 0
\end{array}
\right]
\]
This matrix has characteristic equation $\lambda^2+1=0$ and so therefore has eigenvalues $\pm i$.
This means that in the associated linear system, 
$(0,0)$ is a center.

\item  Because $(0,0)$ is a center of the linear system, we cannot tell exactly what type of 
critical point we have for the nonlinear system.
Thus, following my suggestion (there are probably other ways to do this) we see
\[
2r \frac{dr}{dt} = 2x \frac{dx}{dt} + 2y \frac{dy}{dt}
\]
We substitute what was given for $\frac{dx}{dt}$ and $\frac{dy}{dt}$:
\begin{eqnarray*}
\frac{dr}{dt} & = & \frac{1}{r} \left( x \frac{dx}{dt} + y \frac{dy}{dt} \right) \\
& = & \frac{1}{r} \left[ x (y-x(x^2+y^2)) + y (-x-y(x^2+y^2)) \right] \\
& = & -r^3
\end{eqnarray*}
This shows that $\frac{dr}{dt}<0$.
But this does not immediatly imply that we have asymptotic stability.
(We $r$ could always be decreasing, but could limit out at an $r$-value that is $>0$.)
There are many arguements, but the one I like is to actually solve for $r$ by separating variables
\[
\frac{dr}{r^3} = -dt
\]
We can integrate this and see that 
\begin{eqnarray*}
r^2 & = & \frac{1}{2t+C}
\end{eqnarray*}
Taking the limit of this as $t\ra \infty$ we see that $r \ra 0$.
Therefore, we must have asymptotic stability.
Therefore $(0,0)$ must be a stable spiral point.
\end{enumerate}

\item  (20 points)  Consider the system of equations
\begin{eqnarray*}
\frac{dx}{dt} & = & x-x^2-xy \\
\frac{dy}{dt} & = & 3y-xy-2y^2
\end{eqnarray*}
\begin{enumerate}
\item  Determine all critical points of this system.
\item  Determine what type of critical points these all are (proper node, saddle point, etc.)
\item  Determine the stability of each critical point.
\item  Draw a phase portrait for this system.
\end{enumerate}
\sol
\begin{enumerate}
\item  We want to solve the equations:
\begin{eqnarray*}
x(1-x-y) & = & 0 \\
y(3-x-2y) & = & 0
\end{eqnarray*}
Solving gives the critical points
\[
(0,0) \quad \left( 0,\frac{3}{2} \right) \quad (1,0) \quad (-1,2)
\]

\item  To determine what type of critical points these are we translate and look at the linear system:
\begin{enumerate}
\item  $(0,0)$.  No translation necessary.
$A$ for the linear system is
\[
\left[
\begin{array}{rr}
1 & 0 \\
0 & 3 
\end{array}
\right]
\]
This has eigenvalues $1$ and $3$.  Therefore we have an improper unstable node.

\item  $\left( 0,\frac{3}{2} \right)$.  Here we translate $u=x$ and $v=y-3/2$.
This gives the system:
\begin{eqnarray*}
\frac{du}{dt} & = & -\frac{1}{2}u - u^2 -uv \\
\frac{dv}{dt} & = & -\frac{3}{2}u - 3v -uv - 2v^2
\end{eqnarray*}
The $A$ for the associated linear system is
\[
\left[
\begin{array}{rr}
-1/2 & 0 \\
-3/2 & -3 
\end{array}
\right]
\]
This has eigenvalues $-3$ and $-1/2$ and therefore $(0,3/2)$ is an improper stable node.

\item $(1,0)$.  Here we make the substitution $u=x-1$ and $v=y$ giving:
\begin{eqnarray*}
\frac{du}{dt} & = & -u - v -u^2 -uv \\
\frac{dv}{dt} & = & 2v- uv-2v^2
\end{eqnarray*}
The $A$ for the associated linear system is
\[
\left[
\begin{array}{rr}
-1 & -1 \\
0 & 2
\end{array}
\right]
\]
This has eigenvalues $-1$ and $2$ and therefore $(1,0)$ is a (unstable) saddle point.

\item $(-1,2)$.  Here we make the substitution $u=x+1$ and $v=y-2$ giving:
\begin{eqnarray*}
\frac{du}{dt} & = & u+v-u^2-uv \\
\frac{dv}{dt} & = & -2u -4v-uv-2v^2
\end{eqnarray*}
The $A$ for the associated linear system is
\[
\left[
\begin{array}{rr}
1 & 1 \\
-2 & -4
\end{array}
\right]
\]
This has eigenvalues 
\[
-\frac{3}{2} \pm \frac{1}{2}\sqrt{17}
\]
In any case, one of these is positive and the other is negative, so therefore
$(-1,2)$ is a (unstable) saddle point.

\end{enumerate}

\item  As already mentioned we have

\begin{tabular}{|r|r|r|r|}
\hline
Critical Point & Type & Stable? & Asymptotically Stable? \\
\hline
$(0,0)$ & Improper Node & Unstable & No \\
$(0,3/2)$ & Improper Node & Stable & Yes \\
$(1,0)$ & Saddle Point & Unstable & No \\
$(-1,2)$ & Saddle point & Unstalbe & No \\
\hline
\end{tabular}

\item  You can draw the phase diagram or come see me and I'll help you with it.


\end{enumerate}



\end{enumerate}

\end{document}







