Fast algorithms based on asymptotic expansions of special functions

Similar documents
A fast Chebyshev Legendre transform using an asymptotic formula

A fast analysis-based discrete Hankel transform using asymptotic expansions

Computing Gauss-Jacobi quadrature rules

Computing the common zeros of two bivariate functions via Bézout resultants Colorado State University, 26th September 2013

Research Statement. James Bremer Department of Mathematics, University of California, Davis

Key words. Hankel transform, Bessel functions, asymptotic expansions, fast Fourier transform

Fast Algorithms for Spherical Harmonic Expansions

Downloaded 08/07/13 to Redistribution subject to SIAM license or copyright; see

Recurrence Relations and Fast Algorithms

Contents. I Basic Methods 13

Fast and Accurate Computation of Gauss-Legendre and Gauss-Jacobi Quadrature Nodes and Weights N. Hale A. Townsend

Towards a Faster Spherical Harmonic transform

c 2006 Society for Industrial and Applied Mathematics

A fast and well-conditioned spectral method: The US method

ITERATION-FREE COMPUTATION OF GAUSS-LEGENDRE QUADRATURE NODES AND WEIGHTS

A FAST SPHERICAL HARMONICS TRANSFORM ALGORITHM

arxiv: v1 [math.na] 20 Oct 2014

A Riemann Hilbert approach to Jacobi operators and Gaussian quadrature

Fast algorithms for Jacobi expansions via nonoscillatory phase functions

Quadrature Formula for Computed Tomography

Sparse Fourier Transform via Butterfly Algorithm

Index. for Ɣ(a, z), 39. convergent asymptotic representation, 46 converging factor, 40 exponentially improved, 39

Fast Structured Spectral Methods

A Fast Spherical Filter with Uniform Resolution

ETNA Kent State University

arxiv: v1 [math.na] 4 Nov 2015

Fourier extension and sampling on the sphere

PHYS 404 Lecture 1: Legendre Functions

Comparison of Clenshaw-Curtis and Gauss Quadrature

Fast Algorithms for the Computation of Oscillatory Integrals

Solutions to Laplace s Equation in Cylindrical Coordinates and Numerical solutions. ρ + (1/ρ) 2 V

Ten things you should know about quadrature. Nick Trefethen, Vanderbilt, Wed. 28 May 8:35 PM

Reconstruction of sparse Legendre and Gegenbauer expansions

Instructions for Matlab Routines

MATH20602 Numerical Analysis 1

MATH20602 Numerical Analysis 1

A Fast Algorithm for Spherical Grid Rotations and its Application to Singular Quadrature

arxiv: v3 [math.na] 30 Nov 2012

Continuous analogues of matrix factorizations NASC seminar, 9th May 2014

Fast Multipole Methods for The Laplace Equation. Outline

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

The spectral transform method

Sparse and Fast Fourier Transforms in Biomedical Imaging

Ten things you should know about quadrature

Krylov Subspace Methods for the Evaluation of Matrix Functions. Applications and Algorithms

b n x n + b n 1 x n b 1 x + b 0

Chapter 4. Solution of Non-linear Equation. Module No. 1. Newton s Method to Solve Transcendental Equation

The automatic solution of PDEs using a global spectral method

Spherical Wave Approach (SWA) for the electromagnetic modelling of 3D GPR scenarios. Nicola Tedeschi

Calculation of Highly Oscillatory Integrals by Quadrature Method

Solution of Matrix Eigenvalue Problem

Explicit construction of rectangular differentiation matrices

Speeding up numerical computations via conformal maps

Section 5.2 Series Solution Near Ordinary Point

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Chapter 5 Fast Multipole Methods

Gauss Hermite interval quadrature rule

Introduction. Chapter One

Chebfun and numerical quadrature

Final Year M.Sc., Degree Examinations

FastMMLib: a generic Fast Multipole Method library. Eric DARRIGRAND. IRMAR Université de Rennes 1

Alex Townsend Cornell University

Gaussian interval quadrature rule for exponential weights

COMPUTATION OF BESSEL AND AIRY FUNCTIONS AND OF RELATED GAUSSIAN QUADRATURE FORMULAE

