% This is a LaTex file.
% Homework for the course "Scientific Computing",
% Spring semester, 1996, Jonathan Goodman.
% A latex format for making homework assignments.
\documentstyle[12pt]{article}
% The page format, somewhat wider and taller page than in art12.sty.
\topmargin -0.1in \headsep 0in \textheight 8.9in \footskip 0.6in
\oddsidemargin 0in \evensidemargin 0in \textwidth 6.5in
\begin{document}
% Definitions of commonly used symbols.
% The title and header.
\noindent
{\scriptsize Scientific Computing, Spring 1996} \hfill
\begin{center}
\large
Assignment 6.
\normalsize
\end{center}
\noindent
Given April 8, due April 22.
\vspace{.3in}
% The questions!
\noindent
{\bf Objective:} To explore numerical methods of ODE's.
\vspace{.5cm}
We want to compute the trajectory of a comet. In nondimensionalized
variables, the equations of motion are given by the inverse square law:
\begin{displaymath}
\frac{d^2}{dx^2} \left( \begin{array}{c} x \\ y \end{array} \right) =
\frac{-1}{\left(x^2+y^2 \right)^{3/2}}
\left( \begin{array}{c} x \\ y \end{array} \right) \;\; .
\end{displaymath}
We will always suppose that the comet starts at $t=0$ with
$x=10$, $y=0$, $\dot{x}=0$, and $\dot{y}=v_0$. If $v_0$ is less than the
escape velocity ($1/\sqrt{5}$ here), the comet will move in an elliptical
orbit, returning to $x=10$, $y=0$ after a time $T(v_0)$. This is the time
for a single orbit.
\begin{description}
\item[(1)]
Compute the position and velocity at time $t=30$ with $v_0 = .2$ using
a fixed $\Delta t$ and the three methods: Forward Euler, second order
Adams Bashforth, and four stage fourth order Runge Kutta. Do a convergence
study to verify the expected order of accuracy of each of these methods.
\item[(2)]
Use a fixed time step to compute $T(v_0)$ as a function of $v_0$ for
$v_0$ in the range $[.01,.25]$. Plot the result. For this, you will
need some way to pick an appropriate time step, possibly by doing a
convergence study. You will also have to safeguard your program against
the possibility that $T(v_0)$ is infinite.
\item[(3)]
Write an adaptive time step program that uses the fourth order Runge
Kutta together with a local truncation error strategy such as the
one discussed in class. The adaptive program should much more efficient than
the fixed step method when $v_0$ is small.
\end{description}
\end{document}