Gaussian Quadrature September 25, 2011 Interpolation Approximation - - PowerPoint PPT Presentation

gaussian quadrature
SMART_READER_LITE
LIVE PREVIEW

Gaussian Quadrature September 25, 2011 Interpolation Approximation - - PowerPoint PPT Presentation

Interpolation Gaussian Quadrature September 25, 2011 Interpolation Approximation of integrals Approximation of integrals by quadrature Many definite integrals cannot be computed in closed form, and must be approximated numerically.


slide-1
SLIDE 1

Interpolation

Gaussian Quadrature

September 25, 2011

slide-2
SLIDE 2

Interpolation Approximation of integrals

Approximation of integrals by quadrature

◮ Many definite integrals cannot be computed in closed form,

and must be approximated numerically.

◮ Basic building block

1

−1

u(ξ)w(ξ) dξ ≈

N

  • i=0

u(ξi)ωi (1)

◮ ξi are the quadrature points ◮ ωi are the quadrature weights ◮ w(ξ) > 0 is a weight function

◮ Integration can be done with function evaluations at ξi ◮ How do I pick ξi and ωi to minimum errors and/or maximize

efficiency

slide-3
SLIDE 3

Interpolation Approximation of integrals

Example Quadrature: Trapezoidal integration

◮ w = 1 ◮ Quadrature points are equally spaced:ξi = 2i N − 1 ◮ Quadrature weights are

ωi =

  • 2

2N

for i = 0, N

2 N

for 1 ≤ i < N (2)

◮ Formula takes the form, with ui = u(ξi),

1

−1

u(ξ) dξ ≈ 2 N u0 2 + u1 + · · · + uN−1 + uN 2

  • (3)

◮ Can we do better?

slide-4
SLIDE 4

Interpolation Approximation of integrals

Possible route

◮ Choose ξi and vary ωi to maximize order of exact

integration.

◮ I can impose (N + 1) constraints on ωi, e.g. maximize the

degree of polynomials that quadrature approximates exactly:

  • i=0

ξk

i ωk =

1

−1

ξk dξ, 0 ≤ k ≤ N (4)

◮ Gauss quadrature adjust ξi so that formula above applies

for k > (N + 1). Relies on properties of orthogonal polynomials.

slide-5
SLIDE 5

Interpolation Approximation of integrals

Gauss quadrature

Let pm(x) be the set of orthogonal polynomials on the interval a ≤ x ≤ b w.r.t. weight function w(x) and of degree m b

a

pm(x)pn(x)w(x) dx = δm,npm2 (5) Let the collocation points be the roots of pN+1(xi) = 0 and the weights:

  • i=0

xk

i ωk =

b

a

xkw(x) dx, 0 ≤ k ≤ N (6) then...

slide-6
SLIDE 6

Interpolation Approximation of integrals

Gauss quadrature

◮ The weights are all positive ωi > 0. ◮ Gauss quadrature is exact for all polynomials, q, of degree

less or equal to 2N + 1

  • i=0

q(xi)ωk = b

a

q(x)w(x) dx (7)

◮ It is not possible to find a xi, ωi combination where the

integration is exact for polynomials of degree 2N + 2.

slide-7
SLIDE 7

Interpolation Approximation of integrals

Gauss quadrature flavors

Gauss quadrature comes in different flavors depending on whether the quadrature points include none, one, or both end points.

◮ Gauss quadrature: all quadrature points are strictly inside

the interval: a < xi < b

◮ Gauss-Lobatto quadrature: x0 = a and xN = b.

Useful for imposing BC as we will see later.

◮ Gauss-Radau quadrature: x0 = a or xN = b but not both.

Useful for integrals or PDEs on semi-infinite intervals

slide-8
SLIDE 8

Interpolation Approximation of integrals

Gauss-Lobatto quadrature

◮ Formula is exact for polynomials of degree ≤ 2N − 1. ◮ For Jacobi type polynomials, quadrature points are the

roots of (1 − x2)p′

N(x) = 0

Jacobi polynomials include Chebyshev, Legendre and associated Legendre polynomials.

slide-9
SLIDE 9

Interpolation Examples

Example: Chebyshev Gauss Quadrature

◮ Roots are known analytically since TN+1(x) = cos(N + 1)θ,

with x = cos θ.

