numerical differentiation & integration

146
Numerical Differentiation & Integration Gaussian Quadrature Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011 Brooks/Cole, Cengage Learning

Upload: umair-ahmed

Post on 16-Nov-2015

57 views

Category:

Documents


4 download

DESCRIPTION

Numerical Differentiation & Integration ppt

TRANSCRIPT

  • Numerical Differentiation & Integration

    Gaussian Quadrature

    Numerical Analysis (9th Edition)

    R L Burden & J D Faires

    Beamer Presentation Slidesprepared byJohn Carroll

    Dublin City University

    c 2011 Brooks/Cole, Cengage Learning

  • Introduction Legendre Polynomials Arbitrary Intervals

    Outline

    1 Gaussian Quadrature & Optimal Nodes

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 2 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Outline

    1 Gaussian Quadrature & Optimal Nodes

    2 Using Legendre Polynomials to Derive Gaussian Quadrature Formulae

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 2 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Outline

    1 Gaussian Quadrature & Optimal Nodes

    2 Using Legendre Polynomials to Derive Gaussian Quadrature Formulae

    3 Gaussian Quadrature on Arbitrary Intervals

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 2 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Outline

    1 Gaussian Quadrature & Optimal Nodes

    2 Using Legendre Polynomials to Derive Gaussian Quadrature Formulae

    3 Gaussian Quadrature on Arbitrary Intervals

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 3 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes Formula

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 4 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes FormulaThe Newton-Cotes formulas were derived by integratinginterpolating polynomials.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 4 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes FormulaThe Newton-Cotes formulas were derived by integratinginterpolating polynomials.

    The error term in the interpolating polynomial of degree n involvesthe (n + 1)st derivative of the function being approximated, . . .

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 4 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes FormulaThe Newton-Cotes formulas were derived by integratinginterpolating polynomials.

    The error term in the interpolating polynomial of degree n involvesthe (n + 1)st derivative of the function being approximated, . . .

    so a Newton-Cotes formula is exact when approximating theintegral of any polynomial of degree less than or equal to n.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 4 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes Formula (Contd)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 5 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes Formula (Contd)All the Newton-Cotes formulas use values of the function atequally-spaced points.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 5 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes Formula (Contd)All the Newton-Cotes formulas use values of the function atequally-spaced points.

    This restriction is convenient when the formulas are combined toform the composite rules which we considered earlier, . . .

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 5 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Contrast with Newton-Cotes

    Features of a Newton-Cotes Formula (Contd)All the Newton-Cotes formulas use values of the function atequally-spaced points.

    This restriction is convenient when the formulas are combined toform the composite rules which we considered earlier, . . .

    but it can significantly decrease the accuracy of the approximation.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 5 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Consider, for example, the Trapezoidal rule applied to determine theintegrals of the functions whose graphs are as shown.

    y

    x

    yy

    xa 5 x1 a 5 x1 a 5 x1x2 5 b x2 5 b x2 5 bx

    y 5 f (x)y 5 f (x)

    y 5 f (x)

    It approximates the integral of the function by integrating the linearfunction that joins the endpoints of the graph of the function.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 6 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Integration: Optimal integration points

    But this is not likely the best line for approximating the integral. Linessuch as those shown below would likely give much betterapproximations in most cases.

    yyy

    x x xa x1 bx2 a x1 bx2 a x1 bx2

    y 5 f (x)

    y 5 f (x)y 5 f (x)

    Gaussian quadrature chooses the points for evaluation in an optimal,rather than equally-spaced, way.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 7 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    Choice of Integration Nodes

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 8 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    Choice of Integration Nodes

    The nodes x1, x2, . . . , xn in the interval [a,b] and coefficientsc1, c2, . . . , cn, are chosen to minimize the expected error obtainedin the approximation

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 8 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    Choice of Integration Nodes

    The nodes x1, x2, . . . , xn in the interval [a,b] and coefficientsc1, c2, . . . , cn, are chosen to minimize the expected error obtainedin the approximation

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    To measure this accuracy, we assume that the best choice ofthese values produces the exact result for the largest class ofpolynomials, . . .

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 8 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    Choice of Integration Nodes

    The nodes x1, x2, . . . , xn in the interval [a,b] and coefficientsc1, c2, . . . , cn, are chosen to minimize the expected error obtainedin the approximation

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    To measure this accuracy, we assume that the best choice ofthese values produces the exact result for the largest class ofpolynomials, . . .

    that is, the choice that gives the greatest degree of precision.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 8 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Choice of Integration Nodes (Contd)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 9 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Choice of Integration Nodes (Contd)The coefficients c1, c2, . . . , cn in the approximation formula arearbitrary, and the nodes x1, x2, . . . , xn are restricted only by thefact that they must lie in [a,b], the interval of integration.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 9 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Choice of Integration Nodes (Contd)The coefficients c1, c2, . . . , cn in the approximation formula arearbitrary, and the nodes x1, x2, . . . , xn are restricted only by thefact that they must lie in [a,b], the interval of integration.

    This gives us 2n parameters to choose.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 9 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Choice of Integration Nodes (Contd)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 10 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Choice of Integration Nodes (Contd)If the coefficients of a polynomial are considered parameters, theclass of polynomials of degree at most 2n 1 also contains 2nparameters.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 10 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Choice of Integration Nodes (Contd)If the coefficients of a polynomial are considered parameters, theclass of polynomials of degree at most 2n 1 also contains 2nparameters.

    This, then, is the largest class of polynomials for which it isreasonable to expect a formula to be exact.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 10 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Introduction

    b

    af (x) dx

    n

    i=1

    ci f (xi ).

    Choice of Integration Nodes (Contd)If the coefficients of a polynomial are considered parameters, theclass of polynomials of degree at most 2n 1 also contains 2nparameters.

    This, then, is the largest class of polynomials for which it isreasonable to expect a formula to be exact.

    With the proper choice of the values and constants, exactness onthis set can be obtained.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 10 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Example: Formula when n = 2 on [1, 1]Suppose we want to determine c1, c2, x1, and x2 so that the integrationformula

    1

    1f (x) dx c1f (x1) + c2f (x2)

    gives the exact result whenever f (x) is a polynomial of degree2(2) 1 = 3 or less, that is, when

    f (x) = a0 + a1x + a2x2 + a3x

    3,

    for some collection of constants, a0, a1, a2, and a3.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 11 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (1/3)Because

    (a0 + a1x + a2x2 + a3x

    3) dx

    = a0

    1 dx + a1

    x dx + a2

    x2 dx + a3

    x3 dx

    this is equivalent to showing that the formula gives exact results whenf (x) is 1, x , x2, and x3.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 12 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (2/3)Hence, we need c1, c2, x1, and x2, so that

    c1 1 + c2 1 = 1

    11 dx = 2

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 13 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (2/3)Hence, we need c1, c2, x1, and x2, so that

    c1 1 + c2 1 = 1

    11 dx = 2

    c1 x1 + c2 x2 = 1

    1x dx = 0

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 13 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (2/3)Hence, we need c1, c2, x1, and x2, so that

    c1 1 + c2 1 = 1

    11 dx = 2

    c1 x1 + c2 x2 = 1

    1x dx = 0

    c1 x21 + c2 x22 = 1

    1x2 dx =

    23

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 13 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (2/3)Hence, we need c1, c2, x1, and x2, so that

    c1 1 + c2 1 = 1

    11 dx = 2

    c1 x1 + c2 x2 = 1

    1x dx = 0

    c1 x21 + c2 x22 = 1

    1x2 dx =

    23

    c1 x31 + c2 x32 = 1

    1x3 dx = 0

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 13 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (3/3)A little algebra shows that this system of equations has the uniquesolution

    c1 = 1, c2 = 1, x1 =

    33

    and x2 =

    3

    3,

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 14 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (3/3)A little algebra shows that this system of equations has the uniquesolution

    c1 = 1, c2 = 1, x1 =

    33

    and x2 =

    3

    3,

    which gives the approximation formula

    1

    1f (x) dx f

    (

    33

    )

    + f

    (3

    3

    )

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 14 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Illustration (n = 2)

    Finding the Formula Coefficients (3/3)A little algebra shows that this system of equations has the uniquesolution

    c1 = 1, c2 = 1, x1 =

    33

    and x2 =

    3

    3,

    which gives the approximation formula

    1

    1f (x) dx f

    (

    33

    )

    + f

    (3

    3

    )

    This formula has degree of precision 3, that is, it produces the exactresult for every polynomial of degree 3 or less.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 14 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Outline

    1 Gaussian Quadrature & Optimal Nodes

    2 Using Legendre Polynomials to Derive Gaussian Quadrature Formulae

    3 Gaussian Quadrature on Arbitrary Intervals

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 15 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    An Alternative Method of Derivation

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 16 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    An Alternative Method of DerivationWe will consider an approach which generates more easily thenodes and coefficients for formulas that give exact results forhigher-degree polynomials.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 16 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    An Alternative Method of DerivationWe will consider an approach which generates more easily thenodes and coefficients for formulas that give exact results forhigher-degree polynomials.

    This will be achieved using a particular set of orthogonalpolynomials (functions with the property that a particular definiteintegral of the product of any two of them is 0).

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 16 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    An Alternative Method of DerivationWe will consider an approach which generates more easily thenodes and coefficients for formulas that give exact results forhigher-degree polynomials.

    This will be achieved using a particular set of orthogonalpolynomials (functions with the property that a particular definiteintegral of the product of any two of them is 0).This set is the is the Legendre polynomials, a collection{P0(x),P1(x), . . . ,Pn(x), . . . , } with properties:(1) For each n, Pn(x) is a monic polynomial of degree n.

    (2) 1

    1P(x)Pn(x) dx = 0 whenever P(x) is a polynomial of degree

    less than n.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 16 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 17 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsThe first few Legendre Polynomials

    P0(x) = 1, P1(x) = x , P2(x) = x2 1

    3

    P3(x) = x3 3

    5x and P4(x) = x

    4 67

    x2 +3

    35

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 17 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsThe first few Legendre Polynomials

    P0(x) = 1, P1(x) = x , P2(x) = x2 1

    3

    P3(x) = x3 3

    5x and P4(x) = x

    4 67

    x2 +3

    35

    The roots of these polynomials are distinct, lie in the interval(1,1), have a symmetry with respect to the origin, and, mostimportantly,

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 17 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsThe first few Legendre Polynomials

    P0(x) = 1, P1(x) = x , P2(x) = x2 1

    3

    P3(x) = x3 3

    5x and P4(x) = x

    4 67

    x2 +3

    35

    The roots of these polynomials are distinct, lie in the interval(1,1), have a symmetry with respect to the origin, and, mostimportantly,

    they are the correct choice for determining the parameters thatgive us the nodes and coefficients for our quadrature method.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 17 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsThe first few Legendre Polynomials

    P0(x) = 1, P1(x) = x , P2(x) = x2 1

    3

    P3(x) = x3 3

    5x and P4(x) = x

    4 67

    x2 +3

    35

    The roots of these polynomials are distinct, lie in the interval(1,1), have a symmetry with respect to the origin, and, mostimportantly,

    they are the correct choice for determining the parameters thatgive us the nodes and coefficients for our quadrature method.

    The nodes x1, x2, . . . , xn needed to produce an integral approximationformula that gives exact results for any polynomial of degree less than2n are the roots of the nth-degree Legendre polynomial.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 17 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    TheoremSuppose that x1, x2, . . . , xn are the roots of the nth Legendrepolynomial Pn(x) and that for each i = 1,2, . . . ,n, the numbers ci aredefined by

    ci = 1

    1

    n

    j=1j 6=i

    x xjxi xj

    dx

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 18 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    TheoremSuppose that x1, x2, . . . , xn are the roots of the nth Legendrepolynomial Pn(x) and that for each i = 1,2, . . . ,n, the numbers ci aredefined by

    ci = 1

    1

    n

    j=1j 6=i

    x xjxi xj

    dx

    If P(x) is any polynomial of degree less than 2n, then

    1

    1P(x) dx =

    n

    i=1

    ciP(xi )

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 18 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (1/5)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 19 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (1/5)Let us first consider the situation for a polynomial P(x) of degreeless than n.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 19 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (1/5)Let us first consider the situation for a polynomial P(x) of degreeless than n.

    Re-write P(x) in terms of (n 1)st Lagrange coefficientpolynomials with nodes at the roots of the nth Legendrepolynomial Pn(x).

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 19 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (1/5)Let us first consider the situation for a polynomial P(x) of degreeless than n.

    Re-write P(x) in terms of (n 1)st Lagrange coefficientpolynomials with nodes at the roots of the nth Legendrepolynomial Pn(x).

    The error term for this representation involves the nth derivative ofP(x).

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 19 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (1/5)Let us first consider the situation for a polynomial P(x) of degreeless than n.

    Re-write P(x) in terms of (n 1)st Lagrange coefficientpolynomials with nodes at the roots of the nth Legendrepolynomial Pn(x).

    The error term for this representation involves the nth derivative ofP(x).

    Since P(x) is of degree less than n, the nth derivative of P(x) is 0,and this representation of is exact. So

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 19 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsProof (2/5)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 20 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsProof (2/5)Therefore

    P(x) =n

    i=1

    P(xi)Li(x) =n

    i=1

    n

    j=1j 6=i

    x xjxi xj

    P(xi )

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 20 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsProof (2/5)Therefore

    P(x) =n

    i=1

    P(xi)Li(x) =n

    i=1

    n

    j=1j 6=i

    x xjxi xj

    P(xi )

    and 1

    1P(x) dx =

    1

    1

    n

    i=1

    n

    j=1j 6=i

    x xjxi xj

    P(xi )

    dx

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 20 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre PolynomialsProof (2/5)Therefore

    P(x) =n

    i=1

    P(xi)Li(x) =n

    i=1

    n

    j=1j 6=i

    x xjxi xj

    P(xi )

    and 1

    1P(x) dx =

    1

    1

    n

    i=1

    n

    j=1j 6=i

    x xjxi xj

    P(xi )

    dx

    =n

    i=1

    1

    1

    n

    j=1j 6=i

    x xjxi xj

    dx

    P(xi) =n

    i=1

    ciP(xi )

    Hence the result is true for polynomials of degree less than n.Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 20 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (3/5)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 21 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (3/5)Now consider a polynomial P(x) of degree at least n but less than2n.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 21 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (3/5)Now consider a polynomial P(x) of degree at least n but less than2n.

    Divide P(x) by the nth Legendre polynomial Pn(x).

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 21 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (3/5)Now consider a polynomial P(x) of degree at least n but less than2n.

    Divide P(x) by the nth Legendre polynomial Pn(x).

    This gives two polynomials Q(x) and R(x), each of degree lessthan n, with

    P(x) = Q(x)Pn(x) + R(x)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 21 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (3/5)Now consider a polynomial P(x) of degree at least n but less than2n.

    Divide P(x) by the nth Legendre polynomial Pn(x).

    This gives two polynomials Q(x) and R(x), each of degree lessthan n, with

    P(x) = Q(x)Pn(x) + R(x)

    Note that xi is a root of Pn(x) for each i = 1,2, . . . ,n, so we have

    P(xi ) = Q(xi )Pn(xi) + R(xi) = R(xi)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 21 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (3/5)Now consider a polynomial P(x) of degree at least n but less than2n.

    Divide P(x) by the nth Legendre polynomial Pn(x).

    This gives two polynomials Q(x) and R(x), each of degree lessthan n, with

    P(x) = Q(x)Pn(x) + R(x)

    Note that xi is a root of Pn(x) for each i = 1,2, . . . ,n, so we have

    P(xi ) = Q(xi )Pn(xi) + R(xi) = R(xi)

    We now invoke the unique power of the Legendre polynomials.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 21 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (4/5)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 22 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (4/5)First, the degree of the polynomial Q(x) is less than n, so (by theLegendre orthogonality property),

    1

    1Q(x)Pn(x) dx = 0

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 22 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (4/5)First, the degree of the polynomial Q(x) is less than n, so (by theLegendre orthogonality property),

    1

    1Q(x)Pn(x) dx = 0

    Then, since R(x) is a polynomial of degree less than n, the openingargument implies that

    1

    1R(x) dx =

    n

    i=1

    ciR(xi)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 22 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (5/5)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 23 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (5/5)Putting these facts together verifies that the formula is exact for thepolynomial P(x):

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 23 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (5/5)Putting these facts together verifies that the formula is exact for thepolynomial P(x):

    1

    1P(x) dx =

    1

    1[Q(x)Pn(x) + R(x)] dx

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 23 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (5/5)Putting these facts together verifies that the formula is exact for thepolynomial P(x):

    1

    1P(x) dx =

    1

    1[Q(x)Pn(x) + R(x)] dx

    =

    1

    1R(x) dx

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 23 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (5/5)Putting these facts together verifies that the formula is exact for thepolynomial P(x):

    1

    1P(x) dx =

    1

    1[Q(x)Pn(x) + R(x)] dx

    =

    1

    1R(x) dx

    =n

    i=1

    ciR(xi)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 23 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Proof (5/5)Putting these facts together verifies that the formula is exact for thepolynomial P(x):

    1

    1P(x) dx =

    1

    1[Q(x)Pn(x) + R(x)] dx

    =

    1

    1R(x) dx

    =n

    i=1

    ciR(xi)

    =n

    i=1

    ciP(xi)

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 23 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Roots & Coefficients

    The constants ci needed for the quadrature rule can be generatedfrom the equation given in the theorem:

    ci = 1

    1

    n

    j=1j 6=i

    x xjxi xj

    dx

    but both these constants and the roots of the Legendre polynomialsare extensively tabulated.

    The following table lists these values for n = 2,3,4, and 5.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 24 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature Rules: Roots & Coefficients

    n Roots rn,i Coefficients cn,i

    2 0.5773502692 1.00000000000.5773502692 1.0000000000

    3 0.7745966692 0.55555555560.0000000000 0.8888888889

    0.7745966692 0.55555555564 0.8611363116 0.3478548451

    0.3399810436 0.65214515490.3399810436 0.65214515490.8611363116 0.3478548451

    5 0.9061798459 0.23692688500.5384693101 0.47862867050.0000000000 0.5688888889

    0.5384693101 0.47862867050.9061798459 0.2369268850

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 25 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Example (n = 2)

    Approximate 1

    1ex cos x dx using Gaussian quadrature with n = 3.

    SolutionThe entries in the table of roots and coefficients See Table

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 26 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Example (n = 2)

    Approximate 1

    1ex cos x dx using Gaussian quadrature with n = 3.

    SolutionThe entries in the table of roots and coefficients See Table give us

    1

    1ex cos x dx 0.5e0.774596692 cos 0.774596692 + 0.8 cos 0

    + 0.5e0.774596692 cos(0.774596692)= 1.9333904.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 26 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature: Legendre Polynomials

    Example (n = 2)

    Approximate 1

    1ex cos x dx using Gaussian quadrature with n = 3.

    SolutionThe entries in the table of roots and coefficients See Table give us

    1

    1ex cos x dx 0.5e0.774596692 cos 0.774596692 + 0.8 cos 0

    + 0.5e0.774596692 cos(0.774596692)= 1.9333904.

    Integration by parts can be used to show that the true value of theintegral is 1.9334214, so the absolute error is less than 3.2 105.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 26 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Outline

    1 Gaussian Quadrature & Optimal Nodes

    2 Using Legendre Polynomials to Derive Gaussian Quadrature Formulae

    3 Gaussian Quadrature on Arbitrary Intervals

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 27 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Transform the Interval of Integration to [1, 1]An integral

    ba f (x) dx over an arbitrary [a,b] can be transformed into

    an integral over [1,1] by using the change of variables See Diagram :

    t =2x a b

    b a x =12

    [(b a)t + a + b]

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 28 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Transform the Interval of Integration to [1, 1]An integral

    ba f (x) dx over an arbitrary [a,b] can be transformed into

    an integral over [1,1] by using the change of variables See Diagram :

    t =2x a b

    b a x =12

    [(b a)t + a + b]

    This permits Gaussian quadrature to be applied to any interval [a,b],because

    b

    af (x) dx =

    1

    1f(

    (b a)t + (b + a)2

    )

    (b a)2

    dt

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 28 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Example: Comparing FormulaeConsider the integral

    3

    1x6 x2 sin(2x) dx = 317.3442466.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 29 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Example: Comparing FormulaeConsider the integral

    3

    1x6 x2 sin(2x) dx = 317.3442466.

    (a) Compare the results for the closed Newton-Cotes formula withn = 1, the open Newton-Cotes formula with n = 1, and GaussianQuadrature when n = 2.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 29 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Example: Comparing FormulaeConsider the integral

    3

    1x6 x2 sin(2x) dx = 317.3442466.

    (a) Compare the results for the closed Newton-Cotes formula withn = 1, the open Newton-Cotes formula with n = 1, and GaussianQuadrature when n = 2.

    (b) Compare the results for the closed Newton-Cotes formula withn = 2, the open Newton-Cotes formula with n = 2, and GaussianQuadrature when n = 3.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 29 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Solution: Part (a): Newton-Cotes Formulae (n = 1)Each of the formulas in this part requires 2 evaluations of the functionf (x) = x6 x2 sin(2x). The Newton-Cotes approximations See Formulaeare:

    Closed n = 1 :2)2

    [f (1) + f (3)] = 731.6054420

    Open n = 1 :3(2/3)

    2[f (5/3) + f (7/3)] = 188.7856682

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 30 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Solution: Part (a): Gaussian Quadrature (n = 2)Gaussian quadrature applied to this problem requires that the integralfirst be transformed into a problem whose interval of integration is[1,1]. Using the transformation gives

    3

    1x6 x2 sin(2x) dx =

    1

    1(t + 2)6 (t + 2)2 sin(2(t + 2)) dt .

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 31 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Solution: Part (a): Gaussian Quadrature (n = 2)Gaussian quadrature applied to this problem requires that the integralfirst be transformed into a problem whose interval of integration is[1,1]. Using the transformation gives

    3

    1x6 x2 sin(2x) dx =

    1

    1(t + 2)6 (t + 2)2 sin(2(t + 2)) dt .

    Gaussian quadrature with n = 2 then gives

    3

    1x6 x2 sin(2x) dx

    f (0.5773502692 + 2) + f (0.5773502692 + 2)= 306.8199344

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 31 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Solution: Part (b): Newton-Cotes Formulae (n = 2)Each of the formulas in this part requires 3 function evaluations. TheNewton-Cotes approximations See Formulae are:

    Closed n = 2 :1)3

    [f (1) + 4f (2) + f (3)] = 333.2380940

    Open n = 2 :4(1/2)

    3[2f (1.5) f (2) + 2f (2.5)] = 303.5912023

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 32 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    Solution: Part (b): Gaussian Quadrature (n = 3)Gaussian quadrature with n = 3, once the transformation has been done,gives

    3

    1x6 x2 sin(2x) dx

    0.5f (0.7745966692 + 2) + 0.8f (2) + 0.5f (0.7745966692 + 2)

    = 317.2641516

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 33 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    3

    1x6 x2 sin(2x) dx = 317.3442466.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 34 / 40

  • Introduction Legendre Polynomials Arbitrary Intervals

    Gaussian Quadrature on Arbitrary Intervals

    3

    1x6 x2 sin(2x) dx = 317.3442466.

    Comparison of Results

    Newton-CotesClosed Open Gaussian Quadrature

    2-Point Rule 731.6054420 188.7856682 306.8199344

    3-Point Rule 333.2380940 303.5912023 317.2641516

    The Gaussian quadrature results are clearly superior in each instance.

    Numerical Analysis (Chapter 4) Gaussian Quadrature R L Burden & J D Faires 34 / 40

  • Questions?

  • Reference Material

  • Gaussian Quadrature Rules: Roots & Coefficients

    n Roots rn,i Coefficients cn,i

    2 0.5773502692 1.00000000000.5773502692 1.0000000000

    3 0.7745966692 0.55555555560.0000000000 0.8888888889

    0.7745966692 0.55555555564 0.8611363116 0.3478548451

    0.3399810436 0.65214515490.3399810436 0.65214515490.8611363116 0.3478548451

    5 0.9061798459 0.23692688500.5384693101 0.47862867050.0000000000 0.5688888889

    0.5384693101 0.47862867050.9061798459 0.2369268850

    Return to 11 e

    x cos(x) dx Example

  • Mapping Interval [a, b] onto [1, 1]

    t

    x

    21

    1

    a b

    (a, 21)

    (b, 1)

    2x 2 a 2 bt 5

    b 2 a

    Return to Gaussian Quadrature on Arbitrary Intervals (Introduction)

    Return to Gaussian Quadrature on Arbitrary Intervals (Example Part (a))

    Return to Gaussian Quadrature on Arbitrary Intervals (Example Part (b))

  • Open & Closed Newton-Cotes Formulae (n = 1)

    Closed n = 1: Trapezoidal Rule:

    x1

    x0f (x) dx =

    h2

    [f (x0) + f (x1)] h3

    12f ()

    where x0 < < x1.

    Open n = 1:

    x2

    x1

    f (x) dx =3h2

    [f (x0) + f (x1)] +3h3

    4f ()

    where x1 < < x2.

    Return to arbitrary intervals Example (where n = 1)

  • Open & Closed Newton-Cotes Formulae (n = 2)

    n = 0: Midpoint Rule:

    x1

    x1

    f (x) dx = 2hf (x0) +h3

    3f ()

    where x1 < < x1.

    Open n = 2 x3

    x1

    f (x) dx =4h3

    [2f (x0) f (x1) + 2f (x2)] +14h5

    45f (4)()

    where x1 < < x3.

    Return to arbitrary intervals Example (where n = 1)

  • Initial-Value Problems for ODEs

    Elementary Theory of Initial-Value Problems

    Numerical Analysis (9th Edition)

    R L Burden & J D Faires

    Beamer Presentation Slidesprepared byJohn Carroll

    Dublin City University

    c 2011 Brooks/Cole, Cengage Learning

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 2 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    2 The Existence of a Unique Solution

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 2 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    2 The Existence of a Unique Solution

    3 Well-Posed Problems

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 2 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    2 The Existence of a Unique Solution

    3 Well-Posed Problems

    4 Example of a Well-Posed Problem

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 2 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    2 The Existence of a Unique Solution

    3 Well-Posed Problems

    4 Example of a Well-Posed Problem

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 3 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Lipschitz Condition

    We begin by presenting some definitions and results from the theory ofordinary differential equations before considering methods forapproximating the solutions to initial-value problems.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 4 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Lipschitz Condition

    We begin by presenting some definitions and results from the theory ofordinary differential equations before considering methods forapproximating the solutions to initial-value problems.

    Definition: Lipschitz ConditionA function f (t , y) is said to satisfy a Lipschitz condition in the variable yon a set D IR2 if a constant L > 0 exists with

    |f (t , y1) f (t , y2, )| L |y1 y2|

    whenever (t , y1) and (t , y2) are in D. The constant L is called aLipschitz constant for f .

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 4 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Lipschitz Condition

    ExampleShow that f (t , y) = t |y | satisfies a Lipschitz condition on the intervalD = { (t , y) | 1 t 2 and 3 y 4 }.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 5 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Lipschitz Condition

    ExampleShow that f (t , y) = t |y | satisfies a Lipschitz condition on the intervalD = { (t , y) | 1 t 2 and 3 y 4 }.

    SolutionFor each pair of points (t , y1) and (t , y2) in D we have

    |f (t , y1) f (t , y2)| = |t |y1| t |y2|| = |t | ||y1| |y2|| 2|y1 y2|

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 5 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Lipschitz Condition

    ExampleShow that f (t , y) = t |y | satisfies a Lipschitz condition on the intervalD = { (t , y) | 1 t 2 and 3 y 4 }.

    SolutionFor each pair of points (t , y1) and (t , y2) in D we have

    |f (t , y1) f (t , y2)| = |t |y1| t |y2|| = |t | ||y1| |y2|| 2|y1 y2|

    Thus f satisfies a Lipschitz condition on D in the variable y withLipschitz constant 2.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 5 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Lipschitz Condition

    ExampleShow that f (t , y) = t |y | satisfies a Lipschitz condition on the intervalD = { (t , y) | 1 t 2 and 3 y 4 }.

    SolutionFor each pair of points (t , y1) and (t , y2) in D we have

    |f (t , y1) f (t , y2)| = |t |y1| t |y2|| = |t | ||y1| |y2|| 2|y1 y2|

    Thus f satisfies a Lipschitz condition on D in the variable y withLipschitz constant 2. The smallest value possible for the Lipschitzconstant for this problem is L = 2, because, for example,

    |f (2,1) f (2,0)| = |2 0| = 2|1 0|

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 5 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Convex Set

    Definition: Convex Set

    A set D IR2 is said to be convex if whenever (t1, y1) and (t2, y2)belong to D, then

    ((1 )t1 + t2, (1 )y1 + y2)

    also belongs to D for every in [0,1].

    (t1, y1)

    (t1, y1)(t2, y2)

    (t2, y2)

    Convex Not convex

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 6 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Convex Set

    Comment on the Definition

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 7 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Convex Set

    Comment on the DefinitionIn geometric terms, the definition states that a set is convexprovided that whenever two points belong to the set, the entirestraight-line segment between the points also belongs to the set.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 7 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Convex Set

    Comment on the DefinitionIn geometric terms, the definition states that a set is convexprovided that whenever two points belong to the set, the entirestraight-line segment between the points also belongs to the set.

    The sets we consider in this section are generally of the form

    D = { (t , y) | a t b and < y < }

    for some constants a and b.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 7 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Convex Set

    Comment on the DefinitionIn geometric terms, the definition states that a set is convexprovided that whenever two points belong to the set, the entirestraight-line segment between the points also belongs to the set.

    The sets we consider in this section are generally of the form

    D = { (t , y) | a t b and < y < }

    for some constants a and b.

    It is easy to verify that these sets are convex.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 7 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Theory of IVPs: Lipschitz Condition & Convexity

    Theorem: Sufficient Conditions

    Suppose f (t , y) is defined on a convex set D IR2. If a constant L > 0exists with

    fy

    (t , y)

    L, for all (t , y) D

    then f satisfies a Lipschitz condition on D in the variable y withLipschitz constant L.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 8 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Theory of IVPs: Lipschitz Condition & Convexity

    Theorem: Sufficient Conditions

    Suppose f (t , y) is defined on a convex set D IR2. If a constant L > 0exists with

    fy

    (t , y)

    L, for all (t , y) D

    then f satisfies a Lipschitz condition on D in the variable y withLipschitz constant L.

    As the next result will show, this theorem is often of significant interestto determine whether the function involved in an initial-value problemsatisfies a Lipschitz condition in its second variable, and the abovecondition is generally easier to apply than the definition.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 8 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    2 The Existence of a Unique Solution

    3 Well-Posed Problems

    4 Example of a Well-Posed Problem

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 9 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs

    Theorem: Existence & UniquenessSuppose that D = { (t , y) | a t b and < y < } and thatf (t , y) is continuous on D. If f satisfies a Lipschitz condition on D in thevariable y , then the initial-value problem

    y (t) = f (t , y), a t b, y(a) = ,

    has a unique solution y(t) for a t b.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 10 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs

    Theorem: Existence & UniquenessSuppose that D = { (t , y) | a t b and < y < } and thatf (t , y) is continuous on D. If f satisfies a Lipschitz condition on D in thevariable y , then the initial-value problem

    y (t) = f (t , y), a t b, y(a) = ,

    has a unique solution y(t) for a t b.

    Note: This is a version of the fundamental existence and uniquenesstheorem for first-order ordinary differential equations. The proof of thetheorem, in approximately this form, can be found in Birkhoff, G. andG. Rota, Ordinary differential equations, (4th edition), John Wiley &Sons, New York, 1989.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 10 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs

    Example: Applying the Existence & Uniqueness TheoremUse the Existence & Uniqueness Theorem to show that there is aunique solution to the initial-value problem

    y = 1 + t sin(ty), 0 t 2, y(0) = 0

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 11 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs

    Example: Applying the Existence & Uniqueness TheoremUse the Existence & Uniqueness Theorem to show that there is aunique solution to the initial-value problem

    y = 1 + t sin(ty), 0 t 2, y(0) = 0

    Solution (1/2)Holding t constant and applying the Mean Value Theorem See Theoremto the function

    f (t , y) = 1 + t sin(ty)

    we find that when y1 < y2, a number in (y1, y2) exists with

    f (t , y2) f (t , y1)y2 y1

    =

    yf (t , ) = t2 cos(t)

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 11 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs

    f (t , y2) f (t , y1)y2 y1

    =

    yf (t , ) = t2 cos(t)

    Solution (2/2)

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 12 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs

    f (t , y2) f (t , y1)y2 y1

    =

    yf (t , ) = t2 cos(t)

    Solution (2/2)Thus

    |f (t , y2) f (t , y1)| = |y2 y1||t2 cos(t)| 4|y2 y1|

    and f satisfies a Lipschitz condition in the variable y with Lipschitzconstant L = 4.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 12 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs

    f (t , y2) f (t , y1)y2 y1

    =

    yf (t , ) = t2 cos(t)

    Solution (2/2)Thus

    |f (t , y2) f (t , y1)| = |y2 y1||t2 cos(t)| 4|y2 y1|

    and f satisfies a Lipschitz condition in the variable y with Lipschitzconstant L = 4.

    Additionally, f (t , y) is continuous when 0 t 2 and < y < , so the Existence & Uniqueness Theorem impliesthat a unique solution exists to this initial-value problem.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 12 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    2 The Existence of a Unique Solution

    3 Well-Posed Problems

    4 Example of a Well-Posed Problem

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 13 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed problems

    Question

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 14 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed problems

    Question

    How do we determine whether a particular problem has the propertythat small changes, or perturbations, in the statement of the problemintroduce correspondingly small changes in the solution?

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 14 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed problems

    Question

    How do we determine whether a particular problem has the propertythat small changes, or perturbations, in the statement of the problemintroduce correspondingly small changes in the solution?

    We first need to give a workable definition to express this concept.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 14 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Definition: Well-Posed ProblemThe initial-value problem

    dydt

    = f (t , y), a t b, y(a) =

    is said to be a well-posed problem if the following 2 conditions aresatisfied:

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 15 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Definition: Well-Posed Problem (Continued)A unique solution, y(t), to the problem exists, and

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 16 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Definition: Well-Posed Problem (Continued)A unique solution, y(t), to the problem exists, and

    There exist constants 0 > 0 and k > 0 such that for any , with0 > > 0, whenever (t) is continuous with |(t)| < for all t in[a,b], and when |0| < , the initial-value problem

    dzdt

    = f (t , z) + (t), a t b, z(a) = + 0

    has a unique solution z(t) that satisfies

    |z(t) y(t)| < k for all t in [a,b].

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 16 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Definition: Well-Posed Problem (Continued)A unique solution, y(t), to the problem exists, and

    There exist constants 0 > 0 and k > 0 such that for any , with0 > > 0, whenever (t) is continuous with |(t)| < for all t in[a,b], and when |0| < , the initial-value problem

    dzdt

    = f (t , z) + (t), a t b, z(a) = + 0

    has a unique solution z(t) that satisfies

    |z(t) y(t)| < k for all t in [a,b].

    Note: The problem in z, as specified above, is called a perturbedproblem associated with the original problem for y .

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 16 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Conditions to ensure that an initial-value problem is well-posed.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 17 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Conditions to ensure that an initial-value problem is well-posed.

    Theorem: Well-Posed ProblemSuppose D = { (t , y) | a t b and < y < }. If f is continuousand satisfies a Lipschitz condition in the variable y on the set D, thenthe initial-value problem

    dydt

    = f (t , y), a t b, y(a) =

    is well-posed.

    The proof of this theorem can be found in Birkhoff, G. and G. Rota,Ordinary differential equations, (4th edition), John Wiley & Sons, NewYork, 1989.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 17 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Outline

    1 Lipschitz Condition & Convexity

    2 The Existence of a Unique Solution

    3 Well-Posed Problems

    4 Example of a Well-Posed Problem

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 18 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Example: Applying the Theorem on Well-Posed ProblemsShow that the initial-value problem

    dydt

    = y t2 + 1, 0 t 2, y(0) = 0.5

    is well posed on D = { (t , y) | 0 t 2 and < y < }.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 19 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 20 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Solution (1/3)Because

    (y t2 + 1)y

    = |1| = 1

    the Lipschitz Condition theorem implies that f (t , y) = y t2 + 1satisfies a Lipschitz condition in y on D with Lipschitz constant 1.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 20 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Solution (1/3)Because

    (y t2 + 1)y

    = |1| = 1

    the Lipschitz Condition theorem implies that f (t , y) = y t2 + 1satisfies a Lipschitz condition in y on D with Lipschitz constant 1.

    Since f is continuous on D, the Theorem on Well-Posed Problemsimplies that the problem is well-posed.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 20 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Solution (2/3)

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 21 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Solution (2/3)As an illustration, consider the solution to the perturbed problem

    dzdt

    = z t2 + 1 + , 0 t 2, z(0) = 0.5 + 0

    where and 0 are constants.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 21 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    Solution (2/3)As an illustration, consider the solution to the perturbed problem

    dzdt

    = z t2 + 1 + , 0 t 2, z(0) = 0.5 + 0

    where and 0 are constants.

    The solutions to the original problem and this perturbed problemare

    y(t) = (t + 1)2 0.5et

    and z(t) = (t + 1)2 + ( + 0 0.5)et

    respectively.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 21 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    y(t) = (t + 1)2 0.5et

    z(t) = (t + 1)2 + ( + 0 0.5)et

    Solution (3/3)

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 22 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    y(t) = (t + 1)2 0.5et

    z(t) = (t + 1)2 + ( + 0 0.5)et

    Solution (3/3)Suppose that is a positive number. If || < and |0| < , then

    |y(t) z(t)| = |( + 0)et | | + 0|e2 + || (2e2 + 1)

    for all t .

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 22 / 25

  • Lipschitz Condition Unique Solution Well-Posed Problems Example

    Elementary Theory of IVPs: Well-Posed Problems

    y(t) = (t + 1)2 0.5et

    z(t) = (t + 1)2 + ( + 0 0.5)et

    Solution (3/3)Suppose that is a positive number. If || < and |0| < , then

    |y(t) z(t)| = |( + 0)et | | + 0|e2 + || (2e2 + 1)

    for all t .

    This implies that the original problem is well-posed withk() = 2e2 + 1 for all > 0.

    Numerical Analysis (Chapter 5) Elementary Theory of Initial-Value Problems R L Burden & J D Faires 22 / 25

  • Questions?

  • Reference Material

  • Mean Value Theorem

    If f C[a,b] and f is differentiable on (a,b), then a number c existssuch that

    f (c) =f (b) f (a)

    b a

    y

    xa bc

    Slope f 9(c)

    Parallel lines

    Slopeb 2 a

    f (b) 2 f (a)

    y 5 f (x)

    Return to Existence & Uniqueness Example

    Gaussian Quadrature & Optimal NodesUsing Legendre Polynomials to Derive Gaussian Quadrature FormulaeGaussian Quadrature on Arbitrary IntervalsLecture 19.pdfLipschitz Condition & ConvexityThe Existence of a Unique SolutionWell-Posed ProblemsExample of a Well-Posed Problem