A generalized Prony method for sparse approximation

Mean Convergence of Interpolation at Zeros of Airy Functions

Jacobi-Angelesco multiple orthogonal polynomials on an r-star

HOW TO DEVELOP A TOP- TEN ALGORITHM IN THE 21ST CENTURY

Chebfun2: Exploring Constant Coefficient PDEs on Rectangles

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

Fast variants of the Golub and Welsch algorithm for symmetric weight functions

A FAST SOLVER FOR ELLIPTIC EQUATIONS WITH HARMONIC COEFFICIENT APPROXIMATIONS

Lecture 1: Introduction

Numerical Analysis Comprehensive Exam Questions

INTEGRAL TRANSFORMS and THEIR APPLICATIONS

On Multivariate Newton Interpolation at Discrete Leja Points

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

ON INTERPOLATION AND INTEGRATION IN FINITE-DIMENSIONAL SPACES OF BOUNDED FUNCTIONS

A Numerical Solution of the Lax s 7 th -order KdV Equation by Pseudospectral Method and Darvishi s Preconditioning

Lecture 4.6: Some special orthogonal functions

Stability of Krylov Subspace Spectral Methods

Orthogonal polynomials

Reconstruction of sparse Legendre and Gegenbauer expansions

Automatica, 33(9): , September 1997.

Recall that any inner product space V has an associated norm defined by

SECTION A. f(x) = ln(x). Sketch the graph of y = f(x), indicating the coordinates of any points where the graph crosses the axes.

FFTs for the 2-Sphere Improvements and Variations

On the remainder term of Gauss Radau quadratures for analytic functions

Positive Denite Matrix. Ya Yan Lu 1. Department of Mathematics. City University of Hong Kong. Kowloon, Hong Kong. Abstract

SPECIAL FUNCTIONS OF MATHEMATICS FOR ENGINEERS

MATH 350: Introduction to Computational Mathematics

arxiv: v1 [cs.lg] 26 Jul 2017

Quadrature Based Approximations of Non-integer Order Integrator on Finite Integration Interval

The Fast Multipole Method: Numerical Implementation

Numerical Integration (Quadrature) Another application for our interpolation tools!

Numerische Mathematik

A Spectral Time-Domain Method for Computational Electrodynamics

Multipole-Based Preconditioners for Sparse Linear Systems.

12.0 Properties of orthogonal polynomials

arxiv: v3 [math.na] 30 Nov 2016

Transcription:

Fast algorithms based on asymptotic expansions of special functions Alex Townsend MIT Cornell University, 23rd January 2015, CAM Colloquium

Introduction Two trends in the computing era Tabulations Software Logarithms Gauss quadrature Special functions 1/22

Introduction Two trends in the computing era Tabulations Software Logarithms Gauss quadrature Special functions Classical analysis Numerical analysis = ~~ Fast multipole method Butterfly schemes Iterative algorithms Finite element method 1/22

Introduction A selection of my research Algebraic geometry p(x, y) q(x, y) = 0 [Nakatsukasa, Noferini, & T., 2015] K Approx. theory f(x, y) j=1 c j y r j (x) [Trefethen & T., 2014] 2/22

Introduction A selection of my research Algebraic geometry p(x, y) q(x, y) = 0 [Nakatsukasa, Noferini, & T., 2015] [Battels & Trefethen, 2004] K Approx. theory f(x, y) j=1 c j y r j (x) [Trefethen & T., 2014] 2/22

Introduction Many special functions are trigonometric-like Trigonometric functions cos(ωx), sin(ωx) Chebyshev polynomials T n (x) Legendre polynomials P n (x) Bessel functions J v (z) Airy functions Ai(x) Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc. 3/22

Introduction Many special functions are trigonometric-like Trigonometric functions cos(ωx), sin(ωx) Chebyshev polynomials T n (x) Legendre polynomials P n (x) Bessel functions J v (z) Airy functions Ai(x) Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc. 3/22

Introduction Many special functions are trigonometric-like Trigonometric functions cos(ωx), sin(ωx) Chebyshev polynomials T n (x) Legendre polynomials P n (x) Bessel functions J v (z) Airy functions Ai(x) Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc. 3/22