◮ The roots are then

ξi = cos θi = (2i + 1)π 2(N + 1) , 0 ≤ i ≤ N (8)

◮ Quadrature weights are

ωi = π N + 1 (9)

◮ The formula is exact for polynomial of degree 2N + 1:

1

−1

q(x) √ 1 − x2 dx =

N

  • i=0

q(xi)ωi (10)

slide-10
SLIDE 10

Interpolation Examples

Example: Chebyshev Gauss-Lobatto Quadrature

◮ Roots are known analytically since T ′ N(x) = N sin Nθ sin θ ◮ The roots of (1 − x2)p′ N(x) = sin θ sin Nθ

ξi = iπ N , 0 ≤ i ≤ N (11)

◮ Quadrature weights are

ωi = π 2N for i = 0, N, and ωi = π N , 1 ≤ i < N (12)

◮ The formula is exact for polynomial of degree 2N − 1:

1

−1

q(x) √ 1 − x2 dx =

N

  • i=0

q(xi)ωi (13)

slide-11
SLIDE 11

Interpolation Examples

Example: Legendre Gauss Quadrature

◮ Roots must be computed numerically LN+1(xi) = 0 ◮ Quadrature weights are

ωi = 2 (1 − xi)2L′

N+1(xi)

(14)

◮ The formula is exact for polynomial of degree 2N + 1:

1

−1

q(x) dx =

N

  • i=0

q(xi)ωi (15)

slide-12
SLIDE 12

Interpolation Examples

Example: Legendre Gauss-Lobatto Quadrature

◮ Roots must be computed numerically (1 − x2)L′ N(x) = 0 ◮ Quadrature weights are

ωi = 2 N(N + 1)[LN(ξ)]2 (16)

◮ The formula is exact for polynomial of degree 2N − 1:

1

−1

q(x) dx =

N

  • i=0

q(xi)ωi (17)

slide-13
SLIDE 13

Interpolation Some Math Proofs

Some mathematical proofs for Gaussian Quadrature

◮ How do we know that the orthogonal polynomial pN+1 has

N + 1 roots?

◮ How can we prove that formula is exact for polynomials of

degree 2N + 1?

◮ Starting point is that pm is the set of orthogonal

polynomials: b

a

pm(x) pn(x) w(x) dx = δm,npm2 (18)

slide-14
SLIDE 14

Interpolation Some Math Proofs

Multiplicity and location of roots

◮ Assume pN has only k roots in [a, b]: pN can be written as

pN = (x − r1)(x − r2) . . . (x − rk)h(x) (19) where hk is a polynomial of degree N − k that must be single-signed in [a, b]. If it changes sign, then there must be another root rk+1

◮ Consider the following polynomial:

z(x) = (x − r1)(x − r2) . . . (x − rk)pN(x) (20) z(x) = [(x − r1)(x − r2) . . . (x − rk)]2 h(x) (21)

◮ z(x) must also be single-signed.

slide-15
SLIDE 15

Interpolation Some Math Proofs

Multiplicity and location of roots

pN is orthogonal to all polynomials of degree k < N then b

a

(x − r1)(x − r2) . . . (x − rk)

  • polynomial of degree k

pN(x)w(x) dx = δN,k b

a

[(x − r1)(x − r2) . . . (x − rk)]2 h(x)w(x) dx = δN,k Since z is single signed this is possible only if k = N, then pN has N roots in [a, b] Since pN is of degree N and has N roots, the roots must be isolated. Likewise p′

N(x) must have N − 1 roots corresponding to the

extrema of pN(x).

slide-16
SLIDE 16

Interpolation Some Math Proofs

Exactness of quadrature for polynomials

Let f(x) be a polynomial of degree 2N + 1, it can always be written as f(x) = pN+1(x)q(x) + r(x) (22) where q(x), and r(x) are polynomials of degree at most N. b

a

f(x)w(x) dx = b

a

pN+1(x)q(x)w(x) dx

  • 0 by orthogonality

+ b

a

r(x)w(x) dx

  • Exact quadrature

=

N

  • i=0

pN+1(xi)

  • q(xi)ωi +

N

  • i=0

r(xi)ωi =

N

  • i=0

[pN+1(xi)q(xi) + r(xi)]

  • f(xi)

ωi =

N

  • i=0

f(xi)ωi