\documentclass[12pt]{article}

%\topmargin=0.0in
%\textheight=8.5in

\begin{document}

\noindent{\bf Math 269B} {\bf Homework \#4} Due date: Friday, February 17

\noindent Instructor: Luminita Vese. Teaching Assistant: Michael Puthawala. 

\bigbreak

\noindent{\bf [1]} Consider the one-way wave equation 
$$\frac{\partial u}{\partial t}+\frac{\partial u}{\partial x}=0.$$

Analyze the stability and the order of accuracy of the following {\it angled 
derivative method} 
$$u^{n+2}_j=(1-2\lambda)(u^{n+1}_j-u^{n+1}_{j-1})+u^n_{j-1},\ \ \ n\geq0,$$
with $\lambda=\frac{\triangle t}{\triangle x}$. 

\bigbreak

(Reminder to me: CHECK B.C. for the computational assignment)

\noindent{\bf [2]} {\it Computational assignment.} Consider the one-way wave equation
\begin{eqnarray*}
& &\frac{\partial u}{\partial t}+\frac{\partial u}{\partial x}=0,\ \ t>0, \ \ 0<x<2,\\
& &u(x,0)=e^{-100(x-1/2)^2}\sin(20\pi x),\\
& &u(0,t)=u(2,t)=0, \ \ t\geq0. 
\end{eqnarray*}

Find approximations of the exact solution at $t=1$, using 
$\triangle x=\frac{1}{80}$ and 
$\lambda=\frac{\triangle t}{\triangle x}=\frac{2}{3}$, by three
methods: the leapfrog method, the Lax-Wendroff method, and the angled 
derivative method. 

Comment and compare the obtained approximations, function of accuracy, 
dissipation, 
dispersion, conservation (a non-dissipative scheme is called conservative). 
Give and plot the exact solution also at $t=1$. 

\bigbreak

\noindent{\bf [3]} {\it Computational assignment.} Consider now the same equation as in [2], but with the initial 
condition 
$$u(x,0)=\left\{
\begin{array}{l}
1, \mbox{ if } \frac{1}{4}\leq x <\frac{3}{4},\\
0, \mbox{\ otherwise}.
\end{array}
\right.
$$
Find numerical approximations using four methods: the three methods used in 
[2] and the forward-in-time backward-in-space method (FTBS). In all cases, 
take $\triangle x=\frac{1}{100}$ and 
$\lambda=\frac{\triangle t}{\triangle x}=\frac{2}{3}$. The boundary conditions
are as in [2]. 

Plot the results at $t=1$, together with the exact solution. Comment and 
compare the 
obtained results. Note that here the FTBS scheme is the upwind scheme, in the
case $a=1>0$ (positive speed of propagation).  

\bigbreak

\noindent{\bf [4]} Consider the nonlinear equation $u_t+u_x=\cos^2u$, approximated by the 
Lax-Wendroff scheme with $R_{k,h}f_m^n=f_m^n$, treating the $\cos^2u$ term as 
$f(t,x)$. Show that the obtained scheme is first order accurate (use 
$\lambda=\frac{k}{h}$). 

\bigbreak 

\noindent{\bf [5]} Consider the box scheme 
\begin{eqnarray*}
\frac{1}{2k}[(v_m^{n+1}+v_{m+1}^{n+1})-(v_m^{n}+v_{m+1}^{n})]
\\
+\frac{a}{2h}[(v_{m+1}^{n+1}-v_{m}^{n+1})+(v_{m+1}^{n}-v_{m}^{n})]\\
=\frac{1}{4}(f_{m+1}^{n+1}+f_{m}^{n+1}+f_{m+1}^n+f_m^n)
\end{eqnarray*}

(a) Show that the scheme is an approximation to the one-way wave equation 
$u_t+au_x=f$ that is accurate
of order (2,2). 

(b) Show that the scheme is stable for all values of $\lambda$. 

\end{document}


