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:

ut=c2(vywx),vt=uywt=ux, subject to u=0 on the boundary

  1. Show that a solution satisfies ut=c2(uxx+uyy)

vty=uyywtx=uxx

Now what?

  1. Solve with c=2 in the rectange [3,3]×[1,1], u(x,y,0)=exp(xx2)(9x2)(1y2), and v=w=0 at t=0. Use m=50 for x and n=25 for y, solve for 0t6, 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));