\magnification=\magstep1
\centerline{Mathematics 172 -- Numerical Analysis 2}
\centerline{Discussion 2 -- Systems of ODE; Higher Order Equations}
\centerline{February 18, 1999}
\bigskip
\noindent
{\bf Background}
\bigskip
To finish off our discussion of numerical methods for approximating
solutions of ordinary differential equations, we want to consider
two {\it generalizations\/} of the basic first-order initial value problems
we have discussed:
$$\cases{y' = f(t,y) & \cr
         y(t_0) = \alpha \cr}$$
and see how our methods for these IVP's also generalize.
\bigskip
\noindent
{\bf Discussion Questions}
\bigskip
\item{A)} In many situations, {\it two or more\/} quantities evolve
jointly over time in such a way that the rates of change of the 
quantities are given by known functions of $t$ and the quantities 
themselves. For example, consider biological populations of two different 
species where the first species is made up of {\it predators\/} and the 
second species are the {\it prey\/} of the first.
One very simple model of this sort of interaction is to assume that
the prey would grow exponentially if there were no predators, 
the predators would decrease exponentially if there were no prey (no
food for them!), but there is an ``interaction'' term that contributes
positively to the predators and negatively to the prey populations.
Here is a general model of this type:  Let $y$ be the number of 
prey and $z$ be the number of predators as functions of time.  The model
is the following system of two differential equations:
$$\cases{y' = ay - byz &\cr
         z' = -cz + dyz &\cr}$$
where $a,b,c,d$ are positive constants.

\item{}This kind of situation leads us to consider {\it systems of several ODE\/} 
and IVP's for systems in general.  For example, the standard IVP for a 
system of {\it two\/} first order equations might be stated as follows:
$$\cases{y' = f(t,y,z)&\cr
         z' = g(t,y,z)&\cr
         y(t_0) = \alpha&\cr
         z(t_0) = \beta&\cr}\leqno(1)$$
A {\it solution\/} of such a problem would be a {\it vector-valued\/}
function $(y(t),z(t))$ defined on some $t$-interval $I$ containing $t_0$, 
satisfying {\it both equations\/}, and the initial conditions.
\bigskip
\itemitem{1)} Develop and describe ``extended'' basic Euler 
and Midpoint methods for 
generating numerical approximations to solutions of the IVP (1).   Explain
how you found your methods, and how you might measure a one-step error.
\itemitem{2)}  Use your Euler method to generate an approximate solution of 
the predator-prey system 
$$\cases{y' = .2 y - .03 yz&\cr
         z' = -.15 z + .04 yz&\cr
         y(0) = 10&\cr
         z(0) = 20&\cr}$$
Take $h = .2$, and $0 \le t \le 2$.  Describe in words how $y$ and 
$z$ are changing over this time interval. 
\itemitem{3)}  What would your Euler method look like for a general
system of $n$ first order equations in $n$ unknown functions:
$$\eqalign{y_1' &= f_1(t,y_1,\ldots, y_n)\cr
                &\ \vdots\cr
           y_n' &= f_n(t,y_1,\ldots, y_n)\cr}$$
with initial conditions $y_i(t_0) = \alpha_i$, for $i = 1,\ldots,n$?
                
\bigskip
\item{B)}  A second generalization would be to consider higher-order
differential equations such as the second-order ODE we wrote
down several weeks ago that models the damped oscillator (e.g. a mass-spring
system with friction proportional to the velocity of the mass):
$$ m y'' + c y' + k y = 0.\leqno(2)$$
\bigskip
\itemitem{1)}
Suppose you think of $y$ and $z=y'$ as {\it two unknown functions\/},
related of course by the equation $z = y'$.  Can you rewrite (2)
as a system of two first order equations for the functions $y$ and $z$?  How?
\bigskip
\itemitem{2)}  Show in general that any $n$th order equation
$$a_n(t) y^{(n)} + a_{n-1}(t) y^{(n-1)} + \cdots + a_1(t) y' + a_0(t)y = 0$$
can be rewritten as a system of $n$ first order equations in the
variables $y, u_1 = y', u_2 = y'', \ldots, u_{n-1} = y^{(n-1)}$.
(Hence what you did in part 3 of question A can also be applied to these 
systems!)
\bigskip
\noindent
{\bf Assignment}
\bigskip
Group write-ups due Thursday, February 25.
\bye