MATH3271
FW02
Solutions to Assignment 5
1. Legendre polynomials
(a) Use Rodrigues’ formula to find the Legendre
polynomials P0, P1 and P2.

(b) Using Bonnet’s recurrence relation and the
results from part (a) find the Legendre polynomials P3, P4
and P5.
From the recurrence relation
![]()
so we get

(c) Show that P2 and P4 are
orthogonal over the interval [-1, 1].

(d) Use MAPLE to plot the first four Legendre
polynomials on the interval [-1, 1] on the same graph. Put a label on the various curves (by hand)
in order to identify each polynomial.
See MAPLE output
2. (a) Expand x4 in a Legendre series in
Pn(x).
We have
![]()
Since x4
is an even function then A2k+1 = 0.
Since x4 is a polynomial of degree 4 then An
= 0 when n > 4. Thus we have

Thus
![]()
which you can verify using the results
from question 1.
(b) Expand cos(2θ)
in a Legendre series in Pn(cosθ).
We have
![]()
Note that cos(2θ) = 2cos(θ)2 – 1 which is an even
function of cos(θ) so that A2k+1 = 0. Similarly since cos(2θ)
is a polynomial of degree 2 in cos(θ) An = 0 for n > 2. Now
![]()
making the usual substitution that x =
cosθ. Thus

Thus
![]()
3. Dirichlet problem with symmetry
(a) Solve the following Dirichlet problem for the
sphere
, 0 ≤ r ≤ 1, 0 ≤ θ ≤ π
subject to the boundary condition that u(1,
θ) = 2 cos4θ. You
may use the results from
question 2(a) here.
The solution to the symmetric
Dirichlet problem for the interior of a sphere is
![]()
The boundary
condition is
![]()
Thus we must have
A0 = 2/5, A2 = 8/7, A4 = 16/35 with the rest
of the An = 0. Thus the solution is
![]()
(b) Use MAPLE to produce a three-dimensional plot
of the solution from part (a). The
simplest way to do this is to use cylindrical coordinates with ρ replaced
by r and φ replaced by θ. Then
u will be plotted as the z-coordinate. Note that the range of θ is [0, π].
See MAPLE output.
4. Use MAPLE to
produce a three-dimensional plot of |P2(cosθ)|
and |P3(cosθ)|.
See MAPLE
output.
5. MAPLE does not
have a specific function for the spherical Bessel functions but since

we can use BesselJ(n+1/2,x) to
evaluate these functions.
(a) Plot j0
and j1 over the interval [0, 20] on the same graph. What can you say about the zeros of j1
relative to the zeros of j0?
See MAPLE
output.
(b) Find the first ten zeros of j0. Note that j0 has the same zeros as
J1/2. Identify these zeros.
See MAPLE
output.
6. Consider the symmetric Dirichlet problem
between two spheres, i.e.
, 0 ≤ θ ≤ π
subject to the boundary conditions u(a,
θ) = f(θ) and u(b, θ) = 0.
By using the full solution to Euler’s equation show that u(r, θ) is
given by

Derive an explicit expression for the coefficients An.
We can write
where Rn satisfies the Euler equation
![]()
Thus the indicial equation is s(s-1) + 2s – n(n+1)=0 which has solutions s = n or s = -(n+1). Thus Rn = Arn + B/rn+1. In order for this solution to satisfy the
boundary condition u(b, θ) = 0 we must have Abn
+ B/bn+1 = 0 which requires B = -Ab2n+1. If we let An
= Abn then we get the general solution

Applying the boundary condition we get

so that
