Unit 2: Infinite Series
Chapter 10: Fourier Series
Sections10.7: Fourier-Legendre series
Copyright
Copyright * 2001 by Addison Wesley Longman, Inc.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.
Initializations
> restart;
>
with(student):
with(orthopoly):
> read(`C:/Program Files/Maple 6.01/pvac.txt`):
Orthogonality and Minimization
We wish to show that, in general, orthogonal functions lead to series with the minimization property of Fourier series. To do this, we carry out the following experiment in a arena less familiar that that of the trig functions [1].
On the interval
, consider the set of functions
, with the two properties:
1)
2)
The first property is orthogonality of the functions on the interval
, and the second is the analog of
already used when developing the Fourier series. Are these two properties enough to reproduce the minimization property of the Fourier series?
To tell Maple that the functions
have these properties, embed Property (1) in the following equations.
>
q01 := Int(p0(x)*p1(x),x=-1..1)=0;
q02 := Int(p0(x)*p2(x),x=-1..1)=0;
q12 := Int(p1(x)*p2(x),x=-1..1)=0;
>
Then embed Property (2) in the equations
>
q00 := Int(p0(x)^2,x=-1..1)=2;
q11 := Int(p1(x)^2,x=-1..1)=2/3;
q22 := Int(p2(x)^2,x=-1..1)=2/5;
>
The measure of performance,
is the same as we used for the Fourier series.
In Maple, we write this as
> Q := Int((f(x)-s0*p0(x)-s1*p1(x)-s2*p2(x))^2,x=-1..1);
>
Again forming the normal equations
we find, using Properties (1) and (2), that
=
Hence,
These calculations are implemented in Maple for the case
as follows.
Differentiate the measure of performance with respect to each of the three coefficients s0, s1, s2. Set the derivatives equal to zero to determine the values of the coefficients which minimize Q, the measure of deviation.
>
eq1 := diff(Q,s0) = 0;
eq2 := diff(Q,s1) = 0;
eq3 := diff(Q,s2) = 0;
>
Progress solving these equations depends on simplifying them. The parentheses need to be multiplied out, and any possible integrations performed.
>
eq4 := expand(eq1);
eq5 := expand(eq2);
eq6 := expand(eq3);
>
No integrations have been done because everything is symbolic. Maple knows only properties (1) and (2) apply, but can't apply them until told. Do this with a simplify command containing the equations that define Property (1) and Property (2).
>
q0 := simplify(eq4,{q00,q11,q22,q01,q02,q12});
q1 := simplify(eq5,{q00,q11,q22,q01,q02,q12});
q2 := simplify(eq6,{q00,q11,q22,q01,q02,q12});
>
Solve each equation for the one coefficient it contains.
>
isolate(q0,s0);
isolate(q1,s1);
isolate(q2,s2);
>
Generalize these definitions to a formula for the
n
th coefficient
.
>
Legendre Polynomials
Do such functions exist? Are there actually functions which satisfy Properties (1) and (2)? Yes, Legendre polynomials
, the first five of which, graphed in Figure 10.30, are
>
for k from 0 to 4 do
p||k := P(k,x);
od;
>
The Legendre polynomials are found in Maple's orthopoly package.
Figure 10.30 is therefore the following graph in which
, appear with the colors red, black, green, blue, and magenta, in that order.
> plot([p||(0..4)], x=-1..1, color=[red,black,green,blue,magenta], xtickmarks=3, ytickmarks=3, labels=[` x`,``],labelfont=[TIMES,ITALIC,12]);
>
As seen from the graph, the normalization scheme used by Maple has
for each Legendre polynomial
. This is not the only normalization found in the literature, and the reader is advised to read any new text carefully.
Next, consider the function
on the interval [-1,1], and compute the coefficients
obtaining
>
for k from 0 to 4 do
S[k]:=(k+1/2)*int(sin(Pi*x)*p||k,x=-1..1);
od;
>
so that
> g := add(S[n]*p||n,n=0..4);
>
plotted as the solid (red) curve in Figure 10.31, below, is a Fourier-Legendre approximation to
, plotted as the dashed (black) curve.
> plot([sin(Pi*x),g],x=-1..1,linestyle=[2,1],color=[black,red], xtickmarks=3, ytickmarks=3, labels=[x,``],labelfont=[TIMES,ITALIC,12]);
>
The approximation
is a partial sum of the full Fourier-Legendre series
where
Likewise,
can be represented as infinite series in other prthogonal families such as the Hermite, Laguerre, or Chebyshev polynomials.
>
References
1. Robert J. Lopez, Tips for Maple Instructors, MapleTech, VOL. 4, NO. 3, 1997.
>