\documentclass[12pt]{article}
\textheight=9.0in
\topmargin=-0.5in
\textwidth=6.5in
\oddsidemargin=-0.2in
\begin{document}

{\bf Math 269A.} {\bf HW \#6.} {\bf Due: Wednesday, Nov. 28, or Friday, Nov. 30}

\bigbreak

{\bf[1]} 

(a) Give the definition of an A-stable method. 

(b) Determine all values of $\theta$ such that the theta method given below is 
A-stable.
$$y_{i+1}=y_i+h\Big[\theta f(x_i,y_i)+(1-\theta)f(x_{i+1},y_{i+1})\Big],\ \
i=0,1,...$$

\bigbreak

{\bf[2]} The two-step method $y_{i+1}=y_{i-1}+2hf(x_{i},y_{i})$ is called 
the {\it explicit midpoint rule}. 

(a) Implement this two-step method for the very simple differential equation
$y'=-y$, $y(0)=1$ (the exact solution is $e^{-x}$). Use $y_1=y(h)=e^{-h}$ 
and the values $h=1/2$, $h=1/4$, $h=1/8$, $h=1/16$. Plot the exact solution and
the numerical approximations on the interval [0,8]. You should turn in the 
code and the plot of values. 

(b) Show that the region of absolute stability for the explicit midpoint rule 
is the empty set. 

\bigbreak

{\bf[3]} Consider the following (IVP): 
\begin{eqnarray*}
y_1' & = & 198y_1+199y_2,  \ \ \ \  y_1(0)=1\\
y_2' & = & -398y_1-399y_2, \ \ y_2(0)=-1,
\end{eqnarray*}
that we write in matrix-vector form $\vec{y}'=A\vec{y}$, 
$\vec{y}(0)=\vec{y}_0$. 

(a) Find the exact solution of this autonomous linear system. What is its 
asymptotic behavior, as $x\rightarrow\infty$ ? 

(b) Compute the eigenvalues $\lambda_1$ and $\lambda_2$ of the matrix $A$ and
the corresponding matrix $P$ of eigenvectors. What relation exists between 
$A$, $P$ and $\Lambda=diag(\lambda_1,\lambda_2)$ ? 

(c) Is this a stiff system of ODE's ? If yes, what is the stiffness ratio ? 
Explain. 

(d) Apply the trapezoidal rule to this system following the steps: 

(i) Express $\vec{y}_{j+1}$ function of $\vec{y}_j$, by a recurrence formula 
given in matrix-vector form. 

(ii) If $\vec{z}_j$ is defined such that $\vec{y}_j=P\vec{z}_j$, express 
$\vec{z}_{j+1}$ function of 
$\vec{z}_j$ in matrix-vector form and the associated 
scalar recursions for each component of $\vec{z}_j$. 

(e) If the system is solved using the trapezoidal method, what restriction,
if any, has to be imposed on the stepsize $h$ to obtain a correct qualitative
behavior ? 

\bigbreak

{\bf [4]} (a) Give the solution (e.g. explicit formulas for $y_1(x)$ and $y_2(x)$)
to 
$$
\frac{\partial}{\partial x}
\left(
\begin{array}{c}
y_1\\
y_2
\end{array}
\right)
=
\left(
\begin{array}{cc}
-2 & -2\\
2 & -2
\end{array}
\right)
\left(
\begin{array}{c}
y_1\\
y_2
\end{array}
\right), 
\ \ \ \ \ 
\left(
\begin{array}{c}
y_1(0)\\
y_2(0)
\end{array}
\right)
=
\left(
\begin{array}{c}
-\sqrt{2}\\
\sqrt{2}
\end{array}
\right).
$$

Give an estimate of the stepsize required to obtain a qualitatively correct
solution if one is using Euler's method. 

\bigbreak 

{\bf [5]} Consider the second order differential equation 
$$y''+19y'-20y=0.$$

(a) Give an equivalent first order system for this equation.

(b) Give the stability stepsize restriction if backward Euler is used to 
compute solutions to the first order system. 

\bigbreak 


\end{document}
