MATH3271 - FW03

Assignment 5

 > restart;

 > with(orthopoly);

Question 1(d)

 > plot([P(0,x),P(1,x),P(2,x),P(3,x)],x=-1..1,colour=BLACK);

Question (3b)

Solution to symmetric Dirichlet problem in a sphere

 > u:=2/5*P(0,cos(theta))+ 8/7*r^2*P(2,cos(theta)) + 16/35*r^4*P(4,cos(theta));

Define symmetric case of spherical polar coordinates in terms of cylindrical polar coordinates to plot solution.

 > plot3d(u,r=0..1,theta=0..Pi,coords=z_cylindrical,axes=BOXED);

Question 4

Define spherical polar coordinates in our notation.

 > plot3d(abs(P(2,cos(theta))),theta=0..Pi,phi=0..2*Pi,coords=my_spherical,axes=BOXED);

 > plot3d(abs(P(3,cos(theta))),theta=0..Pi,phi=0..2*Pi,coords=my_spherical,axes=BOXED);

Question 5

Define the spherical Bessel functions j0 and j1

 > j0:=sqrt(Pi/2/x)*BesselJ(1/2,x);

 > j1:=sqrt(Pi/2/x)*BesselJ(3/2,x);

 > plot([j0,j1],x=0..20,colour=BLACK);

The zeros of j0 lie between two consecutive zeros of j1 and vice versa.

Zeros of j0

 > for i from 1 to 10 do a[i]:=BesselJZeros(1/2,i);od;

 >

 >