MATH3271 - FW03

Assignment 5

>    restart;

>    with(orthopoly);

[G, H, L, P, T, U]

Question 1(d)

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

[Maple Plot]

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));

u := 2/5+8/7*r^2*(-1/2+3/2*cos(theta)^2)+16/35*r^4*(3/8+35/8*cos(theta)^4-15/4*cos(theta)^2)

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

>    addcoords(z_cylindrical,[z,r,theta],[r*cos(theta),r*sin(theta),z]);

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

[Maple Plot]

Question 4

Define spherical polar coordinates in our notation.

>    addcoords(my_spherical,[r,theta,phi],[r*sin(theta)*cos(phi),r*sin(theta)*sin(phi),r*cos(theta)]);

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

[Maple Plot]

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

[Maple Plot]

Question 5

Define the spherical Bessel functions j0 and j1

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

j0 := (Pi/x)^(1/2)/Pi^(1/2)/x^(1/2)*sin(x)

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

j1 := -(Pi/x)^(1/2)*(cos(x)*x-sin(x))/Pi^(1/2)/x^(3/2)

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

[Maple Plot]

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;

a[1] := Pi

a[2] := 2*Pi

a[3] := 3*Pi

a[4] := 4*Pi

a[5] := 5*Pi

a[6] := 6*Pi

a[7] := 7*Pi

a[8] := 8*Pi

a[9] := 9*Pi

a[10] := 10*Pi

>   

>