PHYCS 6730 Lab Exercise: Orthogonal Polynomials
Exercise 1 Legendre Polynomials
-
Use Maple to examine the first four Legendre polynomials. You get
them by loading the package with(orthopoly). The Legendre
polynomial of order n is P(n,x). Copy them to your
answer file.
-
Which of these is an even function and which is odd?
-
Check the orthogonality of P(2,x) and P(4,x) by
integrating explicitly over the interval [-1,1]. Copy your
Maple output to your answer file.
-
Check the normalization of the polynomial by integrating P(n,x)^2
over the interval [-1,1]. Verify in a couple of cases that the result
is 2/(2*n+1). Copy your Maple output to your answer file.
-
Find the zeros of P(8,x).
Exercise 2 Legendre Polynomials as a complete basis
Expand the polynomial
f(x) = 6*x^5 - 3*x^3 + x
in terms of Legendre polynomials. That is, write it as a sum
of terms of the form
a_0 P(0,x) + a_1 P(1,x) + a_2 P(2,x) + ...
Find the coefficients a_0, a_1, ... .
Hint: Here are two ways to do this. (1) Start from the highest degree
Legendre polynomial that could occur and do synthetic division,
writing the remainder as a polynomial of lesser degree. Do the same
with the remainder, etc. (2) Use the orthogonality formula and
grind out the integrals. The first method is more fun.
Exercise 3 Lagrange interpolation and Gauss-Legendre Quadrature
Suppose we used the three zeros of the Legendre polynomial as the
interpolation points for a function f(x). Write the Lagrange
interpolation formula showing the explicit form of the Lagrange
functions L(n,x). The zeros of P(3,x) are given by
x1 = -sqrt(3/5), x2 = 0, x3 = sqrt(3/5). Remember, the
formula looks like
f(x) = L(1,x) f(x_1) + L(2,x) f(x_2) + L(3,x) f(x_3).
Maple can help you here. What is the degree of the interpolation polynomial?
If we use the interpolation formula to approximate f(x), then
int(f(x),x=-1..1) = c_1 f(x_1) + c_2 f(x_2) + c_3 f(x_3)
where
c_i = int(L(i,x),x=-1..1).
Evaluate the coefficients c_i. These are the coefficients
required for three-point Gauss-Legendre quadrature. You used them in
the last class exercise, so compare your result with the numbers
there.
Exercise 4 Chebyshev Polynomials
Examine the first few Chebyshev Polynomials, known to Maple as
T(n,x). Check the orthogonality of T(2,x) and
T(4,x) over the interval
[-1,1] with respect to the measure dx/sqrt(1 - x^2).