\documentclass[11pt]{article}
\topmargin-.5in
\textwidth6.6in
\textheight9in
\oddsidemargin0in

\usepackage{graphicx}

\def\ds{\displaystyle}
\def\d{\partial}

\begin{document}
\pagestyle{empty}

\centerline{\large \bf MA 573 --- PROJECT 1}

\bigskip
{\bf Due: Friday, August 21}

\bigskip
The goal of this project is to acquaint you with Matlab and \LaTeX.  In class
we discussed the linear spring model
\begin{equation}
\begin{array}{l}
  {\ds m \frac{d^2 y}{d t^2}(t) + c \frac{d y}{d t}(t) + k y(t) = f(t) } \\
  \noalign{\bigskip}
  {\ds y(0) = y_0 \ , \ \frac{dy}{dt}(0) = y_1 },
\end{array}
\label{eq1}
\end{equation}
where $m, c$ and $k$ respectively denote the mass, damping and stiffness coefficients. 
For $f(t)= 0$, we know that the analytic solution to (\ref{eq1}) is
\begin{equation}
  y(t) = e^{-ct/2m} [ a_1 \cos(\nu t) + a_2 \sin(\nu t)],
\label{eq2}
\end{equation}
where
$$
  \nu = \frac{\sqrt{4km - c^2}}{2m} \ , \ a_1 = y_0 \ , \ 
  a_2 = \left(y_1 + \frac{c}{2m}y_0 \right)/\nu.
$$
To numerically approximate the solution to (\ref{eq1}), we discussed the implicit
Euler algorithm
\begin{equation}
  \vec{z}_{j+1} = [I-\Delta t A]^{-1} \vec{z}_j + [I-\Delta t A]^{-1}\Delta t \vec{F}(t_{j+1})
\label{eq3}
\end{equation}
where
$$
  A = \left[ \begin{array}{cc}  0 & 1 \\ 
                                \noalign{\smallskip} 
                                -k/m & -c/m \end{array} \right]
  \quad , \quad
  \vec{F}(t) = \left[ \begin{array}{c} 0 \\ \noalign{\smallskip}
                                       f(t)/m \end{array} \right] 
$$
and $\vec{z} = [y \, , \, \dot{y}]^T$.  The true and approximate solutions obtained
with $m=4, c=2, k=16, f(t) = 0$ and $y_0=2, y_1=30$ are plotted in Figure~\ref{fig1}. 


\bigskip
\noindent
{\bf Assignment:} Implement the trapezoid method and {\tt ode23} for the model (\ref{eq1}) and
write up your results in \LaTeX.  Compare the convergence rate of the
trapezoid method with that of the implicit Euler algorithm and include a plot
of your results.  Include a table of results illustrating that you get the correct
convergence rate when you double the number of gridpoints.  You can work together on this in groups of up to three but submit individual reports. 



\begin{figure}[!hh]
\bigskip
\begin{center}
\mbox{
  \includegraphics[width=2.8in]{plot1.pdf}
}
\end{center}

\vspace{-.25truein}
\caption{True and approximate solutions to the spring model (\ref{eq1}).
}
\label{fig1}
\end{figure}



\end{document}

