the gibbs phenomenon for series of orthogonal polynomials
TRANSCRIPT
This article was downloaded by: [Dalhousie University]On: 19 September 2013, At: 13:20Publisher: Taylor & FrancisInforma Ltd Registered in England and Wales Registered Number: 1072954 Registeredoffice: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK
International Journal of MathematicalEducation in Science and TechnologyPublication details, including instructions for authors andsubscription information:http://www.tandfonline.com/loi/tmes20
The Gibbs phenomenon for series oforthogonal polynomialsT.H. Fay a & P. Hendrik Kloppers ba Technikon Pretoria and University of Southern Mississippib Technikon PretoriaPublished online: 30 Nov 2006.
To cite this article: T.H. Fay & P. Hendrik Kloppers (2006) The Gibbs phenomenon for seriesof orthogonal polynomials, International Journal of Mathematical Education in Science andTechnology, 37:8, 973-989, DOI: 10.1080/00207390601083617
To link to this article: http://dx.doi.org/10.1080/00207390601083617
PLEASE SCROLL DOWN FOR ARTICLE
Taylor & Francis makes every effort to ensure the accuracy of all the information (the“Content”) contained in the publications on our platform. However, Taylor & Francis,our agents, and our licensors make no representations or warranties whatsoever as tothe accuracy, completeness, or suitability for any purpose of the Content. Any opinionsand views expressed in this publication are the opinions and views of the authors,and are not the views of or endorsed by Taylor & Francis. The accuracy of the Contentshould not be relied upon and should be independently verified with primary sourcesof information. Taylor and Francis shall not be liable for any losses, actions, claims,proceedings, demands, costs, expenses, damages, and other liabilities whatsoeveror howsoever caused arising directly or indirectly in connection with, in relation to orarising out of the use of the Content.
This article may be used for research, teaching, and private study purposes. Anysubstantial or systematic reproduction, redistribution, reselling, loan, sub-licensing,systematic supply, or distribution in any form to anyone is expressly forbidden. Terms &Conditions of access and use can be found at http://www.tandfonline.com/page/terms-and-conditions
International Journal of Mathematical Education inScience and Technology, Vol. 37, No. 8, 15 December 2006, 973–1000
Classroom notes
The Gibbs phenomenon for series of orthogonal polynomials
T.H. FAY*y and P. HENDRIK KLOPPERSz
yTechnikon Pretoria and University of Southern MississippizTechnikon Pretoria
(Received 15 January 2003)
This note considers the four classes of orthogonal polynomials – Chebyshev,Hermite, Laguerre, Legendre – and investigates the Gibbs phenomenon at a jumpdiscontinuity for the corresponding orthogonal polynomial series expansions. Theperhaps unexpected thing is that the Gibbs constant that arises for each class ofpolynomials appears to be the same as that for Fourier series expansions. Eachclass of polynomials has features which are interesting numerically. Finally aplausibility argument is included showing that this phenomenon for the Gibbsconstants should not have been unexpected. These findings suggest furtherinvestigations suitable for undergraduate research projects or small groupinvestigations.
1. Introduction
Students in beginning courses on partial differential equations are introduced tothe concepts of eigenfunctions and eigenvalues, when employing the method ofseparation of variables. Sturm–Liouville theory and boundary value problemsarise naturally in this context and classes of functions orthogonal with respect to aweight function lead to series expansions of functions, and Fourier series are oftenintroduced for the first time in this way [1].
When dealing with series expansions, one needs to consider convergence and theFourier series provide an important example for the illustration of differencebetween uniform and pointwise convergence. Moreover, there is the interestingGibbs phenomenon that occurs at jump discontinuities, which is easy to display,straightforward to calculate, and provides the motivation for convergencediscussions. This has been the thrust of the recent articles [2,3] appearing in thisjournal.
In the authors’ article [4], Fourier–Bessel series are considered and the Gibbsconstant is calculated numerically for three examples. This constant appeared to the
International Journal of Mathematical Education in Science and TechnologyISSN 0020–739X print/ISSN 1464–5211 online # 2006 Taylor & Francis
http://www.tandf.co.uk/journalsDOI: 10.1080/00207390601083617
*Corresponding author. Email: [email protected]
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
same as that obtained using Fourier series. Thus it seems natural to investigate otherclasses of orthogonal functions with regard to the Gibbs phenomenon. In doing so,we are able to observe how quickly (or how slowly) each generalized Fourierseries converges and to give some computational shortcuts for finding the seriescoefficients illustrating that the multitude of relationships that each class oforthogonal polynomials enjoys are useful and not theoretical curiosities.
We give a brief description of each orthogonal polynomial class1 and study thebehaviour of the truncated series representation for a step function having a simplejump discontinuity of height 2. We will see that the Gibbs constant appears to be thesame for each class. Finally we will give a plausibility argument to show that weshould have expected the Gibbs constant to be exactly the same.
The descriptions of these orthogonal polynomials and their many properties,found in such standard references as Abramowitz and Stegun [5] or Thompson [6],can be overwhelming to the beginning student (see also [7]). By focusing on thisgeometric problem of the Gibbs phenomenon, students can begin to see the necessityfor discovering many of the relationships as computational needs drive much of thistheory. The Gibbs phenomenon provides a beautiful and simple applicationto introduce much of this important material early in the curriculum either byenriching a differential equations class or as a source for undergraduate researchprojects.
2. The Gibbs phenomenon for Fourier series
Recall that for a periodic, piecewise continuous and piecewise smooth function f (x),there is an effect that occurs near each jump discontinuity of f (x) called the Gibbseffect or Gibbs phenomenon when using truncated Fourier series to approximatef ðxÞ: This is most often illustrated with the step function
f ðxÞ ¼�1 �� < x < 00 x ¼ ��, 0,�1 0 < x < �
8<: ð2:1Þ
In figure 1, we plot f(x) and the sum of the first ten terms and the sum of the first 100terms of the Fourier series for fðxÞ: One can clearly see that although the Fourierseries for f(x) converges pointwise to f(x) at each value of x, the ‘under- and over-shoots’ just to the left and right of the jump discontinuities do not disappear asn tends to infinity, but rather tends to a well defined limit which can be shown to be
2
�
Z �
0
sin x
xdx � 1:178979744: ð2:2Þ
In this article we shall call this number the Gibbs constant. This effect or phenom-enon occurs not just for step functions, but whenever f(x) has a jump discontinuity.We shall investigate a similar Gibbs effect for the truncated sums of seriesrepresentations employing families of orthogonal polynomials.
1More and deeper information and further references about each orthogonal class can befound in Eric Weinstein’s world of MATHEMATICS at www.mathworld.wolfram.com andat the engineering fundamentals website www.efunda.com.
974 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
3. Chebyshev polynomials
The Chebyshev (sometimes written Tchebysheff) polynomials TnðxÞ are solutions to
Chebyshev’s equation
ð1� x2Þy00 � xy0 þ �2y ¼ 0
when � ¼ n, a non-negative integer. They are polynomials of degree n and are odd
when n is odd and even when n is even; the first few are listed:
T0ðxÞ ¼ 1
T1ðxÞ ¼ x
T2ðxÞ ¼ 2x2 � 1
T3ðxÞ ¼ 4x3 � 3x
T4ðxÞ ¼ 8x4 � 8x2 þ 1
These polynomials can be generated by the Rodrigues formula
TnðxÞ ¼
ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p
ð�1Þnð2n� 1Þð2n� 3Þ � � � 1
dn
dxnð1� x2Þn�1=2
Particular values are Tnð�1Þ ¼ ð�1Þn, Tnð1Þ ¼ 1, and Tnð0Þ ¼ 0 if n is odd and
Tnð0Þ ¼ ð�1Þn=2 if n is odd. It is of interest to note that the Chebyshev polynomials
TnðxÞ arise from the coefficients in the expression cosðn�Þ, if we set � ¼ arccosðxÞ:For example
cos 3� ¼ cos3 � � 3 cos � sin2 �
¼ 4 cos3 � � 3 cos �
It follows that
TnðxÞ ¼ cosðnArc cosðxÞÞ ð3:1Þ
The Chebyshev polynomials form a complete orthogonal set on the interval ½�1, 1�
with respect to the weight function 1=ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p: It can be shown that
Z 1
�1
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p TnðxÞTmðxÞ dx ¼
0 for n 6¼ m
� for n ¼ m ¼ 0
�=2 for n ¼ m ¼ 1, 2, . . .
8>>>><>>>>:
Figure 1. Sums of 10 and 100 terms of the Fourier series.
Classroom notes 975
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
Using this orthogonality, given a piecewise continuous function f(x) defined on
½�1, 1�, we can form its Fourier–Chebyshev series
�ðxÞ ¼X1n¼0
cnTnðxÞ
where
c0 ¼1
�
Z 1
�1
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p f ðxÞ dx
and for n > 0,
cnðxÞ ¼2
�
Z 1
�1
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p f ðxÞTnðxÞ dx ð3:2Þ
This series converges to f (x) if f is continuous at the point x, and
converges to the average of the left- and right-hand limits if f has a jump
discontinuity at x.
3.1. A simple step function
We consider the simple step function
gðxÞ ¼
1 �14x < 0
0 x ¼ 0
�1 0 < x41
8>><>>: ð3:3Þ
To investigate the Fourier–Chebyshev series approximations of g, we set
�nðxÞ ¼Xnk¼1
ckTkðxÞ ð3:4Þ
and we plot g and �50, and �500 in figure 2.A Gibbs phenomenon can be seen quite clearly in these figures.
Figure 2. Sums of 50 and 500 terms of the Fourier–Chebyshev series.
976 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
For this step function g, the Fourier–Chebyshev coefficients cn are easy to
calculate. Computing,
c0 ¼1
�
Z 0
�1
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p T0ðxÞ dx�
Z 1
0
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p T0ðxÞ dx
� �
¼1
�
Z 0
�1
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p dx�
Z 1
0
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p dx
� �
¼1
�
�
2��
2
� �¼ 0
ð3:5Þ
In fact, since g(x) is an odd function and T2kðxÞ is even, each c2k ¼ 0. More generally,
for n > 0,
cn ¼2
�
Z 0
�1
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p TnðxÞ dx�
Z 1
0
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p TnðxÞ dx
� �
¼2
�
Z 0
�1
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p cosðn cos�1 xÞ dx�
Z 1
0
1ffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p cosðn cos�1 xÞ dx
� �
¼2
�
sinðn�Þ � sinðn�=2Þ
n�sinðn�Þ
n
� �
¼2 sinðn�Þ � 4 sinðn�=2Þ
n�
¼ �4 sinðn�=2Þ
n�
ð3:6Þ
Consequently
cn ¼0, if n is even
�4 sinðn�=2Þ=n�, if n is odd
�
¼
0, if n is even
�4=n�, if n ¼ 1, 5, 9, . . .
4=n�, if n ¼ 3, 7, 11, . . .
8><>:
ð3:7Þ
Hence
cn ¼0, if n is even
4=�ð�1Þk
2k� 1, if n ¼ 2k� 1 is odd
8<: ð3:8Þ
The Fourier–Chebyshev series for g is given by
�ðxÞ ¼X1k¼1
c2k�1T2k�1ðxÞ ð3:9Þ
Classroom notes 977
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
and the nth partial sum is denoted by
�nðxÞ ¼Xnk¼1
c2k�1T2k�1ðxÞ ð3:10Þ
¼4
�
Xnk¼1
ð�1Þk
2k� 1T2k�1ðxÞ
Incidentally, to avoid calculation errors in Mathematica when plotting, instead ofusing the Chebyshev polynomial T2k�1ðxÞ in the summation (3.10), we use theequivalent form cosðð2k� 1ÞArc cosðxÞÞ which is more computationally friendly.In this way, it is only time consuming to generate a plot of �500ðxÞ, for example.
In order to estimate the Gibbs constant and because of the obvious symmetries,we will investigate the value �nðxnÞ � 1 where ðxn,�nðxnÞÞ is the first turning point(local maximum) to the left of the y-axis. Of course xn depends very much on thevalue of n. Hence we need to calculate the derivative of �nðxÞ and find its largestnegative root. It is straightforward to calculate
�0nðxÞ ¼
d
dx
Xnk¼1
c2k�1 cosðð2k� 1ÞArc cosðxÞÞ
( )ð3:11Þ
¼d
dx
4
�
Xnk¼1
ð�1Þk
2k� 1cosðð2k� 1ÞArc cosðxÞÞ
( )
¼4
�
Xnk¼1
ð�1Þkffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p sinðð2k� 1ÞArc cosðxÞÞ
Mathematica’s FindRoot command is useful in determining xn. Using the statement
FindRoot4
�
Xnk¼1
ð�1Þkffiffiffiffiffiffiffiffiffiffiffiffiffi1� x2
p sinðð2k� 1ÞArc cosðxÞÞ ¼ ¼ 0, fx,mg
" #
where m is a graphical estimate of xn called a starting value. Mathematica usesthe secant method to calculate the desired zero or root. Note the double equal signsis Mathematica syntax. Other computer algebra systems will have similar routinesfor Newton’s method and the secant method for finding such roots (see [8] for moredetails).
The values of xn can be computed with starting values m ¼ 1=n. In the followingtable we record xn, �nðxnÞ, and the over-shoot of �nðxnÞ above the Gibbs constant1.1789879 for various values of n.
n xn �nðxnÞ over-shoot10 0:309017 1:182328 0:003348550 0:062791 1:179113 0:0001333100 0:031411 1:178013 0:0000333200 0:015707 1:178988 0:0000083500 0:006283 1:178981 0:00000131000 0:003142 1:178980 0:0000003
In this table, we see that as n increases, the over-shoot decreases, and that the valuesof �nðxnÞ appear to be converging to the number 1:178979 which is the Gibbsconstant rounded to 6 decimal places.
978 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
4. Hermite polynomials
The Hermite polynomials are polynomial solutions to Hermite’s differential equation
y00 � 2xy0 þ 2�y ¼ 0 ð4:1Þ
for � ¼ n, a non-negative integer, and are often denoted by HnðxÞ: The first few are
H0ðxÞ ¼ 1
H1ðxÞ ¼ 2x
H2ðxÞ ¼ 4x2 � 2
H3ðxÞ ¼ 8x3 � 12x
These polynomials can be generated by the Rodrigues’ formula
HnðxÞ ¼ ð�1Þnex2 dn
dxnðe�x2Þ where n ¼ 0, 1, 2, . . .
The Hermite polynomials enjoy a symmetry condition
Hnð�xÞ ¼ ð�1ÞnHnðxÞ ð4:2Þ
Each HnðxÞ is a polynomial of degree n and is an odd function if n is odd and an even
function if n is even.There are a number of identities relating the Hn and their derivatives, again too
many to list here, but we note that
Hnþ1ðxÞ ¼ 2xHnðxÞ � 2nHn�1ðxÞ ð4:3Þ
and
H0nðxÞ ¼ 2nHn�1ðxÞ ð4:4Þ
so that Z x
0
HnðtÞdt ¼1
2ðnþ 1ÞðHnþ1ðxÞ �Hnþ1ð0ÞÞ ð4:5Þ
and finally
d
dxe�x2HnðxÞn o
¼ �2xe�x2HnðxÞ þ 2ne�x2Hn�1ðxÞ ð4:6Þ
so that Z x
0
e�t2HnðtÞ dt ¼ Hn�1ð0Þ � e�x2Hn�1ðxÞ ð4:7Þ
Because e�x2 is an even function and the parity of HnðxÞ is either odd or even,
it follows that Z 0
�x
e�t2HnðtÞ dt ¼ ð�1ÞnðHn�1ð0Þ � e�x2Hn�1ðxÞÞ ð4:8Þ
Classroom notes 979
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
These polynomials are orthogonal with respect to the weight function wðxÞ ¼ e�x2 ,
and can be shown to form a complete orthogonal system over the interval ð�1,1Þ
and
Z 1
�1
e�x2HnðxÞHmðxÞ dx ¼
0 for n 6¼ m
2n � n!ffiffiffi�
pfor n ¼ m
8<: ð4:9Þ
Thus these polynomials can be used to produce a generalized Fourier series
called Fourier–Hermite series. Given a function f(x) defined over ð�1,1Þ, the
Fourier–Hermite series for f(x) is
�ðxÞ ¼X1n¼0
cnHnðxÞ ð4:10Þ
where
cn ¼1
2nn!ffiffiffi�
p
Z 1
�1
e�x2HnðxÞf ðxÞ dx ð4:11Þ
4.1. A simple step function
To investigate the Gibbs phenomenon for Fourier–Hermite series, we consider the
step function
fðxÞ ¼0 for xj j > 1�1 for � 1 < x < 01 for 0 < x < 1
8<: ð4:12Þ
In addition, the values f ð0Þ ¼ 0 and f ð�1Þ ¼ �1=2 are chosen so that they are the
average of the left- and right-hand limits. We chose to define f ðxÞ ¼ 0 for xj j > 1 in
order that the Fourier–Hermite series coefficients are simple to compute numerically
in a timely fashion. The coefficients cn of the Fourier–Hermite series for f (x) are
given by
cn ¼1
2nn!ffiffiffi�
p
Z 1
�1
e�x2HnðxÞf ðxÞ dx ð4:13Þ
¼1
2nn!ffiffiffi�
p
Z 1
0
e�x2HnðxÞ dx�
Z 0
�1
e�x2HnðxÞ dx
� �
¼
0 if n is even�2
2nn!ffiffiffi�
p ðHn�1ð0Þ � e�1Hn�1ð1ÞÞ if n is odd
8<:
The integrals within the curly braces are not difficult to evaluate using equation (4.8).
In figure 3, we show f(x) and the sum of the first 50 and first 200 (non-zero) terms
of its Fourier–Hermite series.We let
�nðxÞ ¼Xnk¼1
c2k�1H2k�1ðxÞ
980 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
and this time let xn denote the abscissa of the first turning point to the left of zerofor the truncated Fourier–Hermite series. In the following table, we compute thedifference between the over-shoot �nðxnÞ and the Gibbs constant 1.178979.
n xn �nðxnÞ difference
50 �0:305234 1:177162 �0:001818
100 �0:233224 1:187841 0:008861
500 �0:099751 1:181217 0:002237
1000 �0:070905 1:180046 0:001066
Clearly the over-shoots �nðxnÞ appear to be converging to 1:178979 but note theslowness of the convergence.
5. Laguerre polynomials
Polynomial solutions to Laguerre’s differential equation
xy00 þ ð1� xÞy0 þ �y ¼ 0 ð5:1Þ
for � ¼ n, a non-negative integer, and are often denoted by LnðxÞ: The first few are
L0ðxÞ ¼ 1
L1ðxÞ ¼ 1� x
L2ðxÞ ¼1
2ð2� 4xþ x2Þ
L3ðxÞ ¼1
6ð6� 18xþ 9x2 � x3Þ
These polynomials can be generated by the Rodrigues’ formula
LnðxÞ ¼ex
n!
dn
dxnðxne�xÞ where n ¼ 0, 1, 2, . . . ð5:2Þ
Each LnðxÞ is a polynomial of degree n and Lnð0Þ ¼ 1 for all n.There are a number of identities relating the Ln and their derivatives. It will be
useful to note that the Laguerre polynomials satisfy a recursion relation
ðnþ 1ÞLnþ1ðxÞ ¼ ð2nþ 1� xÞLnðxÞ � nLn�1ðxÞ ð5:3Þ
Figure 3. Sums of 50 and 200 terms of the Fourier–Hermite series.
Classroom notes 981
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
and
xL0nðxÞ ¼ nLnðxÞ � nLn�1ðxÞ ð5:4Þ
and
L0nðxÞ ¼ L0
n�1ðxÞ � Ln�1ðxÞ ð5:5Þ2
From these equations it follows thatZ x
0
LnðtÞ dt ¼ LnðxÞ � Lnþ1ðxÞ ð5:6Þ
Integrating by parts the integral Ze�xLnðxÞ dx
it follows that Ze�xLnþ1ðxÞ dx ¼ e�xðLnðxÞ � Lnþ1ðxÞÞ
so that Z a
0
e�xLnðxÞ dx ¼ e�aðLn�1ðaÞ � LnðaÞÞ ð5:7Þ
These polynomials are orthogonal with respect to the weight function wðxÞ ¼ e�x:
Z 1
0
e�xLnðxÞLmðxÞ dx ¼
0 for n 6¼ m
1 for n ¼ m
8<: ð5:8Þ
and can be shown to form a complete orthogonal system over the interval ½0,1Þ:Thus a generalized Fourier series called the Fourier–Laguerre series for a function
f (x) defined over ½0,1Þ is given by
�ðxÞ ¼X1n¼0
cnLnðxÞ ð5:9Þ
where
cn ¼
Z 1
0
e�xLnðxÞ fðxÞ dx ð5:10Þ
5.1. A simple step function
We study the step function
f ðtÞ ¼
1 for 0 < t < 1
�1 for 1 < t < 2
0 for 2 < t
8><>:
2The formula given on the website www.efunda.com/math/Laguerre is incorrect.
982 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
where we assume for simplicity, f ð1Þ ¼ 0 and f ð2Þ ¼ �1=2, so that f (t) is definedover the interval ð0,1Þ and equals its Fourier–Laguerre series (the convergence ispointwise). The coefficients of the Fourier–Laguerre series for f (x) are easy tocompute. It follows from equation (5.7) that
cn ¼
Z 1
0
e�xf ðxÞLnðxÞ dx
¼
Z 1
0
e�xLnðxÞ dx�
Z 2
1
e�xLnðxÞ dx
¼2
eðLn�1ð1Þ � Lnð1ÞÞ �
1
e2ðLn�1ð2Þ � Lnð2ÞÞ
The nth partial sum of the Fourier–Laguerre series is denoted by �nðxÞ: The plotsshown in figure 4 of �50ðxÞ and �200ðxÞ overlaid with a plot of f (x) indicates theconvergence to be relatively slow.
In a similar manner as above, we let xn denote the abscissa of the local maximumoccurring just to the left of the vertical line x ¼ 1: These values are computed asbefore by using the FindRoot command of Mathematica applied to
�0nðxÞ ¼
Xnk¼0
ckL0kðxÞ
¼Xnk¼0
ckk
xðLkðxÞ � Lk�1ðxÞÞ
We record the values of xn, �nðxnÞ, and the difference between �nðxnÞ and the Gibbsconstant 1:178979, for various values of n.
n xn �nðxnÞ difference
50 0:600498 1:139897 �0:039083
100 0:699299 1:190787 0:011807
200 0:796707 1:165550 �0:013430
500 0:865052 1:179966 0:000986
6. Legendre polynomials
Legendre polynomials arise from Legendre’s differential equation
ð1� x2Þy00 � 2xy0 þ �ð�þ 1Þy ¼ 0 ð6:1Þ
Figure 4. Sums of 50 and 200 terms of the Fourier–Laguerre series.
Classroom notes 983
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
where � is a real number. If � ¼ n, a non-negative integer, then certain solutions,
denoted PnðxÞ, turn out to be polynomials of degree n and are called Legendre
polynomials. The first four Legendre polynomials are:
P0ðxÞ ¼ 1
P1ðxÞ ¼ x
P2ðxÞ ¼3
2x2 �
1
2
P3ðxÞ ¼5
2x3 �
3
2x
These polynomials can be generated by the formula of Rodrigues:
P0ðxÞ ¼ 1, PnðxÞ ¼1
2nn!
d
dxðx2 � 1Þn
where n ¼ 1, 2, . . . : Each PnðxÞ is a polynomial of degree n and is an odd function if
n is odd and an even function if n is even. Moreover, Pnð1Þ ¼ 1 and Pnð�1Þ ¼ ð�1Þn
for all n � 0:There are a number of identities relating the Pn and their derivatives, we note
ðnþ 1ÞPnþ1ðxÞ ¼ ð2nþ 1ÞxPnðxÞ � nPn�1ðxÞ ð6:2Þ
ð2nþ 1ÞPnðxÞ ¼ P0nþ1ðxÞ � P0
n�1ðxÞ ð6:3Þ
ðx2 � 1ÞP0nðxÞ ¼ nxPnðxÞ � nPn�1ðxÞ ð6:4Þ
so that ZPnðxÞ dx ¼
1
2nþ 1Pnþ1ðxÞ � Pn�1ðxÞ�
ð6:5Þ
and finally,
Pnð0Þ ¼
0 for n odd
ð�1Þn=2 �1 � 3 � 5 � � � ðn� 1Þ
2 � 4 � 6 � � � nfor n even
8<: ð6:6Þ
These polynomials are orthogonal with respect to the weight function wðxÞ ¼ 1:
Z 1
�1
PnðxÞPmðxÞ dx ¼
0 for n 6¼ m
2
2nþ 1for n ¼ m
8<: ð6:7Þ
and can be shown to form a complete orthogonal system over the interval ½�1, 1�:For more details, see [7, Chapter 7]. Thus these polynomials can be used to produce
a generalized Fourier series called a Fourier–Legendre series. Given a function f (x)
defined over ½�1, 1�, the Fourier–Legendre series for a function f (x) is
�ðxÞ ¼X1n¼0
cnPnðxÞ
where
cn ¼2nþ 1
2
Z 1
�1
PnðxÞ f ðxÞ dx ð6:8Þ
984 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
It is of interest to note that there is another way to think about the Legendre
polynomials. Given a sequence of functions gnðxÞ, having no finite number linearly
dependent, the Gram–Schmidt orthogonalization process can be used to produce
an orthogonal system �nðxÞ where �1ðxÞ ¼ g1ðxÞ, �2ðxÞ ¼ c1g1ðxÞ þ c2g2ðxÞ, . . . ,
where the constants c1, c2, . . . are determined by the process. The choice of
gnðxÞ ¼ xn in this process produces the Legendre polynomials (up to constant
multiples).
6.1. A simple step function
We consider the simple example of a step function
gðxÞ ¼
1 �14x < 0
0 x ¼ 0
�1 0 < x41
8>><>>: ð6:9Þ
To investigate the Fourier–Legendre series approximations of g, we set
�nðxÞ ¼Xnk¼1
ckPkðxÞ ð6:10Þ
and we plot g and �10, and �100 in Figure 5.For this step function g, the Fourier–Legendre coefficients cn are also easy to
calculate. First note that since g(x) is an odd function and P2kðxÞ is even, each
c2k ¼ 0. It follows from equations (6.2) and (6.6) that
c2k�1 ¼4k� 1
2
Z 0
�1
P2k�1ðxÞ dx�
Z 1
0
P2k�1ðxÞ dx
� �ð6:11Þ
¼4k� 1
2
P2k�2ð�1Þ � 2P2k�2ð0Þ � P2kð�1Þ þ 2P2kð0Þ
4k� 1
� �
¼ P2kð0Þ � P2k�2ð0Þ
Figure 5. Sums of 10 and 100 terms of the Fourier–Lagendre series.
Classroom notes 985
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
We can simplify this a bit by taking advantage of the formula (6.6),
P2kð0Þ � P2k�2ð0Þ ¼ ð�1Þk1 � 3 � 5 � � � ð2k� 1Þ
2kk!� ð�1Þk�1 1 � 3 � 5 � � � ð2k� 3Þ
2k�1ðk� 1Þ!
¼ ð�1Þk1 � 3 � 5 � � � ð2k� 3Þ � ð2k� 1Þ
2kk!
þ ð�1Þk1 � 3 � 5 � � � ð2k� 3Þ � 2k
2k�1ðk� 1Þ! � 2k
¼ ð�1Þk1 � 3 � 5 � � � ð2k� 3Þ
2kk!2k� 1þ 2kf g
¼ ð�1Þk1 � 3 � 5 � � � ð2k� 3Þ
2k�1ðk� 1Þ!
4k� 1
2k
� �
Hence it follows that
P2kð0Þ � P2k�2ð0Þ ¼ �4k� 1
2kP2k�2ð0Þ ð6:12Þ
so
c2k�1 ¼ �4k� 1
2kP2k�2ð0Þ ð6:13Þ
¼1
2k� 2
� �P2k�2ð0Þ
The Fourier–Legendre series for g is given by
�ðxÞ ¼X1k¼1
c2k�1P2k�1ðxÞ ð6:14Þ
and the nth partial sum is
�nðxÞ ¼Xnk¼1
1
2k� 2
� �P2k�2ð0ÞP2k�1ðxÞ ð6:15Þ
The value of x to the immediate left of 0 for which�nðxÞ is a maximum is denoted xn:We investigate the over-shoot �nðxnÞ.
n xn �nðxnÞ difference10 �0:295758 1:186753 0:00773350 �0:062179 1:179307 0:000327100 �0:031256 1:179062 0:000083200 �0:015668 1:179000 0:000021
Once again the over-shoots appear to be converging to the Gibbs constant.
7. A plausibility argument
Let us suppose we are given a countable family of integrable functions f�nðxÞg
defined over a closed interval I ¼ ½a, b� which are orthogonal with respect to an
986 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
integrable weight function w(x) and so that given an integrable function f (x) defined
on I, we have a generalized Fourier series expansion
f ðxÞ ¼X1n¼1
cn�nðxÞ ð7:1Þ
where each cn is given by
cn ¼
Z b
a
f ðxÞwðxÞ�nðxÞ dx ð7:2Þ
and the convergence is uniform over any subinterval of I not containing point at
which f has a jump discontinuity. We assume that the Fourier series for f is given by
f ðxÞ ¼X1n¼0
an cosðnxÞ þ bn sinðnxÞ�
ð7:3Þ
as usual (here we have identified f with its periodic extension so that f is defined over
the entire real line). In this case the Fourier coefficients of f are given by
an ¼1
b� a
Z b
a
f ðxÞ cosðnxÞ dx for n � 1
bn ¼1
b� a
Z b
a
f ðxÞ sinðnxÞ dx for n � 1
and
a0 ¼2
b� a
Z b
a
f ðxÞ dx
Each of the �n has a Fourier series representation
�nðxÞ ¼X1k¼0
ank cosðkxÞ þ bnk sinðkxÞ�
ð7:4Þ
Truncating equation (7.1), we have
f ðxÞ �Xmn¼1
cn�nðxÞ ð7:5Þ
and using a similar truncation in equation (7.4) we have
f ðxÞ �Xmn¼1
cnXmk¼0
ank cosðkxÞ þ bnk sinðkxÞ�
¼Xmn¼1
Xmk¼0
cnank cosðkxÞ þ cnb
nk sinðkxÞ
� Since both sums are finite, we can commute them and obtain
f ðxÞ �Xmk¼0
Xmn¼1
cnank cosðkxÞ þ cnb
nk sinðkxÞ
� ð7:6Þ
¼Xmk¼0
Xmn¼1
cnank
!cosðkxÞ þ
Xmn¼1
cnbnk
!sinðkxÞ
( )
Classroom notes 987
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
Equation (7.6) appears to be ‘almost’ a partial sum of the Fourier series for f. Thus itis ‘plausible’ that
f ðxÞ ¼ limm!1
Xmk¼0
Xmn¼1
cnank
!cosðkxÞ þ
Xmn¼1
cnbnk
!sinðkxÞ
( )ð7:7Þ
¼X1k¼0
X1n¼1
cnank
!cosðkxÞ þ
X1n¼1
cnbnk
!sinðkxÞ
( )
By the uniqueness to the Fourier series representation, we have
ak ¼X1n¼1
cnank
!and bk ¼
X1n¼1
cnbnk
!ð7:8Þ
Hence the truncated generalized Fourier series representations for f are ‘almost’truncated Fourier series for f and hence the Gibbs constants should be the same.
If we assume uniform convergence of both the generalized Fourier series inequation (7.1) and the Fourier series for f in equation (7.4) (which occurs if f iscontinuous), then for k>0 we have
ak ¼1
b� a
Z b
a
f ðxÞ cosðkxÞ dx ¼1
b� a
Z b
a
X1n¼1
cn�nðxÞ cosðkxÞ dx
¼1
b� a
X1n¼1
Z b
a
cn�nðxÞ cosðkxÞ dx
¼X1n¼1
cnb� a
Z b
a
�nðxÞ cosðkxÞ dx
¼X1n¼1
cnank
Replacing ak by a0=2 in the above calculation shows that
a02¼X1n¼1
cnan0
A similar calculation for the bk has
bk ¼X1n¼1
cnbnk
This shows that indeed, under the uniform convergence assumption, equation (7.7)is the Fourier series for f.
8. Conclusions
While our numerical investigations are not absolutely conclusive, we believethat the Gibbs constant for a jump discontinuity for Fourier, Fourier–Bessel,
988 Classroom notes
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013
Fourier–Chebyshev, Fourier–Hermite, Fourier–Laguerre and Fourier–Legendre are
all the same. We believe there is a fundamental principle involved here and think that
the plausibility argument can be made rigorous. We hope that these numerical
investigations provide the impetus for further student investigations
including the following:
. Provide a theoretical proof using "’s for the plausibility argument showing that
the Gibbs constants are the same.. Explain exactly where and why the hypothesis of integrability is needed.
. Investigate the slowness of the convergence of each of the generalized Fourier
series representations as compared to the Fourier series representation of each
of the step functions used above.
. Which of the generalized Fourier series representations offer computational
problems? How long does it take to compute (and plot) these approximations
say for n ¼ 1000, n ¼ 2000, etc. What is the trade-off between computing timeand desired accuracy?
. There are other collections of orthogonal polynomials, such as the Jacobi
polynomials, forming a complete orthogonal system over an appropriate
interval, which can produce generalized Fourier series. And of course there
are general Sturm–Liouville series. What is the situation for these series with
respect to a Gibbs phenomenon? Are there numerical shortcuts for the rapid
calculation of the generalized Fourier coefficients?
We believe that numerical investigations, such as we have outlined above, can
be effective in illustrating the need for theoretical work and that the one can go hand-
in-hand with the other. The Gibbs phenomenon provides a beautiful visual problem
to motivate an investigation into much of the general theory in beginning analysis
and approximation theory in particular.
References
[1] Boyce, W. E. and DiPrima, R. C., 1992, Elementary Differential Equations, 5th Edn(New York: John Wiley & Sons).
[2] Fay, T. H. and Kloppers, P. H., 2001, The Gibbs phenomenon, International Journalfor Mathematics Education in Science and Technology, 32, 73–89.
[3] Fay, T. H. and Schulz, K. G., 2001, The Gibbs phenomenon from a signal processingpoint of view, International Journal for Mathematics Education in Science and Technology,32, 863–872.
[4] Fay, T. H. and Kloppers, P. H., 2003, The Gibbs phenomenon for Fourier–Besselseries, International Journal for Mathematics Education in Science and Technology, 34,199–217.
[5] Abramowitz, M. and Stegun, I. A., 1968, Handbook of Mathematical Functions (U.S.Dept. of Commerce: National Bureau of Standards).
[6] Thompson, W. J., 1997, Atlas for Computing Mathematical Functions (New York:John Wiley & Sons).
[7] Kaplan, W., 1952, Advanced Calculus (Reading, MA: Addison-Wesley).[8] Wolfram, S., 1996, The Mathematica Book, 3rd Edn (New York: Wolfram Media/
Cambridge University Press).
Classroom notes 989
Dow
nloa
ded
by [
Dal
hous
ie U
nive
rsity
] at
13:
20 1
9 Se
ptem
ber
2013