Introduction Many special functions are trigonometric-like Trigonometric functions cos(ωx), sin(ωx) Chebyshev polynomials T n (x) Legendre polynomials P n (x) Bessel functions J v (z) Airy functions Ai(x) Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc. 3/22

Introduction Many special functions are trigonometric-like Trigonometric functions cos(ωx), sin(ωx) Chebyshev polynomials T n (x) Legendre polynomials P n (x) Bessel functions J v (z) Airy functions Ai(x) Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc. 3/22

Introduction Many special functions are trigonometric-like Trigonometric functions cos(ωx), sin(ωx) Chebyshev polynomials T n (x) Legendre polynomials P n (x) Bessel functions J v (z) Airy functions Ai(x) Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc. 3/22

Introduction Asymptotic expansions of special functions Legendre polynomials P n (cos θ) ~ C n M 1 h m,n cos m + n + m=0 1 2 θ m + 1 2 (2 sin θ) m+1 2 π 2, n Thomas Stieltjes Bessel functions J 0 z ~ M 1 2 πz (cos z π 4 m=0 1 m a 2m z 2m sin(z π M 1 ( 1) m 4 ) a 2m+1 z 2m+1 ) m=0 z Hermann Hankel 4/22

Introduction Numerical pitfalls of an asymptotic expansionist J 0 z = M 1 2 πz (cos z π 4 m=0 1 m a 2m z 2m sin(z π M 1 ( 1) m 4 ) a 2m+1 z 2m+1 ) + R M (z) m=0 Fix M. Where is the asymptotic expansion accurate? 5/22

Introduction Talk outline Using asymptotics expansions of special functions: I. Computing Gauss quadrature rules. [Hale & T., 2013], [T., Trodgon, & Olver, 2015] II. Fast transforms based on asymptotic expansions. [Hale & T., 2014], [T., 2015] 6/22

Part I: Computing Gauss quadrature rules Part I: Computing Gauss quadrature rules P n (x) = Legendre polynomial of degree n 7/22

Part I: Computing Gauss quadrature rules Definition n-point quadrature rule: 1 1 f x dx n k=1 w k f x k Gauss quadrature rule: x k = kth zero of P n w k = 2(1 x k 2 ) -1 [P n (x k )] -2 1. Exactly integrates polynomials of degree 2n - 1. Best possible. 2. Computed by the Golub Welsch algorithm. [Golub & Welsch, 1969] 3. In 2004: no scheme for computing Gauss rules in O(n). [Bailey, Jeyabalan, & Li, 2004] 8/22

Quadrature error Execution time Part I: Computing Gauss quadrature rules Gauss quadrature experiments Quadrature error Execution time n n The Golub Welsch algorithm is beautiful, but not the state-of-the-art. There is another way... 9/22

Part I: Computing Gauss quadrature rules Newton s method Newton s method (with asymptotics and a change of variables) Solve P n (cos θ) (sin θ) 1/2 = 0, θ (0, π). Isaac Newton 1. Evaluation scheme for P n (cos θ) (sin θ) 1/2 2. Evaluation scheme for d dθ P n( cos θ) (sin θ) 1/21/2 3. Initial guesses for cos -1 (x k ) 10/22

Part I: Computing Gauss quadrature rules Newton s method with asymptotics and a change of variables Newton s method (with asymptotics and a change of variables) Solve P n (cos θ) (sin θ) 1/2 = 0, θ (0, π). Isaac Newton 1. Evaluation scheme for P n (cos θ) (sin θ) 1/2 P n (x) 2. Evaluation scheme for d dθ P n( cos θ) (sin θ) 1/2 ) 1/2 3. Initial guesses for cos -1 (x k ) 10/22

Part I: Computing Gauss quadrature rules Newton s method with asymptotics and a change of variables Newton s method (with asymptotics and a change of variables) Solve P n (cos θ) (sin θ) 1/2 = 0, θ (0, π). Isaac Newton 1. Evaluation scheme for P n (cos θ) (sin θ) 1/2 P n (x) 2. Evaluation scheme for d dθ P n( cos θ) (sin θ) 1/2 ) 1/2 3. Initial guesses for cos -1 (x k ) 10/22

