SPECTRAL METHODS: Algorithms, Analysis and Applications
Springer Series in Computational Mathematics, Volume 41, Springer, 2011
by J. Shen, T. Tang and L. Wang
This book can be oredered at the website of
Springer. It consists of 9 chapters with about 480 pages.
Please click to view Table of Contents.
We provide below a collection of Matlab Routines on some fundamental spectral algorithms
presented in this book. By no means, these functions are coded optimally, though we have attempted to do so.
We have made significant efforts to test all algorithms, but it is inevitable that
some functions might fail to work for some choices of arguments. The users are more than welcome to
email us if you find any bugs or have any comments.
Erratum for the book
Lecture Notes (Part 1)
for Short Course on Spectral Methods
Lecture Notes (Part 2)
for Short Course on Spectral Methods
Lecture Notes (Part 3)
for Short Course on Spectral Methods
Instructions for the functions
Legendre spectral methods (all files are zipped:
Legendre.zip)

lepoly.m
(evaluate Legendre polynomial and its firstorder derivative)
 lepolym.m
(evaluate Legendre polynomials and their firstorder derivatives up to degree n)
 legs.m
(compute LegendreGauss quadrature nodes and weights)
 legsndm.m
(compute LegendreGauss points by the eigenmethod)
 legslb.m
(compute LegendreGaussLobatto quadrature nodes and weights)
 legslbndm.m
(compute LegendreGaussLobatto points by the eigenmethod)
 legslbwt.m
(compute LegendreGaussLobatto quadrature weights by a very stable weight expression)
 legsrd.m
(compute LegendreGaussRadau quadrature nodes and weights)
 legsdiff.m
(compute firstorder LegendreGauss differentiation matrix)
 legslbdiff.m
(compute firstorder LegendreGaussLobatto differentiation matrix)
 legsrddiff.m
(compute firstorder LegendreGaussRadau differentiation matrix)
 ledisctran.m
(perform discrete Legendre transform)
 lefreqdiff.m
(perform spectral differentiation in the frequency space)
Chebyshev spectral methods (all files are zipped:
Chebyshev.zip)
 chebdiff.m
(compute firstorder ChebyshevGaussLobatto differentiation matrix)
 chebfft.m
(perform Chebyshev spectral differentiation via FFT)
Jacobi spectral methods (all files are zipped:
Jacobi.zip)
 japoly.m
(compute Jacobi polynomial and its firstorder derivative)
 japolym.m
(compute Jacobi polynomials and its firstorder derivatives up to degree n)

japolyja1.m
(compute normalized Jacobi polynomial and its firstorder derivative)

gebauerpoly.m
(compute Gegenbauer polynomial and its firstorder derivative)

jags.m
(compute JacobiGauss quadrature nodes and weights; updated on June 26, 2012)

jagslb.m
(compute JacobiGaussLobatto quadrature nodes and weights updated on June 26, 2012)

jagsrd.m
(compute JacobiGaussRadau quadrature nodes and weights updated on June 26, 2012)

jagsdiff.m
(compute firstorder JacobiGauss differentiation matrix)

jagslbdiff.m
(compute firstorder JacobiGaussLobatto differentiation matrix)

jagsrddiff.m
(compute firstorder JacobiGaussRadau differentiation matrix)
 jadisctran.m
(perform discrete Jacobi transform)
Laguerre spectral methods (all files are zipped:
Laguerre.zip uploaded on December 23, 2011)

lapoly.m
and
glapoly.m
(evaluate Laguerre/generalized Laguerre polynomials and their firstorder derivatives)

lafun.m
and
glafun.m
(evaluate Laguerre and generalized Laguerre functions and their firstorder derivatives)

lapolym.m
and
lafunm.m
(evaluate Laguerre polynomial/function and firstorder derivatives up to degree n)

lags.m
and
glags.m
(compute (generalized) LaguerreGauss quadrature nodes and weights)

lagsrd.m
and
glagsrd.m
(compute (generalized) LaguerreGaussRadau quadrature nodes and weights)

lagsdiff.m
and
lagsrddiff.m
(compute firstorder LaguerreGauss/GaussRadau differentiation matrix)

lafgsdiff.m
and
lafgsrddiff.m
(compute firstorder differentiation matrix of Laguerre function approach)

lafdisctran.m
(perform discrete transform of Laguerre function approach)

laffreqdiff.m
(perform spectral differentiation in the frequency space of Laguerre function approach)
Hermite spectral methods (all files are zipped:
Hermite.zip uploaded on December 23, 2011)

hepoly.m
and
hepolyn.m
(evaluate Hermite polynomials and normalized Hermite polynomials)

hefun.m
and
hefunm.m
(evaluate Hermite functions of degree n/of degree up to n)

hegs.m
(compute HermiteGauss quadrature nodes and weights)

hegsdiff.m
and
hefgsdiff.m
(compute firstorder differentiation matrix of Hermite polynomial/function)

hefdisctran.m
(perform discrete transform of Hermite function approach)

heffreqdiff.m
(perform spectral differentiation in the frequency space of Hermite function approach)
Many more to come ......
Useful links
