Skip to main content
Log in

A fast and simple algorithm for the computation of Legendre coefficients

  • Published:
Numerische Mathematik Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

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

  1. Abramowitz, M., Stegun, I.A. (eds.): Handbook of Mathematical Functions. National Bureau of Standards, Washington (1964)

  2. Alpert B.K., Rokhlin V.: A fast algorithm for the evaluation of Legendre expansions. SIAM J. Sci. Statist. Comput. 12, 158–179 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  3. 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)

  4. Brunner, H., Iserles, A., Nørsett, S.P.: The spectral problem for highly oscillatory Fredholm operators. J. Integral Eqn. Appl. (to appear) (2010)

  5. 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)

  6. 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)

  7. Legendre, A.M.: Exercices de Calcul Integral. Sur Divers Ordres de Transcendances et sur les Quadratures, Courcier, Paris (1817)

  8. Potts D., Steidl G., Tasche M.: Fast algorithms for discrete polynomial transforms. Maths Comp. 67, 1577–1590 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  9. Rainville E.D.: Special Functions. Macmillan, New York (1960)

    MATH  Google Scholar 

  10. Trefethen L.N.: Is Gauss quadrature better than Clenshaw–Curtis?. SIAM Rev. 50, 67–87 (2008)

    Article  MATH  MathSciNet  Google Scholar 

  11. Whittaker E.T., Watson G.N.: A Course of Modern Analysis. Cambridge University Press, Cambridge (1902)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Arieh Iserles.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00211-010-0352-1

Mathematics Subject Classification (2000)