Part I: Computing Gauss quadrature rules Newton s method with asymptotics and a change of variables Newton s method (with asymptotics and a change of variables) Solve P n (cos θ) (sin θ) 1/2 = 0, θ (0, π). Isaac Newton 1. Evaluation scheme for P n (cos θ) (sin θ) 1/2 2. Evaluation scheme for d P dθ n( cos θ) (sin θ) 1/2 3. Initial guesses for cos -1 (x k ) P n (cos θ) (sin θ) 1/2 10/22

Part I: Computing Gauss quadrature rules Newton s method with asymptotics and a change of variables Newton s method (with asymptotics and a change of variables) Solve P n (cos θ) (sin θ) 1/2 = 0, θ (0, π). Isaac Newton 1. Evaluation scheme for P n (cos θ) (sin θ) 1/2 2. Evaluation scheme for d P dθ n( cos θ) (sin θ) 1/2 3. Initial guesses for cos -1 (x k ) P n (cos θ) (sin θ) 1/2 10/22

Part I: Computing Gauss quadrature rules Newton s method with asymptotics and a change of variables Newton s method (with asymptotics and a change of variables) Solve P n (cos θ) (sin θ) 1/2 = 0, θ (0, π). Isaac Newton 1. Evaluation scheme for P n (cos θ) (sin θ) 1/2 2. Evaluation scheme for d P dθ n( cos θ) (sin θ) 1/2 3. Initial guesses for cos -1 (x k ) P n (cos θ) (sin θ) 1/2 10/22

Part I: Computing Gauss quadrature rules Evaluation scheme for P n Interior (in grey region): P n (cos θ) (sin θ) 1/2 P n (cos θ)(sin θ) 1/2 C n M 1 h m,n cos m + n + m=0 1 2 θ m + 1 2 2(2 sin θ) m π 2 Boundary: M 1 Am (θ) M 1 Bm (θ) P n (cos θ)(sin θ) 1/2 θ 1 2(J 0 (ρθ) m=0 ρ 2m + θj 1(ρθ) m=0 ρ 2m+1), ρ = n + 1 2 Theorem init 1 For ε > 0, n 200, and θ k = (k 2 ) π n [Baratella & Gatteschi, 1988], Newton converges and the nodes are computed to an accuracy of O(ε) in O(nlog(1/ε)) operations. 11/22

Part I: Computing Gauss quadrature rules Evaluation scheme for P n Interior (in grey region): P n (cos θ) (sin θ) 1/2 P n (cos θ)(sin θ) 1/2 C n M 1 h m,n cos m + n + m=0 1 2 θ m + 1 2 2(2 sin θ) m π 2 Boundary: M 1 Am (θ) M 1 Bm (θ) P n (cos θ)(sin θ) 1/2 θ 1 2(J 0 (ρθ) m=0 ρ 2m + θj 1(ρθ) m=0 ρ 2m+1), ρ = n + 1 2 Theorem init 1 For ε > 0, n 200, and θ k = (k 2 ) π n [Baratella & Gatteschi, 1988], Newton converges and the nodes are computed to an accuracy of O(ε) in O(nlog(1/ε)) operations. 11/22

Part I: Computing Gauss quadrature rules Evaluation scheme for P n Interior (in grey region): P n (cos θ) (sin θ) 1/2 P n (cos θ)(sin θ) 1/2 C n M 1 h m,n cos m + n + m=0 1 2 θ m + 1 2 2(2 sin θ) m π 2 Boundary: M 1 Am (θ) M 1 Bm (θ) P n (cos θ)(sin θ) 1/2 θ 1 2(J 0 (ρθ) m=0 ρ 2m + θj 1(ρθ) m=0 ρ 2m+1), ρ = n + 1 2 Theorem For n 200 and θ k init = (k 1 2 ) π n [Baratella & Gatteschi, 1988], Newton converges to the nodes in O(n) operations. 11/22

Max error Part I: Computing Gauss quadrature rules Initial guesses for the nodes Interior: Use Tricomi s Max error in the initial guesses initial guesses. [Tricomi, 1950] Boundary: Use Olver s initial guesses. [Olver, 1974] Ignace Bogaert There are now better initial guesses. [Bogaert, 2014] 12/22

