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

Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Jul 28, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Fast algorithms based on asymptotic expansions of special functions

Alex Townsend

MIT

Cornell University, 23rd January 2015, CAM Colloquium

Page 2: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Two trends in the computing era

Alex Townsend @MIT

Tabulations Software

Logarithms

Gauss quadrature

Special functions

1/22

Page 3: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Two trends in the computing era

Alex Townsend @MIT

Classicalanalysis

Numericalanalysis

= ~~

Fast multipole method

Butterfly schemes

Iterative algorithms

Finite element method

Tabulations Software

Logarithms

Gauss quadrature

Special functions

1/22

Page 4: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

A selection of my research

Alex Townsend @MIT

๐‘(๐‘ฅ, ๐‘ฆ)

๐‘ž(๐‘ฅ, ๐‘ฆ)= 0

[Nakatsukasa, Noferini, & T., 2015]

2/22

๐‘“(๐‘ฅ, ๐‘ฆ) โ‰ˆ

๐‘—=1

๐พ

๐‘๐‘— ๐‘ฆ ๐‘Ÿ๐‘—(๐‘ฅ)

[Trefethen & T., 2014]

Algebraic geometry

Approx. theory

Page 5: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

A selection of my research

Alex Townsend @MIT

Algebraic geometry

๐‘(๐‘ฅ, ๐‘ฆ)

๐‘ž(๐‘ฅ, ๐‘ฆ)= 0

[Nakatsukasa, Noferini, & T., 2015]

Approx. theory

[Battels & Trefethen, 2004]

๐‘“(๐‘ฅ, ๐‘ฆ) โ‰ˆ

๐‘—=1

๐พ

๐‘๐‘— ๐‘ฆ ๐‘Ÿ๐‘—(๐‘ฅ)

[Trefethen & T., 2014]

2/22

Page 6: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Many special functions are trigonometric-like

Alex Townsend @MIT

Trigonometric functionscos(ฯ‰x), sin(๐œ”๐‘ฅ)

Chebyshev polynomialsTn(x)

Legendre polynomialsPn(x)

Bessel functionsJv(z)

Airy functionsAi(x)

Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc.

3/22

Page 7: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Many special functions are trigonometric-like

Alex Townsend @MIT

Trigonometric functionscos(ฯ‰x), sin(๐œ”๐‘ฅ)

Chebyshev polynomialsTn(x)

Legendre polynomialsPn(x)

Bessel functionsJv(z)

Airy functionsAi(x)

Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc.

3/22

Page 8: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Many special functions are trigonometric-like

Alex Townsend @MIT

Trigonometric functionscos(ฯ‰x), sin(๐œ”๐‘ฅ)

Chebyshev polynomialsTn(x)

Legendre polynomialsPn(x)

Bessel functionsJv(z)

Airy functionsAi(x)

Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc.

3/22

Page 9: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Many special functions are trigonometric-like

Alex Townsend @MIT

Trigonometric functionscos(ฯ‰x), sin(๐œ”๐‘ฅ)

Chebyshev polynomialsTn(x)

Legendre polynomialsPn(x)

Bessel functionsJv(z)

Airy functionsAi(x)

Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc.

3/22

Page 10: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Many special functions are trigonometric-like

Alex Townsend @MIT

Trigonometric functionscos(ฯ‰x), sin(๐œ”๐‘ฅ)

Chebyshev polynomialsTn(x)

Legendre polynomialsPn(x)

Bessel functionsJv(z)

Airy functionsAi(x)

Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc.

3/22

Page 11: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Many special functions are trigonometric-like

Alex Townsend @MIT

Trigonometric functionscos(ฯ‰x), sin(๐œ”๐‘ฅ)

Chebyshev polynomialsTn(x)

Legendre polynomialsPn(x)

Bessel functionsJv(z)

Airy functionsAi(x)

Also, Jacobi polynomials, Hermite polynomials, parabolic cylinder functions, etc.

3/22

Page 12: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Asymptotic expansions of special functions

Alex Townsend @MIT

