# 3.7-5, rectangular membrane problem, animation # u_{tt} = c^2(laplacian u), u=0 on the 4 edges # position and velocity given u=1, u_t=0 # Separation of variables leads to the answer in 3.7, display before thm 1. # we calculate on paper from 3.7 eq (8) that B_{mn}=0 and from (9) that # B_{mn}^* = (16/sqrt(m^2+n^2))(1/(mn))(1/pi^2) for m,n odd, zero otherwise Bstar:=(m,n)->(16/sqrt(m^2+n^2))*(1/(m*n))(1/Pi^2); phi:=(x,y,t,m,n)->sin(m*Pi*x)*sin(n*Pi*y)*sin(sqrt(m^2+n^2)*t); N:=20: # Number of partial sum terms is N^2=400. u:=(x,y,t)->sum(sum(Bstar(2*K+1,2*L+2)*phi(x,y,t,2*K+1,2*L+1),L=0..N),K=0..N); plot3d(u(x,y,0.5),x=0..1,y=0..1); with(plots): animate(plot3d,[u(x,y,t),x=0..1,y=0..1],t=0..3);