# 4.2, Example 2, verify 1-r^2 = sum A[n] J_0(alpha_n r) where A[n]=8/((alpha_n)^3*J_1(alpha_n)) # Help on bessel functions ?Bessel N:=5; alpha:=evalf([BesselJZeros(0,1..N)]); seq(BesselJ(1,alpha[j]),j=1..N); phi:=(x,t,n)->(8/(alpha[n]^3*BesselJ(1,alpha[n])))*BesselJ(0,alpha[n]*r)*cos(alpha[n]*t); u:=(r,t)->sum(phi(x,t,n),n=1..N); S:=(r,t,N)->sum(phi(r,t,n),n=1..N); plot({1-r^2,u(r,0)},r=0..1); plot(u(r,2.5),r=0..1); addcoords(z_cylindrical,[z,r,theta],[r*cos(theta),r*sin(theta),z]); #plot3d(u(r,0),r=0..1,theta=0..2*Pi,coords=z_cylindrical); plots[animate](plot3d,[u(r,t),r=0..1,theta=0..2*Pi,coords=z_cylindrical],t=0..3);