Part I: Computing Gauss quadrature rules The race to compute high-order Gauss quadrature The race to compute high-order Gauss quadrature [T., 2015] 13/22

Quadrature error Part I: Computing Gauss quadrature rules Applications 1. Psychological: Gauss quadrature rules are cheap. 2. Experimental mathematics: High precision quadratures. [Bailey, Jeyabalan, & Li, 2004] 3. Cosmic microwave background: Noise removal by L 2 -projection. 1 1 dx 1 1+100 2 x 2 Generically, composite rules converge algebraically. 14/22

Part II: Fast transforms based on asymptotic expansions Part II: Fast transforms based on asymptotic expansions P N c = P 0 cos θ 0 P cos θ 0 P 0 cos θ P cos θ c 1 c, θ k = kπ N 1 15/22

Part II: Fast transforms based on asymptotic expansions Fast transforms as evaluation schemes DFT f k = cn z n n=0 k, z k = e 2πik/N DCT f k = cn cos(nθ k ), θ k = kπ n=0 z 2 z 1 z 0 DCT f k = cn T n=0 n (cosθ k ) DLT f k = cn P n=0 n (cosθ k ) θ 0 θ 1 DHT f k = cn J v j v,n r k, r k = j v,n n=0 j v,n, j v,n = nth root of J v z 16/22

Part II: Fast transforms based on asymptotic expansions Fast transforms as evaluation schemes DFT f k = cn z n n=0 k, z k = e 2πik/N DCT f k = cn cos(nθ k ), θ k = kπ n=0 z 2 z 1 z 0 DCT f k = cn T n=0 n (cosθ k ) DLT f k = cn P n=0 n (cosθ k ) θ 0 θ 1 DHT f k = cn J v j v,n r k, r k = j v,n n=0 j v,n, j v,n = nth root of J v z 16/22

Part II: Fast transforms based on asymptotic expansions Fast transforms as evaluation schemes DFT f k = cn z n n=0 k, z k = e 2πik/N DCT f k = cn cos(nθ k ), θ k = kπ n=0 z 2 z 1 z 0 DCT f k = cn T n=0 n (cosθ k ) DLT f k = cn P n=0 n (cosθ k ) θ 0 θ 1 DHT f k = cn J v j v,n r k, r k = j v,n n=0 j v,n, j v,n = nth root of J v z 16/22

Part II: Fast transforms based on asymptotic expansions Fast transforms as evaluation schemes DFT f k = cn z n n=0 k, z k = e 2πik/N DCT f k = cn cos(nθ k ), θ k = kπ n=0 z 2 z 1 z 0 DCT f k = cn T n=0 n (cosθ k ) DLT f k = cn P n=0 n (cosθ k ) θ 0 θ 1 DHT f k = cn J v j v,n r k, r k = j v,n n=0 j v,n, j v,n = nth root of J v z 16/22

Part II: Fast transforms based on asymptotic expansions Related work James Cooley Leslie Greengard Emmanuel Candes Daniel Potts Ahmed, Tukey, Gauss, Gentleman, Natarajan, Rao Alpert, Barnes, Hut, Martinsson, Rokhlin, Mohlenkamp, Tygert Boag, Demanet, Michielssen, O Neil, Ying Driscoll, Healy, Steidl, Tasche Many others: Candel, Cree, Johnson, Mori, Orszag, Suda, Sugihara, Takami, etc. Fast transforms are very important. 17/22

Part II: Fast transforms based on asymptotic expansions Asymptotic expansions as a matrix decomposition The asymptotic expansion P n (cos θ k ) = C n 1 M 1 cos m + n + 2 θ k m + 1 π 2 2 h m,n (2 sin θ k ) m + 1/2 + R M,n (θ k ) m=0 gives a matrix decomposition (sum of diagonally scaled DCTs and DSTs): P N = M 1 m=0 D u m C ND Chm + D vm 0 0 0 0 S N 2 0 0 0 0 D Chm + R M,N P N = P ASY N + R M,N 18/22

