\magnification=\magstep1
\centerline{Mathematics 304 -- Ordinary Differential Equations}
\centerline{Problem Set 2 -- Selected Solutions}
\centerline{September 20, 2004}
\bigskip
\noindent
From the Text:  Chapter 1/3c.  The problem asks for the bifurcation diagram for
the family of ODE $x' = x^3 - x + a$.  The graph $y = x^3 - x$ (the right side
with $a = 0$) has $x$-intercepts (corresponding to equilibrium
solutions of the ODE) at $x = -1, 0, 1$.  The shape is that of the standard
cubic polynomial graph with two turning points (note $y \to +\infty$ as $x \to +\infty$
since the $x^3$ term has a positive coefficient).  The turning points (local max and min)
are located at $(-1/\sqrt{3}, 2/\sqrt{3})$ and $(1/\sqrt{3}, -2/\sqrt{3})$
The effect of the $+a$ on 
the right is to shift this graph up or down by $a$ units in the $(x,y)$-plane.
If $a = 2/\sqrt{3}$, then the graph is shifted up just enough to produce a
double root at $x = 1/\sqrt{3}$ (the ODE has two equilibria), and 
if $a > 2/\sqrt{3}$, the shifted graph only crosses
the $x$-axis once, with a negative $x$-intercept (and the ODE has just one 
equilibrium solution).  On the other hand, if
$a = -2/\sqrt{3}$, then the graph is shifted down enough so that it 
is tangent to the $x$-axis at $x = -1/\sqrt{3}$ (the ODE has two equilibria).
For $a < -2/\sqrt{3}$, the graph only crosses
the $x$-axis once, with a positive $x$-intercept.  Here's a rough sketch of the 
bifurcation diagram showing how the locations of the equilibria vary with  $a$, 
and the sign of $x^3 - x + a$ on the intervals between equilibria:
\vglue 3.0truein
\noindent
Note, for $a < -2/\sqrt{3}$, the one equilibrium is a source with $x > 0$,
at $a = -2/\sqrt{3}$, the first bifurcation happens and a second
equilibrium (neither source nor sink) appears.  As $a$ increases
past $-2/\sqrt{3}$, the ``new equilibrium'' splits into 
a source/sink pair.   For $-2/\sqrt{3} < a < 2/\sqrt{3}$, 
there are three equilibria, two sources and a sink.  At $a = 2/\sqrt{3}$, 
the positive source/sink pair ``rejoins'' forming an equilibrium
that is neither source nor sink.  Then that disappears as $a$ moves
past $a=2/\sqrt{3}$, leaving just the single source (with $x < 0)$.

