\documentclass[11pt,letterpaper]{article}

\usepackage{fullpage}
\newcommand{\uu}{\mathbf{u}}
\newcommand{\vv}{\mathbf{v}}
\newcommand{\z}{\mathbf{0}}

\begin{document}

\title{CS 205b / CME 306}
\author{Application Track}
\date{Homework 2}
\maketitle

\begin{enumerate}
\item \textbf{ALE } An Eulerian formulation of conservation of mass uses control volumes that are fixed in space as material flows freely through the control volumes. A Lagrangian
formulations uses control volumes that move with the material, so that material never flows into our out of the control volume.  An ALE (Arbitrary Lagrangian Eulerian) formulation is
somewhere between these two.  Control volumes move around with a velocity $\vv$, as material flows freely through them.  The material has density $\rho$ and velocity $\uu$.  The velocity
field $\vv$ of the observer and the velocity field $\uu$ of the material being observed are independent and may vary in both space and time.  In particular, control volumes can move
around and change shape over time.
  \begin{enumerate}
  \item Adapt the derivation of the weak form for conservation of mass to the ALE case, where the control volume itself also moves around based on a velocity field $\vv$.
  \item Show that in the special case that $\vv=\z$, the weak form derived for the Eulerian case is recovered.
  \item Show what equation is obtained in the special case that $\vv=\uu$.  Give a physical explanation for why this equation corresponds to a Lagrangian formulation of conservation of
  mass in weak form.
  \item Convert the ALE weak form of conservation of mass into strong form.  Be careful when moving the time derivative inside the integration.  Show that this matches what was obtained
  using the Eulerian formulation.
  \end{enumerate}
\item \textbf{Duhamel's Principle } Consider the two ordinary differential equations $x' = \lambda x$ and $y' = \lambda y + \gamma$, where $x$, $y$, $\lambda$, and $\gamma$ are all
complex numbers.
  \begin{enumerate}
  \item Find analytic solutions to the recurrences $r_{n+1} = \alpha r_n$ and $s_{n+1} = \alpha s_n + \beta$.  Be careful of special cases.
  \item For which $\alpha$ and $\beta$ is $r_n$ bounded but $s_n$ unbounded?
  \item For which $\alpha$ and $\beta$ is $s_n$ bounded but $r_n$ unbounded?
  \item Show that for trapezoid rule, the update rule for $x_n$ has the same form as the recurrence $r_n$, and the update rule for $y_n$ has the same form as recurrence $s_n$.  Also show
  that the expressions for $\alpha$ are the same and do not depend on $\gamma$.
  \item What do you conclude about the dependence of the stability of trapezoid rule on the inhomogeneous term $\gamma$?  Would the conclusion change much if backward Euler or forward
  Euler were being studied instead?
  \end{enumerate}
\item \textbf{Plotting Stability } Note this problem contains a small programming component.  The lecture notes show stability plots for forward Euler (FE), backward Euler (BE),
trapezoid rule (TR), second order Runge-Kutta (RK2), third order Runge-Kutta (RK3), and fourth order Runge-Kutta (RK4).  These plots were obtained by considering the equation $y' =
\lambda y$, where $\lambda$ is complex.
  \begin{enumerate}
  \item State the update rules for FE, BE, TR, and RK2 when applied to $y' = f(y)$.
  \item Let $f(y) = \lambda y$, so that the differential equation is $y' = \lambda y$.  When solved for $y_{n+1}$ in terms of $y_n$ with, the update rule should have the form $y_{n+1} =
  C y_n$, where $C$ is a complex number that depends only on $\lambda t$.  Find $C$ for FE, BE, TR, and RK2.
  \item What must be true of $C$ for a method to be stable for a given choice of $\Delta t$ and $\lambda$?
  \item Let $\Delta t = 1$ and sample the complex plain in the region $-3 \le \mbox{Re}(\lambda) \le 3$ and $-3 \le \mbox{Im}(\lambda) \le 3$, determining for each value of $\lambda$
  whether the scheme will be stable.  Use white to indicate unstable and a distinct color (not black) to indicate stable.  Add black axes to the images (two lines is fine), making sure
  that the axes are on top of everything else.  It is recommended that you use matlab or octave for this assignment, though a solution using C++ and ImageMagick is also acceptable.  For
  each of FE, BE, TR, and RK2, you should submit (on paper) the image obtained and the source code used to construct it (even if the four programs are nearly identical).  The images
  should closely match the ones in the lecture notes.
  \end{enumerate}
\end{enumerate}

\end{document}

