Exercise 13.2.5

From Maxwell’s equations we can find a way to convert the wave equation to a first-order form that uses only first-order derivatives in space:

\[ u_t = c^2(v_y - w_x),\\ v_t = u_y\\ w_t = -u_x, \] subject to \(u=0\) on the boundary

  1. Show that a solution satisfies \(u_t = c^2(u_{xx} + u_{yy})\)

\[ v_{ty} = u_{yy}\\ w_{tx} = -u_{xx} \]

Now what?

  1. Solve with \(c=2\) in the rectange \([-3,3] \times [-1,1]\), \(u(x,y,0) = \exp(x-x^2)(9-x^2)(1-y^2)\), and \(v=w=0\) at \(t=0\). Use \(m=50\) for x and \(n=25\) for y, solve for \(0 \leq t \leq 6\), and make an animation.
m = 50;  n = 25;
x,Dx,Dxx = FNC.diffcheb(m,[-3,3]);
y,Dy,Dyy = FNC.diffcheb(n,[-1,1]);
U0 = [ exp(x-x^2)*(9-x^2)*(1-y^2) for x in x, y in y ]
V0 = zeros(size(U0));