Legendre polynomials

Bessel functions

Thomas Stieltjes

Hermann Hankel

๐‘ƒ๐‘›(cos ๐œƒ) ~ ๐ถ๐‘›

๐‘š=0

๐‘€โˆ’1

โ„Ž๐‘š,๐‘›

cos ๐‘š + ๐‘› +12๐œƒ โˆ’ ๐‘š +

12๐œ‹2

(2 sin ๐œƒ)๐‘š+12

, ๐‘› โ†’ โˆž

๐ฝ0 ๐‘ง ~2

๐œ‹๐‘ง(cos ๐‘ง โˆ’

๐œ‹

4

๐‘š=0

๐‘€โˆ’1โˆ’1 ๐‘š๐‘Ž2๐‘š๐‘ง2๐‘š

โˆ’ sin(๐‘ง โˆ’๐œ‹

4)

๐‘š=0

๐‘€โˆ’1(โˆ’1)๐‘š๐‘Ž2๐‘š+1๐‘ง2๐‘š+1

)

๐‘ง โ†’ โˆž

4/22

Page 13: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Numerical pitfalls of an asymptotic expansionist

Alex Townsend @MIT

Fix M. Where is the asymptotic expansion accurate?

๐ฝ0 ๐‘ง =2

๐œ‹๐‘ง(cos ๐‘ง โˆ’

๐œ‹

4

๐‘š=0

๐‘€โˆ’1โˆ’1 ๐‘š๐‘Ž2๐‘š๐‘ง2๐‘š

โˆ’ sin(๐‘ง โˆ’๐œ‹

4)

๐‘š=0

๐‘€โˆ’1(โˆ’1)๐‘š๐‘Ž2๐‘š+1๐‘ง2๐‘š+1

) + ๐‘…๐‘€(๐‘ง)

5/22

Page 14: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Introduction

Talk outline

Alex Townsend @MIT

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

Page 15: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Alex Townsend @MIT

Part I: Computing Gauss quadrature rules

Pn(x) = Legendre polynomial of degree n

7/22

Page 16: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Definition

Alex Townsend @MIT

n-point quadrature rule: Gauss quadrature rule:

โˆ’1

1

๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ โ‰ˆ

๐‘˜=1

๐‘›

๐‘ค๐‘˜๐‘“ ๐‘ฅ๐‘˜๐‘ฅ๐‘˜ = ๐‘˜๐‘กโ„Ž zero of ๐‘ƒ๐‘›

๐‘ค๐‘˜ = 2(1 โˆ’ ๐‘ฅ๐‘˜2)-1 [๐‘ƒ๐‘›

โ€ฒ(๐‘ฅ๐‘˜)]-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

Page 17: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Gauss quadrature experiments

Alex Townsend @MIT

Quadrature error Execution time

Qu

ad

ratu

re e

rro

r

Ex

ecu

tio

n t

ime

The Golubโ€“Welsch algorithm is beautiful, but not the state-of-the-art.

There is another way...

n n

9/22

Page 18: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Newtonโ€™s method

Alex Townsend @MIT

Newtonโ€™s method

Isaac Newton

1. Evaluation scheme for Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

2. Evaluation scheme for ๐‘‘

