Abstract
We present an \({\mathcal{O}({N\,{\rm log}\,N})}\) algorithm for the calculation of the first N coefficients in an expansion of an analytic function in Legendre polynomials. In essence, the algorithm consists of an integration of a suitably weighted function along an ellipse, a task which can be accomplished with Fast Fourier Transform, followed by some post-processing. The mathematical underpinning of this algorithm is an old formula that expresses expansion coefficients \({\hat{f}_m}\) as infinite linear combinations of derivatives. We evaluate the latter with the Cauchy theorem, thereby expressing each \({\hat{f}_m}\) as a scaled integral of \({f(z)\varphi_m(z)/z^{m+1}}\) along an appropriate contour, where \({\varphi_m}\) is a slowly converging hypergeometric function. Next, we transform \({\varphi_m}\) into another hypergeometric function which converges rapidly. Once we replace the latter function by its truncated Taylor expansion and choose an appropriate elliptic contour, we obtain an expression for the \({\hat{f}_m}\)s which is amenable to rapid computation.
Similar content being viewed by others
Explore related subjects
Discover the latest articles and news from researchers in related subjects, suggested using machine learning.References
Abramowitz, M., Stegun, I.A. (eds.): Handbook of Mathematical Functions. National Bureau of Standards, Washington (1964)
Alpert B.K., Rokhlin V.: A fast algorithm for the evaluation of Legendre expansions. SIAM J. Sci. Statist. Comput. 12, 158–179 (1991)
Bornemann, F.: Accuracy and stability of computing high-order derivatives of analytic functions by Cauchy integrals. Technical report, Zentrum Mathematik, Technische Universität München (2010)
Brunner, H., Iserles, A., Nørsett, S.P.: The spectral problem for highly oscillatory Fredholm operators. J. Integral Eqn. Appl. (to appear) (2010)
Gauss, C.F.: Nachlass, Theoria Interpolationis Methodo Nova Tractata, in ‘Carl Friedrich Gauss Werke, Band 3’, Königlichen Gesellschaft der Wissenschaften, Göttingen, pp. 265–330 (1866)
Huybrechs, D., Olver, S.: Highly oscillatory quadrature. In: Engquist, B., Fokas, A., Hairer, E., Iserles, A. (eds.) ‘Highly Oscillatory Problems’, number 366 in ‘London Mathematical Society Lecture Note Series’, Cambridge University Press, Cambridge, chapter 2, pp. 25–50 (2009)
Legendre, A.M.: Exercices de Calcul Integral. Sur Divers Ordres de Transcendances et sur les Quadratures, Courcier, Paris (1817)
Potts D., Steidl G., Tasche M.: Fast algorithms for discrete polynomial transforms. Maths Comp. 67, 1577–1590 (1998)
Rainville E.D.: Special Functions. Macmillan, New York (1960)
Trefethen L.N.: Is Gauss quadrature better than Clenshaw–Curtis?. SIAM Rev. 50, 67–87 (2008)
Whittaker E.T., Watson G.N.: A Course of Modern Analysis. Cambridge University Press, Cambridge (1902)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Iserles, A. A fast and simple algorithm for the computation of Legendre coefficients. Numer. Math. 117, 529–553 (2011). https://doi.org/10.1007/s00211-010-0352-1
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00211-010-0352-1