Question: Wave Eqn in Polar Coordinates

I am trying to solve the wave equation in polar coordinates.  The initial condition on u is given by f(r,theta) and the initial condition on u_t is zero.  The weight function is w(r).  I am not sure why it will not evaluate this as I know the solution remains finite on the domain (the unit disk).  Here is the code: 
 

Wave Equation in Polar Coordinates

restart; with(plots); addcoords(u_cylindrical, [u, r, theta], [r*cos(theta), r*sin(theta), u])

Example:

rho := 1; 1; c := 1; 1; w := proc (r) options operator, arrow; r end proc

1

 

1

 

proc (r) options operator, arrow; r end proc

(1)

f := proc (r, theta) options operator, arrow; 2.5*(1-r^2)*r*sin(theta) end proc

proc (r, theta) options operator, arrow; 2.5*(1-r^2)*r*sin(theta) end proc

(2)

assume('n', integer); 1; assume('m', integer)

lambda := proc (n, m) options operator, arrow; BesselJZeros(n, m)^2/rho^2 end proc;

proc (n, m) options operator, arrow; BesselJZeros(n, m)^2/rho^2 end proc

(3)

c0 := proc (m) options operator, arrow; (int(int(f(r, theta)*BesselJ(0, sqrt(lambda(0, m))*r)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(0, sqrt(lambda(0, m))*r)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc; 1; a := proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*cos(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*cos(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc; 1; b := proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*sin(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*sin(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

proc (m) options operator, arrow; (int(int(f(r, theta)*BesselJ(0, sqrt(lambda(0, m))*r)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(0, sqrt(lambda(0, m))*r)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

 

proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*cos(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*cos(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

 

proc (n, m) options operator, arrow; (int(int(f(r, theta)*BesselJ(n, sqrt(lambda(n, m))*r)*sin(n*theta)*w(r), theta = -Pi .. Pi), r = 0 .. rho))/(int(int(BesselJ(n, sqrt(lambda(n, m))*r)^2*sin(n*theta)^2*w(r), theta = -Pi .. Pi), r = 0 .. rho)) end proc

(4)

u := proc (n, m, r, theta, t) options operator, arrow; sum(BesselJ(0, sqrt(lambda(0, j))*r)*c0(j)*cos(sqrt(lambda(0, j))*c*t), j = 1 .. m)+sum(sum(BesselJ(i, sqrt(lambda(i, j))*r)*(a(i, j)*cos(i*theta)+b(i, j)*sin(i*theta))*cos(sqrt(lambda(i, j))*c*t), j = 1 .. m), i = 1 .. n) end proc

proc (n, m, r, theta, t) options operator, arrow; sum(BesselJ(0, sqrt(lambda(0, j))*r)*c0(j)*cos(sqrt(lambda(0, j))*c*t), j = 1 .. m)+sum(sum(BesselJ(i, sqrt(lambda(i, j))*r)*(a(i, j)*cos(i*theta)+b(i, j)*sin(i*theta))*cos(sqrt(lambda(i, j))*c*t), j = 1 .. m), i = 1 .. n) end proc

(5)

soln := evalf(u(3, 3, r, theta, t));

(Float(infinity)+Float(infinity)*I)*BesselJ(1., 3.831705970*r)*sin(theta)*cos(3.831705970*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(1., 7.015586670*r)*sin(theta)*cos(7.015586670*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(1., 10.17346814*r)*sin(theta)*cos(10.17346814*t)-0.3676566232e-9*BesselJ(2., 5.135622302*r)*sin(2.*theta)*cos(5.135622302*t)-0.1879633956e-10*BesselJ(2., 8.417244140*r)*sin(2.*theta)*cos(8.417244140*t)-0.5146823927e-10*BesselJ(2., 11.61984117*r)*sin(2.*theta)*cos(11.61984117*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(3., 6.380161896*r)*sin(3.*theta)*cos(6.380161896*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(3., 9.761023130*r)*sin(3.*theta)*cos(9.761023130*t)+(Float(infinity)+Float(infinity)*I)*BesselJ(3., 13.01520072*r)*sin(3.*theta)*cos(13.01520072*t)

(6)

plot3d(soln, r = 0 .. 1, theta = 0 .. 2*Pi, coords = u_cylindrical, axes = boxed)

NULL

NULL


 

Download Section_6.3.mw

Any assistance would be greatly appreciated. 

Please Wait...