๐‘‘๐œƒPn( ๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/21/2

3. Initial guesses for cos-1(xk)

Solve Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2 = 0, ฮธ โˆˆ (0, ฯ€).

(with asymptotics and a change of variables)

10/22

Page 19: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

1. Evaluation scheme for Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

2. Evaluation scheme for ๐‘‘

๐‘‘๐œƒPn( ๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2)1/2

3. Initial guesses for cos-1(xk)

Part I: Computing Gauss quadrature rules

Newtonโ€™s methodโ€ฆ with asymptotics and a change of variables

Alex Townsend @MIT

Newtonโ€™s method

Isaac Newton

(with asymptotics and a change of variables)

Pn(x)

Solve Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2 = 0, ฮธ โˆˆ (0, ฯ€).

10/22

Page 20: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Newtonโ€™s methodโ€ฆ with asymptotics and a change of variables

Alex Townsend @MIT

Newtonโ€™s method

Isaac Newton

1. Evaluation scheme for Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

2. Evaluation scheme for ๐‘‘

๐‘‘๐œƒPn( ๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2)1/2

3. Initial guesses for cos-1(xk)

Solve Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2 = 0, ฮธ โˆˆ (0, ฯ€).

Pn(x)

(with asymptotics and a change of variables)

10/22

Page 21: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Newtonโ€™s methodโ€ฆ with asymptotics and a change of variables

Alex Townsend @MIT

Isaac Newton

Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

1. Evaluation scheme for Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

2. Evaluation scheme for ๐‘‘

๐‘‘๐œƒPn( ๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

3. Initial guesses for cos-1(xk)

Newtonโ€™s method

Solve Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2 = 0, ฮธ โˆˆ (0, ฯ€).

(with asymptotics and a change of variables)

10/22

Page 22: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Newtonโ€™s methodโ€ฆ with asymptotics and a change of variables

Alex Townsend @MIT

Isaac Newton

Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

1. Evaluation scheme for Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

2. Evaluation scheme for ๐‘‘

๐‘‘๐œƒPn( ๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

3. Initial guesses for cos-1(xk)

Newtonโ€™s method

Solve Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2 = 0, ฮธ โˆˆ (0, ฯ€).

(with asymptotics and a change of variables)

10/22

Page 23: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Newtonโ€™s methodโ€ฆ with asymptotics and a change of variables

Alex Townsend @MIT

Isaac Newton

Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

1. Evaluation scheme for Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

2. Evaluation scheme for ๐‘‘

๐‘‘๐œƒPn( ๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

3. Initial guesses for cos-1(xk)

Newtonโ€™s method

(with asymptotics and a change of variables)

Solve Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2 = 0, ฮธ โˆˆ (0, ฯ€).

10/22

Page 24: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Evaluation scheme for Pn

Alex Townsend @MIT

Interior (in grey region):Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

Boundary:

[Baratella & Gatteschi, 1988]

11/22

๐‘ƒ๐‘›(cos ๐œƒ)(sin ๐œƒ)1/2 โ‰ˆ ๐œƒ

12(๐ฝ0(๐œŒ๐œƒ)

๐‘š=0

๐‘€โˆ’1๐ด๐‘š(๐œƒ)

๐œŒ2๐‘š+ ๐œƒ๐ฝ1(๐œŒ๐œƒ)

๐‘š=0

๐‘€โˆ’1๐ต๐‘š(๐œƒ)

๐œŒ2๐‘š+1), ๐œŒ = ๐‘› +

1

2

๐‘ƒ๐‘›(cos ๐œƒ)(sin ๐œƒ)1/2

โ‰ˆ ๐ถ๐‘›

๐‘š=0

๐‘€โˆ’1

โ„Ž๐‘š,๐‘›

cos ๐‘š + ๐‘› +12๐œƒ โˆ’ ๐‘š +

12๐œ‹2

2(2 sin ๐œƒ)๐‘š

Theorem

For ๐œ– > 0, ๐‘› โ‰ฅ 200, and ฮธ๐‘˜๐‘–๐‘›๐‘–๐‘ก= (๐‘˜ โˆ’

1

2)๐œ‹

๐‘›, Newton converges and the nodes are

computed to an accuracy of ๐’ช(๐œ–) in ๐’ช(๐‘›log(1/๐œ–)) operations.

Page 25: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Evaluation scheme for Pn

Alex Townsend @MIT

Interior (in grey region):Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

Boundary:

[Baratella & Gatteschi, 1988]

๐‘ƒ๐‘›(cos ๐œƒ)(sin ๐œƒ)1/2 โ‰ˆ ๐œƒ

12(๐ฝ0(๐œŒ๐œƒ)

๐‘š=0

๐‘€โˆ’1๐ด๐‘š(๐œƒ)

๐œŒ2๐‘š+ ๐œƒ๐ฝ1(๐œŒ๐œƒ)

๐‘š=0

๐‘€โˆ’1๐ต๐‘š(๐œƒ)

๐œŒ2๐‘š+1), ๐œŒ = ๐‘› +

1

2

๐‘ƒ๐‘›(cos ๐œƒ)(sin ๐œƒ)1/2

โ‰ˆ ๐ถ๐‘›

๐‘š=0

๐‘€โˆ’1

โ„Ž๐‘š,๐‘›

cos ๐‘š + ๐‘› +12๐œƒ โˆ’ ๐‘š +

12๐œ‹2

2(2 sin ๐œƒ)๐‘š

11/22

Theorem

For ๐œ– > 0, ๐‘› โ‰ฅ 200, and ฮธ๐‘˜๐‘–๐‘›๐‘–๐‘ก= (๐‘˜ โˆ’

1

2)๐œ‹

๐‘›, Newton converges and the nodes are

computed to an accuracy of ๐’ช(๐œ–) in ๐’ช(๐‘›log(1/๐œ–)) operations.

Page 26: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Evaluation scheme for Pn

Alex Townsend @MIT

Interior (in grey region):Pn(๐‘๐‘œ๐‘  ฮธ) (๐‘ ๐‘–๐‘› ฮธ)1/2

Boundary:

Theorem

For ๐‘› โ‰ฅ 200 and ฮธ๐‘˜๐‘–๐‘›๐‘–๐‘ก= (๐‘˜ โˆ’

1

2)๐œ‹

๐‘›, Newton converges to the nodes in ๐’ช(๐‘›) operations.

[Baratella & Gatteschi, 1988]

11/22

๐‘ƒ๐‘›(cos ๐œƒ)(sin ๐œƒ)1/2 โ‰ˆ ๐œƒ

12(๐ฝ0(๐œŒ๐œƒ)

๐‘š=0

๐‘€โˆ’1๐ด๐‘š(๐œƒ)

๐œŒ2๐‘š+ ๐œƒ๐ฝ1(๐œŒ๐œƒ)

๐‘š=0

๐‘€โˆ’1๐ต๐‘š(๐œƒ)

๐œŒ2๐‘š+1), ๐œŒ = ๐‘› +

1

2

๐‘ƒ๐‘›(cos ๐œƒ)(sin ๐œƒ)1/2

โ‰ˆ ๐ถ๐‘›

๐‘š=0

๐‘€โˆ’1

โ„Ž๐‘š,๐‘›

cos ๐‘š + ๐‘› +12๐œƒ โˆ’ ๐‘š +

12๐œ‹2

2(2 sin ๐œƒ)๐‘š

Page 27: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Initial guesses for the nodes

Alex Townsend @MIT

Max error in the initial guesses

There are now better initial guesses. [Bogaert, 2014]

Interior: Use Tricomiโ€™s

initial guesses. [Tricomi, 1950]

Boundary: Use Olverโ€™s

initial guesses. [Olver, 1974]

Ignace Bogaert

Ma

x e

rro

r

12/22

Page 28: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

The race to compute high-order Gauss quadrature

Alex Townsend @MIT

โ€œThe race to computehigh-order Gauss quadratureโ€

[T., 2015]

13/22

Page 29: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part I: Computing Gauss quadrature rules

Applications

Alex Townsend @MIT

1. Psychological: Gauss quadrature

rules are cheap.

2. Experimental mathematics: High

precision quadratures. [Bailey, Jeyabalan,

& Li, 2004]

3. Cosmic microwave background:

Noise removal by L2-projection.

Generically, composite rules converge algebraically.

โˆ’11 1

1+1002๐‘ฅ2dxQ

ua

dra

ture

err

or

14/22

Page 30: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Alex Townsend @MIT

Part II: Fast transforms based on asymptoticexpansions

๐‘ท๐‘ต๐‘ =๐‘ƒ0 cos ๐œƒ0 โ‹ฏ ๐‘ƒ๐‘โˆ’1 cos ๐œƒ0โ‹ฎ โ‹ฑ โ‹ฎ

๐‘ƒ0 cos ๐œƒ๐‘โˆ’1 โ‹ฏ ๐‘ƒ๐‘โˆ’1 cos ๐œƒ๐‘โˆ’1

๐‘1โ‹ฎ๐‘๐‘โˆ’1

, ๐œƒ๐‘˜=๐‘˜๐œ‹

๐‘ โˆ’ 1

15/22

Page 31: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

๐œƒ0 ๐œƒ1

Part II: Fast transforms based on asymptotic expansions

Fast transforms as evaluation schemes

Alex Townsend @MIT 16/22

DFT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ง๐‘˜๐‘› , ๐‘ง๐‘˜ = ๐‘’

โˆ’2๐œ‹๐‘–๐‘˜/๐‘

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘๐‘œ๐‘ (๐‘›๐œƒ๐‘˜) , ๐œƒ๐‘˜=

๐‘˜๐œ‹

๐‘โˆ’1

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘‡๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DLT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ƒ๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DHT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐ฝ๐‘ฃ ๐‘—๐‘ฃ,๐‘›๐‘Ÿ๐‘˜ , ๐‘Ÿ๐‘˜ =

๐‘—๐‘ฃ,๐‘›

๐‘—๐‘ฃ,๐‘, ๐‘—๐‘ฃ,๐‘› = ๐‘›๐‘กโ„Ž ๐‘Ÿ๐‘œ๐‘œ๐‘ก ๐‘œ๐‘“ ๐ฝ๐‘ฃ ๐‘ง

๐’›๐ŸŽ

๐’›๐Ÿ๐’›๐Ÿ

Page 32: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Fast transforms as evaluation schemes

Alex Townsend @MIT 16/22

DFT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ง๐‘˜๐‘› , ๐‘ง๐‘˜ = ๐‘’

โˆ’2๐œ‹๐‘–๐‘˜/๐‘

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘๐‘œ๐‘ (๐‘›๐œƒ๐‘˜) , ๐œƒ๐‘˜=

๐‘˜๐œ‹

๐‘โˆ’1

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘‡๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DLT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ƒ๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DHT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐ฝ๐‘ฃ ๐‘—๐‘ฃ,๐‘›๐‘Ÿ๐‘˜ , ๐‘Ÿ๐‘˜ =

๐‘—๐‘ฃ,๐‘›

๐‘—๐‘ฃ,๐‘, ๐‘—๐‘ฃ,๐‘› = ๐‘›๐‘กโ„Ž ๐‘Ÿ๐‘œ๐‘œ๐‘ก ๐‘œ๐‘“ ๐ฝ๐‘ฃ ๐‘ง

๐œƒ0 ๐œƒ1

๐’›๐ŸŽ

๐’›๐Ÿ๐’›๐Ÿ

Page 33: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Fast transforms as evaluation schemes

Alex Townsend @MIT 16/22

DFT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ง๐‘˜๐‘› , ๐‘ง๐‘˜ = ๐‘’

โˆ’2๐œ‹๐‘–๐‘˜/๐‘

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘๐‘œ๐‘ (๐‘›๐œƒ๐‘˜) , ๐œƒ๐‘˜=

๐‘˜๐œ‹

๐‘โˆ’1

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘‡๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DLT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ƒ๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DHT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐ฝ๐‘ฃ ๐‘—๐‘ฃ,๐‘›๐‘Ÿ๐‘˜ , ๐‘Ÿ๐‘˜ =

๐‘—๐‘ฃ,๐‘›

๐‘—๐‘ฃ,๐‘, ๐‘—๐‘ฃ,๐‘› = ๐‘›๐‘กโ„Ž ๐‘Ÿ๐‘œ๐‘œ๐‘ก ๐‘œ๐‘“ ๐ฝ๐‘ฃ ๐‘ง

๐’›๐ŸŽ

๐’›๐Ÿ๐’›๐Ÿ

๐œƒ0 ๐œƒ1

Page 34: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Fast transforms as evaluation schemes

Alex Townsend @MIT

DFT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ง๐‘˜๐‘› , ๐‘ง๐‘˜ = ๐‘’

โˆ’2๐œ‹๐‘–๐‘˜/๐‘

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘๐‘œ๐‘ (๐‘›๐œƒ๐‘˜) , ๐œƒ๐‘˜=

๐‘˜๐œ‹

๐‘โˆ’1

DCT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘‡๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DLT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐‘ƒ๐‘›(๐‘๐‘œ๐‘ ๐œƒ๐‘˜)

DHT ๐‘“๐‘˜ = ๐‘›=0๐‘โˆ’1๐‘๐‘›๐ฝ๐‘ฃ ๐‘—๐‘ฃ,๐‘›๐‘Ÿ๐‘˜ , ๐‘Ÿ๐‘˜ =

๐‘—๐‘ฃ,๐‘›

๐‘—๐‘ฃ,๐‘, ๐‘—๐‘ฃ,๐‘› = ๐‘›๐‘กโ„Ž ๐‘Ÿ๐‘œ๐‘œ๐‘ก ๐‘œ๐‘“ ๐ฝ๐‘ฃ ๐‘ง

16/22

๐’›๐ŸŽ

๐’›๐Ÿ๐’›๐Ÿ

๐œƒ0 ๐œƒ1

Page 35: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Related work

Alex Townsend @MIT

Many others: Candel, Cree, Johnson, Mori, Orszag, Suda, Sugihara, Takami, etc.

Fast transforms are very important.

Emmanuel Candes

Boag, Demanet,

Michielssen,

Oโ€™Neil, Ying

James Cooley

Ahmed, Tukey, Gauss,

Gentleman, Natarajan,

Rao

Leslie Greengard

Alpert, Barnes, Hut,

Martinsson, Rokhlin,

Mohlenkamp, Tygert

Daniel Potts

Driscoll, Healy,

Steidl, Tasche

17/22

Page 36: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

๐‘ƒ๐‘›(cos ๐œƒ๐‘˜) = ๐ถ๐‘›

๐‘š=0

๐‘€โˆ’1

โ„Ž๐‘š,๐‘›

cos ๐‘š + ๐‘› +12๐œƒ๐‘˜ โˆ’ ๐‘š +

12๐œ‹2

(2 sin ๐œƒ๐‘˜)๐‘š + 1/2 + ๐‘…๐‘€,๐‘›(๐œƒ๐‘˜)

Part II: Fast transforms based on asymptotic expansions

Asymptotic expansions as a matrix decomposition

Alex Townsend @MIT

The asymptotic expansion

gives a matrix decomposition (sum of diagonally scaled DCTs and DSTs):

๐‘ท๐‘ต ๐‘ท๐‘ต๐‘จ๐‘บ๐’€ ๐‘น๐‘ด,๐‘ต= +

๐‘ท๐‘ต=

๐‘š=0

๐‘€โˆ’1

๐ท๐‘ข๐‘š๐‘ช๐‘ต๐ท๐ถโ„Ž๐‘š + ๐ท๐‘ฃ๐‘š

0 0 00 ๐‘บ๐‘ตโˆ’๐Ÿ 00 0 0

๐ท๐ถโ„Ž๐‘š + ๐‘น๐‘ด,๐‘ต

18/22

Page 37: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Be careful and stay safe

Alex Townsend @MIT

Error curve: ๐‘…๐‘€,๐‘› ๐œƒ๐‘˜ = ๐œ–

Fix M. Where is the asymptotic expansion accurate?

๐‘น๐‘ด,๐‘ต =

๐‘…๐‘€,๐‘›(๐œƒ๐‘˜) โ‰ค2๐ถ๐‘›โ„Ž๐‘€,๐‘›

(2 sin ๐œƒ๐‘˜)๐‘€+1/2

19/22

Page 38: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Partitioning and balancing competing costs

Alex Townsend @MIT

Theorem

The matrix-vector product ๐‘“ = PN๐‘ can

be computed in ๐’ช (๐‘((log๐‘)2/ log log๐‘)

operations.

ฮฑ too small

20/22

0 1

Page 39: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

ฮฑ too small

Part II: Fast transforms based on asymptotic expansions

Partitioning and balancing competing costs

Alex Townsend @MIT

Theorem

The matrix-vector product ๐‘“ = PN๐‘ can

be computed in ๐’ช(๐‘((log๐‘)2/ log log๐‘)

operations.

20/22

0 1

Page 40: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Partitioning and balancing competing costs

Alex Townsend @MIT

The matrix-vector product ๐‘“ = ๐๐๐‘ can

be computed in ๐’ช(๐‘((log๐‘)2/ log log๐‘)

operations.

ฮฑ too small

Theorem

20/22

0 1

Page 41: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Partitioning and balancing competing costs

Alex Townsend @MIT

ฮฑ too large

Theorem

The matrix-vector product ๐‘“ = PN๐‘ can

be computed in ๐’ช(๐‘((log๐‘)2/ log log๐‘)

operations.

20/22

0 1

Page 42: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Partitioning and balancing competing costs

Alex Townsend @MIT

ฮฑ = O (1/ log๐‘)

PN(j)๐‘ PN

EVAL๐‘

Theorem

๐’ช (N (log N)

2

log log ๐‘) ๐’ช (

N (log N)2

log log ๐‘)

The matrix-vector product ๐‘“ = PN๐‘ can

be computed in ๐’ช(๐‘((log๐‘)2/ log log๐‘)

operations.

20/22

0 1

Page 43: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Part II: Fast transforms based on asymptotic expansions

Numerical results

Alex Townsend @MIT 21/22

105

No precomputation.

0.15

0.1

0.05

0

-0.05

-0.1

-0.15

-0.2

-0.250.3 0.32 0.34

x

Modification of rough signals

โˆ’1

1

๐‘ƒ๐‘› ๐‘ฅ ๐‘’โˆ’๐‘–๐œ”๐‘ก๐‘‘๐‘ฅ = ๐‘–๐‘š

2๐œ‹

โˆ’๐œ”๐ฝ๐‘š+12(โˆ’๐œ”)

Direct approachUsing asymptotics

10210-3

10-2

10-1

100

103 104

Ex

ecu

tio

n t

ime

N

Page 44: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Future work

Fast spherical harmonic transform

Alex Townsend @MIT 22/22

Spherical harmonic transform:

๐‘“ ๐œƒ, ๐œ™ =

๐‘™=0

๐‘โˆ’1

๐‘š=โˆ’๐‘™

๐‘™

๐›ผ๐‘™๐‘š๐‘ƒ๐‘™๐‘š (cos ๐œƒ)๐‘’๐‘–๐‘š๐œ™

[Mohlenkamp, 1999]

[Rokhlin & Tygert, 2006]

[Tygert, 2008]

10-2

100

102

104

104E

xec

uti

on

tim

eN

105

PrecomputationFast transformDirect approach

A new generation of fast algorithms with no precomputation.

Existing approaches

103

Page 45: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

Alex Townsend @MIT

Thank you

Page 46: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

References

Alex Townsend @MIT

โ€ข 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 Jacobipolynomials, 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โ€“Jacobiquadrature nodes and weights, SISC, 2013.

โ€ข N. Hale and A. Townsend, A fast, simple, and stable Chebyshevโ€“Legendre transform using an asymptoticformula, SISC, 2014.

โ€ข Y. Nakatsukasa, V. Noferini, and A. Townsend, Computing the common zeros of two bivariate functionsvia Bezout resultants, Numerische Mathematik, 2014.

Page 47: Fast transforms based on asymptotic expansions of special ...pi.math.cornell.edu/~ajt/presentations/FastTransforms.pdfPart II: Fast transforms based on asymptotic expansions Asymptotic

References

Alex Townsend @MIT

โ€ข 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 thewhole 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.