Numerical Integration Eng

download Numerical Integration Eng

of 25

Transcript of Numerical Integration Eng

  • 8/10/2019 Numerical Integration Eng

    1/25

    11/10/2014 1

    Numerical Integration

    Chapter 4

  • 8/10/2019 Numerical Integration Eng

    2/25

    11/10/2014 2

    Numerical Integration

    If

    Function f(x)continuous on [a, b];

    Its primitive, F(x), is known,

    Then, the defined integral,

    aFbFdxxfIb

    a

  • 8/10/2019 Numerical Integration Eng

    3/25

    11/10/2014 3

    Numerical IntegrationWhen do we need it?

    Function f(x)defined by a table;

    or

    The finding out of f(x) primitive, F(x), by using

    analytical methods, involves a computing

    significant effort f(x) will be evaluated forseveral arguments, the problem becoming a

    first case problem).

  • 8/10/2019 Numerical Integration Eng

    4/25

    11/10/2014 4

    Numerical Integration

    Cuadraturenumerical computing of

    the simple integrals;

    Cubature- numerical computing of the

    dubleintegrals.

  • 8/10/2019 Numerical Integration Eng

    5/25

    11/10/2014 5

    Numerical Integration

    4.1Newton-Cotes Cuadrature Formulae

    We are requested to compute the

    following defined integral:

    b

    a

    dxxfI

  • 8/10/2019 Numerical Integration Eng

    6/25

    11/10/2014 6

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae

    1. The interval [a, b] is divided in n-1 equal subintervals of length

    by the points

    1n

    abh

    n,...,2,1i,h)1i(ax i

    a=x1b=xnx3x2 xn-1

    h h h

  • 8/10/2019 Numerical Integration Eng

    7/25

    11/10/2014 7

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae

    2. Its assumed that the values of the function f(x) are known for the

    arguments xi,

    The function f(x) will be modeled by Lagrange formula of

    interpolation.

    n,...,2,1i,xfy

    ii

    n

    1i

    in

    ij

    ji

    n

    ij j

    1n y

    xx

    xx

    xL

  • 8/10/2019 Numerical Integration Eng

    8/25

    11/10/2014 8

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae The xipoints network - EQUIDISTANT

    The following notation is introduced:

    The produces from the Lagrange interpolation

    formula become:

    h

    xxq 1

    n

    ij

    1nn

    ijj 1jqhxx

    !)in()!1i(h)1()xx(n

    ij

    1nin

    ji

  • 8/10/2019 Numerical Integration Eng

    9/25

    11/10/2014 9

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae

    Lagrange interpolation formula is now:

    n

    1i

    iin

    n

    ij

    1n y

    )!in()!1i()1(

    1jq

    xL

  • 8/10/2019 Numerical Integration Eng

    10/25

    11/10/2014 10

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae

    3. If its considered that:

    The following cuadrature formula results:

    b

    a

    1n

    b

    a

    xd)x(Ldxxf

    n

    1i

    ii

    b

    a

    yAdxxf

  • 8/10/2019 Numerical Integration Eng

    11/25

    11/10/2014 11

    )!in()!1i()1(

    qd1jqh

    )!in()!1i()1(

    xd1jq

    Ain

    1n

    0

    n

    ijb

    a

    in

    n

    ij

    i

    Change of variable x q

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae

    where,

    n

    1i

    ii

    b

    a

    yAdxxf

  • 8/10/2019 Numerical Integration Eng

    12/25

    11/10/2014 12

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae

    The Aicoefficients have the form:

    where

    Now, the Newton-Cotescuadrature formula can be obtained:

    ii H)ab(A

    n,...,2,1i,

    )1n()!in()!1i()1(

    qd1jq

    Hin

    1n

    0

    n

    ij

    i

    n

    1i

    ii

    b

    a

    yH)ab(dxxf

  • 8/10/2019 Numerical Integration Eng

    13/25

    11/10/2014 13

    Numerical Integration4.1Newton-Cotes Cuadrature Formulae

    The HicoefficientsCotes coef f f ic ients

    Characterist ics

    1.

    2.

    Remark

    The Hicoefficients are independent of:the function to be integrated, f(x);

    the integration interval.

    1Hn

    1i

    i

    1ini HH

  • 8/10/2019 Numerical Integration Eng

    14/25

    11/10/2014 14

    Numerical Integration4.2Trapezoidal Rule

    By considering for the NC coefficients,

    n=2, the following values for the Cotes

    coefficients are obtained:

    1

    0

    12

    1qd)1q(H

    n,...,2,1i,)1n()!in()!1i()1(

    qd1jq

    H in

    1n

    0

    n

    ij

    i

    2

    1qdqH

    1

    0

    2

  • 8/10/2019 Numerical Integration Eng

    15/25

    11/10/2014 15

    Numerical Integration4.2Trapezoidal Rule

    NC Formula

    n

    1i ii

    b

    a

    yH)ab(dxxf

    )yy(2hdxxf 21

    b

    a

  • 8/10/2019 Numerical Integration Eng

    16/25

    11/10/2014 16

    Numerical Integration4.2Trapezoidal Rule

    NC Formula

    n

    1i ii

    b

    a

    yH)ab(dxxf

    )yy(2

    hdxxf 21

    b

    a

    Practically the Trapezoidal Rule is of no interest.

  • 8/10/2019 Numerical Integration Eng

    17/25

    11/10/2014 17

    Numerical Integration4.2Trapezoidal Rule

    THE GENERALIZED

    TRAPEZOIDAL RULE

    By generalizing,

    Cuadrature formula ofpractical interest.

  • 8/10/2019 Numerical Integration Eng

    18/25

    11/10/2014 18

    Numerical Integration4.2Trapezoidal Rule

    Procedure

    The interval [a, b] is divided in n-1 equal subintervals of

    length h=(b-a)/(n-1), , by considering n equidistant

    points:

    The Trapezoidal Rule will be used on each subinterval

    [xi, xi+1], i=1, ..., n-1.

    1,2,...ni,h)1i(ax i

    )yy(2

    h...)yy(

    2

    hdx)x(f n1n21

    b

    a

    b=xna=x1 x3x2 xn-1

    hh h

  • 8/10/2019 Numerical Integration Eng

    19/25

    11/10/2014 19

    Numerical Integration4.2Trapezoidal Rule

    where,

    f(xi)=yi, i=1, 2, ..., n.

    2

    y

    y2

    y

    hdx)x(f

    n1n

    2ii

    1

    b

    a

  • 8/10/2019 Numerical Integration Eng

    20/25

    11/10/2014 20

    Numerical Integration4.2Trapezoidal Rule

    Geometrically, this formula assumes the replacement of the

    functions graph by a polygonal line to link the points (x1,

    y1), ..., (xi, yi),..., (xn, yn).

  • 8/10/2019 Numerical Integration Eng

    21/25

    11/10/2014 21

    Numerical Integration4.3Simpsons Rule

    Better accuracy than the trapezoidal rule

    It comes from the NC formula for n=3

    2

    0

    316

    1qd)2q)(1q(

    4

    1HH

    2

    0

    23

    2qd)2q(q

    2

    1H

  • 8/10/2019 Numerical Integration Eng

    22/25

    11/10/2014 22

    Numerical Integration4.3Simpsons Rule

    Considering b-a = x3-x1=2h

    )yy4y(3

    hdx)x(f 321

    x

    x

    3

    1

    Geometrically, the formula assumes the replacement of the

    curve y=f(x) by a parabola y=L2(x)

    y=L2(x)

    y=f(x)

  • 8/10/2019 Numerical Integration Eng

    23/25

    11/10/2014 23

    Numerical Integration4.3Simpsons Rule

    The approximation accuracy can be improved by

    using the GENERALIZED SIMPSONS RULE.

  • 8/10/2019 Numerical Integration Eng

    24/25

    11/10/2014 24

    Numerical Integration4.3Simpsons Rule

    Procedure

    The interval [a, b] is divided in n-1 equal

    subintervals of length h=(b-a)/(n-1), by n

    equidistant points, where n is mandatory odd.

    On each double subinterval [x1, x3], [x3, x5], ...,

    [xn-2, xn], the Simsons Rule is used.

    1,2,...ni,h)1i(ax i

    b=xna=x1 x3x2 xn-1

    hh h

  • 8/10/2019 Numerical Integration Eng

    25/25

    11/10/2014 25

    Numerical Integration4.3Simpsons Rule

    )yy4y(3

    h...)yy4y(

    3

    h)yy4y(

    3

    hdx)x(f n1n2n543321

    b

    a

    )y24y(3

    hydx

    n121

    b

    a

    2/)3n(

    1i

    1i21 y

    2/)1n(

    1i

    i22 y