Part II: Fast transforms based on asymptotic expansions Be careful and stay safe Error curve: R M,n θ k = ε Fix M. Where is the asymptotic expansion accurate? R M,N = R M,n (θ k ) 2C n h M,n (2 sin θ k ) M+1/2 19/22

Part II: Fast transforms based on asymptotic expansions Partitioning and balancing competing costs Theorem The matrix-vector product f = P N c can be computed in O (N((log N) 2 / log log N) operations. 0 1 α too small 20/22

Part II: Fast transforms based on asymptotic expansions Partitioning and balancing competing costs Theorem The matrix-vector product f = P N c can be computed in O(N((log N) 2 / log log N) operations. 0 1 α too small 20/22

Part II: Fast transforms based on asymptotic expansions Partitioning and balancing competing costs Theorem The matrix-vector product f = P N c can be computed in O(N((log N) 2 / log log N) operations. 0 1 α too small 20/22

Part II: Fast transforms based on asymptotic expansions Partitioning and balancing competing costs Theorem The matrix-vector product f = P N c can be computed in O(N((log N) 2 / log log N) operations. 0 1 α too large 20/22

Part II: Fast transforms based on asymptotic expansions Partitioning and balancing competing costs Theorem The matrix-vector product f = P N c can be computed in O(N((log N) 2 / log log N) operations. 0 1 α = O (1/ log N) P N (j) c P N EVAL c O ( N (log N)2 log log N ) O (N (log N) 2 log log N ) 20/22

Execution time Part II: Fast transforms based on asymptotic expansions Numerical results 10 0 Direct approach Using asymptotics 0.15 0.1 Modification of rough signals 0.05 10-1 0-0.05 10-2 -0.1-0.15-0.2 10-3 10 2 10 3 10 4 N 10 5-0.25 0.3 0.32 0.34 x No precomputation. 1 1 P n x e iωt dx = i m 2π ω J m+ 1 ( ω) 2 21/22

Execution time Future work Fast spherical harmonic transform Spherical harmonic transform: Existing approaches 10 4 Precomputation Fast transform Direct approach f θ, φ = l α l m P l m (cos θ)e imφ 10 2 l=0 m= l 10 0 [Mohlenkamp, 1999] 10-2 [Rokhlin & Tygert, 2006] [Tygert, 2008] 10 3 10 4 N 10 5 A new generation of fast algorithms with no precomputation. 22/22

Thank you

References D. H. Bailey, K. Jeyabalan, and X. S. Li, A comparison of three high-precision quadrature schemes, 2005. P. Baratella and I. Gatteschi, The bounds for the error term of an asymptotic approximation of Jacobi polynomials, Lecture notes in Mathematics, 1988. Z. Battels and L. N. Trefethen, An extension of Matlab to continuous functions and operators, SISC, 2004. I. Bogaert, Iteration-free computation of Gauss Legendre quadrature nodes and weights, SISC, 2014. G. H. Golub and J. H. Welsch, Calculation of Gauss quadrature rules, Math. Comput., 1969. N. Hale and A. Townsend, Fast and accurate computation of Gauss Legendre and Gauss Jacobi quadrature nodes and weights, SISC, 2013. N. Hale and A. Townsend, A fast, simple, and stable Chebyshev Legendre transform using an asymptotic formula, SISC, 2014. Y. Nakatsukasa, V. Noferini, and A. Townsend, Computing the common zeros of two bivariate functions via Bezout resultants, Numerische Mathematik, 2014.

References F. W. J. Olver, Asymptotics and Special Functions, Academic Press, New York, 1974. A. Townsend and L. N. Trefethen, An extension of Chebfun to two dimensions, SISC, 2013. A. Townsend, T. Trogdon, and S. Olver, Fast computation of Gauss quadrature nodes and weights on the whole real line, to appear in IMA Numer. Anal., 2015. A. Townsend, The race to compute high-order Gauss quadrature, SIAM News, 2015. A. Townsend, A fast analysis-based discrete Hankel transform using asymptotics expansions, submitted, 2015. F. G. Tricomi, Sugli zeri dei polinomi sferici ed ultrasferici, Ann. Mat. Pura. Appl., 1950.