+ All Categories
Home > Documents > Lec 8BUE

Lec 8BUE

Date post: 04-Jun-2018
Category:
Upload: tarek-hassan
View: 217 times
Download: 0 times
Share this document with a friend

of 25

Transcript
  • 8/14/2019 Lec 8BUE

    1/25

    ScheduleWeek Date Topic Classification of Topic

    1 9 Feb. 2010 Introduction toNumerical Methodsand Type of Errors

    Measuring errors, Binaryrepresentation, Propagation of errorsand Taylor series

    2 14 Feb. 2010 Nonlinear Bisection Method

    3 21 Feb. 2010 Newton-Raphson Method

    4 28 Feb. 2010 Interpolation Lagrange Interpolation

    5 7 March 2010 Newton's Divided Difference Method

    6 14 March 2010 Differentiation Newton's Forward and BackwardDifference

    7 21 March 2010 Regression Least squares

    8 28 March 2010 Systems of Linear

    Equations

    Gaussian Jordan

    9 11 April 2010 Gaussian Seidel

    10 18 April 2010 Integration Composite Trapezoidal and SimpsonRules

    11 25 April 2010 Ordinary Differential

    Equations

    Euler's Method

    12 2 May 2010 Runge-Kutta 2nd and4th order Method

  • 8/14/2019 Lec 8BUE

    2/25

    2

    Trapezoidal Rule of

    Integration

  • 8/14/2019 Lec 8BUE

    3/25

    3

    What is IntegrationIntegration:

    b

    a

    dx)x(fI

    The process of measuringthe area under a function

    plotted on a graph.

    Where:

    f(x) is the integrand

    a= lower limit of integration

    b= upper limit of integration

    f(x)

    a b

    b

    a

    dx)x(f

    y

    x

  • 8/14/2019 Lec 8BUE

    4/25

    4

    Method Derived From GeometryThe area under thecurve is a trapezoid.

    The integral

    trapezoidofAreadxxf

    b

    a

    )(

    )height)(sidesparallelofSum(2

    1

    )ab()a(f)b(f 2

    1

    2

    )b(f)a(f)ab(

    Figure 2: Geometric Representation

    f(x)

    a b

    b

    a

    dx)x(f1

    y

    x

    f1(x)

  • 8/14/2019 Lec 8BUE

    5/25

    5

    Example 1The vertical distance covered by a rocket from t=8 tot=30 seconds is given by:

    30

    8

    892100140000

    1400002000 dtt.

    tlnx

    a) Use single segment Trapezoidal rule to find the distance covered.

    b) Find the true error, for part (a).c) Find the absolute relative true error, for part (a).

    tEa

  • 8/14/2019 Lec 8BUE

    6/25

    6

    Solution

    2

    )b(f)a(f)ab(Ia)

    8

    a 30bt.

    tln)t(f 89

    2100140000

    1400002000

    )(.)(ln)(f 88982100140000

    140000

    20008

    )(.)(

    ln)(f 3089302100140000

    140000200030

    s/m.27177

    s/m.67901

  • 8/14/2019 Lec 8BUE

    7/257

    Solution (cont)

    2

    6790127177830

    ..)(I

    m11868

    b) The exact value of the above integral is

    30

    8

    892100140000

    1400002000 dtt.

    tlnx m11061

  • 8/14/2019 Lec 8BUE

    8/258

    Solution (cont)ValueeApproximatValueTrueEt

    1186811061

    m807

    c) The absolute relative true error, , would bet

    10011061

    1186811061

    t %.29597

  • 8/14/2019 Lec 8BUE

    9/259

    Multiple Segment Trapezoidal Rule

    f(x)

    a b

    y

    x

    4

    aba

    42

    aba

    43

    aba

    Figure 3: Multiple (n=4) Segment Trapezoidal Rule

    Divide into equal segmentsas shown in Figure 3. Thenthe width of each segment is:

    n

    abh

    The integral I is:

    b

    a

    dx)x(fI

  • 8/14/2019 Lec 8BUE

    10/25

    b

    h)n(a

    h)n(a

    h)n(a

    ha

    ha

    ha

    a dx)x(fdx)x(f...dx)x(fdx)x(f 1

    1

    2

    2

    10

    Multiple Segment Trapezoidal RuleThe integral Ican be broken into hintegrals as:

    b

    a dx)x(f

    Applying Trapezoidal rule on each segment gives:

    b

    a

    dx)x(f

    1

    1

    )(2

    )(

    2

    )( n

    i

    ihafbfaf

    h

  • 8/14/2019 Lec 8BUE

    11/2511

    Example 2The vertical distance covered by a rocket from to seconds isgiven by:

    30

    8

    892100140000

    1400002000 dtt.t

    lnx

    a) Use two-segment Trapezoidal rule to find the distance covered.

    b) Find the true error, for part (a).c) Find the absolute relative true error, for part (a).a

    tE

  • 8/14/2019 Lec 8BUE

    12/2512

    Solutiona) The solution using 2-segment Trapezoidal rule is

    1

    1)(2

    )()( n

    iihaf

    bfaf

    hI

    2n 8a 30b

    2

    830

    n

    abh

    11

  • 8/14/2019 Lec 8BUE

    13/2513

    Solution (cont)

    12

    1

    )(2

    )30()8(11

    i

    ihafff

    I

    )19(

    2

    )30()8(11 f

    ff

    m11266

    Then:

  • 8/14/2019 Lec 8BUE

    14/2514

    Solution (cont)

    30

    8

    892100140000

    1400002000 dtt.t

    lnx m11061

    b) The exact value of the above integral is

    so the true error is

    ValueeApproximatValueTrueEt

    1126611061

  • 8/14/2019 Lec 8BUE

    15/2515

    Solution (cont)c) The absolute relative true error, , would bet

    100ValueTrueErrorTrue t

    10011061

    1126611061

    %8534.1

  • 8/14/2019 Lec 8BUE

    16/2516

    Solution (cont)Table 1 gives the valuesobtained using multiple

    segment Trapezoidal rulefor:

    n Value Et

    1 11868 -807 7.296 ---

    2 11266 -205 1.853 5.343

    3 11153 -91.4 0.8265 1.019

    4 11113 -51.5 0.4655 0.3594

    5 11094 -33.0 0.2981 0.1669

    6 11084 -22.9 0.2070 0.09082

    7 11078 -16.8 0.1521 0.05482

    8 11074 -12.9 0.1165 0.03560

    30

    8

    892100140000

    1400002000 dtt.

    tlnx

    Table 1: Multiple Segment Trapezoidal Rule Values

    %t %a

  • 8/14/2019 Lec 8BUE

    17/2517

    The error Bounds in MultipleSegment Trapezoidal Rule

    The error bounds are now obtained by taking the largest value for

    Say, and the smallest value, , in the interval of integration by

    "f

    2M

    *

    2M

    .1212

    )( 22

    3*

    22 hab

    n

    abkwherekMkM

  • 8/14/2019 Lec 8BUE

    18/2518

    Simpsons 1/3rd Rule of

    Integration

  • 8/14/2019 Lec 8BUE

    19/2519

    Basis of Simpsons 1/3rd

    Rule Trapezoidal rule was based on approximating the integrand by a first

    order polynomial, and then integrating the polynomial in the intervalof integration.

    Simpsons 1/3rd rule is an extension of Trapezoidal rule where theintegrand is approximated by a second order polynomial.

  • 8/14/2019 Lec 8BUE

    20/2520

    ]24[3

    )( 210 sssh

    dxxfb

    a

    Multiple Segment Simpsons 1/3rd

    Rulesuch that

    2

    2

    2

    1

    1

    1

    00

    )(

    )(

    ),()(

    n

    evenii

    i

    n

    oddii

    i

    n

    xfs

    xfs

    xfxfs

    ,n

    abh

  • 8/14/2019 Lec 8BUE

    21/2521

    Example 3 Use 4-segment Simpsons 1/3rd Rule to approximate the

    distance Use 4-segment Simpsons 1/3rd Rule to approximate the

    distance

    covered by a rocket from t= 8 to t=30 as given by

    30

    8

    dtt8.9t2100140000

    140000ln2000x

    a) Use four segment Simpsons 1/3rd Rule to find the approximatevalue of x.b) Find the true error, for part (a).c) Find the absolute relative true error, for part (a).

    tE

    a

  • 8/14/2019 Lec 8BUE

    22/2522

    Solution

    4

    22

    4

    83024

    3) 210

    hsss

    hxa

    )30(f)t(f2)t(f4)t(f4)8(f12

    22231

    )(

    )()(

    )30()8()()(

    22

    311

    400

    tfs

    tftfs

    fftftfs

  • 8/14/2019 Lec 8BUE

    23/25

    23

    Solution (cont.)cont.

    )30(f)19(f2)5.24(f4)5.13(f4)8(f611

    6740.901)7455.484(2)0501.676(4)2469.320(42667.1776

    11

    m64.11061

  • 8/14/2019 Lec 8BUE

    24/25

    24

    Solution (cont.)b) In this case, the true error is

    64.1106134.11061Et

    m30.0

    c) The absolute relative true error

    %10034.11061

    64.1106134.11061t

    %0027.0

  • 8/14/2019 Lec 8BUE

    25/25

    Solution (cont.)

    Table 1: Values of Simpsons 1/3rd Rule for Example 3 with multiple segments

    n Approximate Value Et |t |

    246

    810

    11065.7211061.6411061.40

    11061.3511061.34

    4.380.300.06

    0.010.00

    0.0396%0.0027%0.0005%

    0.0001%0.0000%


Recommended