\noindent
Comment:  Chapter 1/4 uses exactly the same kind of reasoning as this.  
you need to think of shifting the given graph up/down and tracking the
locations of the $x$-intercepts (which correspond to equilibrium solutions
of the ODE).
\bigskip
\noindent
Chapter 1/10 
\bigskip
\noindent
a)  The equation $x' = x + \cos t$ is first order linear with $g(t) = 1$, 
$r(t) = \cos(t)$.  The general solution is $x = ce^t + e^t \int e^{-t} \cos t\ dt$.
To evaluate this, integrate by parts twice (letting $u$ be the exponential,
for instance).  You should get the same integral you started with but with the
opposite sign:
$$\eqalign{
\int e^{-t} \cos t\ dt &= e^{-t} \sin t + \int e^{-t} \sin t\ dt\cr
                       &= e^{-t} \sin t - e^{-t} \cos t - \int e^{-t}\cos t\ dt\cr
\Rightarrow \int e^{-t} \cos t\ dt &= {1\over 2}e^{-t}(\sin t - \cos t)\cr}$$
Then
$$x = ce^t + e^t\cdot {1\over 2}e^{-t}(\sin t - \cos t) = ce^t + {1\over 2}(\sin t - \cos t)$$
Technical note:  By the Existence and Uniqueness Theorem for solutions of ODE
we mentioned in class, {\it every} solution of this first order linear
equation is one of these functions--there are no ``special cases'' that
don't show up in this general form.
\bigskip
\noindent
b)  Since the second term here is periodic, while $e^t$ is increasing for
all $t$, it is pretty clear intuitively that the only periodic solution
is the one with $c = 0$.  Here is one way to prove that.  Assume
that for some $c$, $x(t) = ce^t + {1\over 2}(\sin t - \cos t)$
is a periodic function of $t$.  That is, assume $x(t + T) = x(t)$ for
some $T > 0$.  (Note: without proving some other harder statement first,
we cannot rule out the possibility that the period could
be something other than $2\pi$, so I will not assume that.) 
By mathematical induction, the equation $x(t + T) = x(t)$ for all $t$ also implies
that $x(t + kT) = x(t)$ for all integers $k \ge 1$, hence in particular for
$t = 0$,
$$x(kT) = {1\over 2}(\cos kT - \sin kT) + c e^{kT} = {1\over 2} + c$$
for all $k \ge 1$.  We can rearrange this to write 
$$c(e^{kT} - 1) = {1\over 2}(\cos kT - \sin kT - 1)$$
The right hand side is bounded in absolute value for all $k$ (it's certainly 
never bigger than $3/2$ in absolute value since the $\sin$ and $\cos$
are in the range $-1$ to $1$; actually even smaller).  But note that
if $c \ne 0$, then the absolute value of 
left hand side goes to $+\infty$ as $k \to +\infty$
since $T > 0$, so we get a contradiction.  
It follows that the only possible periodic solution has $c = 0$.
\bigskip
\noindent
C.  The general solution of $y' = y - 4$ is $y = 4 + c_1 e^t$ (the ODE is separable
and 1st order linear; derive this either way).  Similarly, the 
general solution of $y' = 2 - y$ is $y = 2 + c_2 e^{-t}$.  Note:
\medskip
\item{$\bullet$}  $y = 4$ is an equilibrium solution of $y' = y - 4$, and 
it's a {\it source} for any number of different reasons.  For instance, 
you can see directly from the form of the general solution that $y$ will
tend away from $4$ as $t$ increases, unless $c_1 = 0$.
\item{$\bullet$} $y = 2$ is an equilibrium solution of $y' = 2 - y$, 
and it's a {\it sink}, since $e^{-t} \to 0$ as  $t \to +\infty$.
\bigskip
\noindent
1)  With the initial condition $y(0) = 4$, we substitute $t = 0$, $y = 4$ into 
$y = 4 + c_1 e^t$ and get $4 = 4 + c_1$, so $c_1 = 0$.  Hence $y = 4$ for
$0 \le t < 5$.  At $t = 5$, to make the two pieces of the solution graph
``link up'' into a continuous curve, we want $y(5) = 4$ in
the solution of $y' = 2 - y$.  So $4 = 2 + c_2 e^{-5}$, and $c_2 = 2e^{5}$.
If you plot this piecewise function, you will see part of a horizontal line
for $0 \le t < 5$, then the rest of the graph tending to $y = 2$ as $t \to +\infty$.
\bigskip
\noindent
2)  With the initial condition $y(0) = 2$, we substitute $t = 0$, $y = 2$ into 
$y = 4 + c_1 e^t$ and get $2 = 4 + c_1$, so $c_1 = -2$.  Hence $y = 4 - 2e^t$ for
$0 \le t < 5$.  At $t = 5$, to make the two pieces of the solution graph
``link up'' into a continuous curve, we want $y(5) = 4 - 2e^5$ in
the solution of $y' = 2 - y$.  So $4 - 2e^5 = 2 + c_2 e^{-5}$, and $c_2 = 2e^{5} - 2e^{10}$.
If you plot this piecewise function, you will see a rapidly decreasing part (concave down)
for $0 \le t < 5$, then the rest of the graph increasing back up
and tending to $y = 2$ as a horizontal asymptote as $t \to +\infty$.
Note:  There should be some $y(0)$ close to 4 where the first piece
of the solution has decreased exactly to $y=2$ at $t = 5$.  That solution
will remain constant at $y = 2$ for all $t \ge 5$. 
\bigskip
\noindent
3)  Because the equation $y' = y - 4$ has a {\it source} at $y = 4$, 
solutions with $y(0) > 4$ will increase until $t = 5$, the solution with
$y(0) = 4$ will stay constant, and solutions
with $y(0) < 4$ will decrease until $t = 5$.  
Because the equation $y' = 2 - y$ has a {\it sink} at $y = 2$, whatever
the first part of the solution does for $0 \le t < 5$, for $t \ge 5$, $y$
will tend back to $y = 2$ as $t\to +\infty$.  
\bigskip
\noindent
D.  Vertical asymptotes of the solution $y = {Ke^{at}\over 1 + Ke^{at}}$
can only come from zeroes of the denominator:
$$\eqalign{1 + Ke^{at} &= 0\cr
\Rightarrow t & = {1\over a}\ln(-1/K)\cr}$$
Recall that the domain of the natural logarithm is all positive reals,
and $\ln(x) > 0$ if $x > 1$, while $\ln(x) < 0$ if $0 < x < 1$.
\bigskip
\noindent
1)  If $y(0) < 0$, then $K = {y(0)\over 1 - y(0)} < 0$ and $|K| < 1$.
Hence $-1/K > 1$, so $\ln(-1/K) > 0$, and we get a 
vertical asymptote at $t = {1\over a}\ln(-1/K) > 0$.
\bigskip
\noindent
2) If $y(0) > 1$, then $K = {y(0)\over 1 - y(0)} < 0$ and $|K| > 1$.
Hence $-1/K < 1$, so $\ln(-1/K) < 0$, and we get a 
vertical asymptote at $t = {1\over a}\ln(-1/K) < 0$.
\bye
