Kuliah 4 Interpolasi-Lagrange Method

download Kuliah 4 Interpolasi-Lagrange Method

of 19

Transcript of Kuliah 4 Interpolasi-Lagrange Method

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    1/19

    KAEDAHINTERPOLASI

    (Lagrange Interpolation Method)

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    2/19

    yang mana n pada mewakili polinomial peringkat

    ke-n yang menghampiri fungsi dengan diberi

    ( )n

    P x

    IINTERPOLASINTERPOLASILLAGRANGEAGRANGE

    Polinomial interpolasi Lagrange diberi sebagai

    0

    ( ) ( ) ( )n

    n i i

    i

    P x L x f x=

    =

    )(xfy =

    nnnn yxyxyxyx ,,,,......,,,, 111100

    n + 1 data iaitu , dan

    2

    =

    =

    n

    ijj ji

    j

    ixx

    xxxL

    0

    )(

    )(xLi adalah fungsi pemberat.

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    3/19

    CONTOH 1(A)

    Halaju menaik sebuah roket diberikan sebagai fungsi masa

    seperti dalam Jadual 1. Cari halaju pada t=16 saat menggunakan

    kaedah interpolasi lagrangelinear.

    t v(t)

    s m/s

    3

    0 0

    10 227.04

    15 362.78

    20 517.35

    22.5 602.97

    30 901.67

    Jadual 1

    Velocity vs. time data for the rocket example

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    4/19

    550517.35

    1

    0( ) ( ) ( )i iiv t L t v t ==)()()()( 1100 tvtLtvtL +=

    ( ) 78.362,15 00 == tt

    ( ) 35.517,20 11 == tt

    10 12 14 16 18 20 22 24350

    400

    450

    362.78

    y s

    f range( )

    f x desired( )

    x s1

    10+x s010 x s range, x desired,

    4

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    5/19

    =

    =

    1

    00 0

    0 )(

    jj j

    j

    tt

    tttL

    10

    1

    tt

    tt

    =

    =

    =

    1

    10 1

    1 )(

    jj j

    j

    tt

    tttL

    01

    0

    tt

    tt

    =

    )()()( 101

    0

    0

    10

    1 tvtt

    tttv

    tt

    tttv

    +

    =

    )()()()(1100

    tvtLtvtL +=( )v t

    )()()( 101

    0

    0

    10

    1 tvtt

    tttv

    tt

    tttv

    +

    =

    )35.517(1520

    15)78.362(

    2015

    20

    +

    =

    tt

    )35.517(1520

    1516)78.362(2015

    2016)16(

    +

    =v

    )35.517(2.0)78.362(8.0 +=

    393.7 m/s=

    5

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    6/19

    CONTOH 1(B)

    Halaju menaik sebuah roket diberikan sebagai fungsi masa

    seperti dalam Jadual 1. Cari halaju pada t=16 saat menggunakan

    kaedah interpolasi lagrangekuadratik.

    t v(t)

    s m/s

    0 0

    10 227.04

    15 362.78

    20 517.3522.5 602.97

    30 901.67

    Jadual 1

    Velocity vs. time data for the rocket example

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    7/19

    Bagi interpolasi polinomial peringkat kedua (interpolasi

    lagrange kuadratik), halaju adalah

    ==

    2

    0

    )()()(i

    ii tvtLtv

    )()()()()()( 221100 tvtLtvtLtvtL ++=

    7

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    8/19

    ( ) 04.227,10 == oo tvt

    ( ) 78.362,15 11 == tvt

    ( ) 35.517,20 22 == tvt

    2 tt tttt

    8

    =

    =

    00 0

    0

    jj jttt

    =2010 tttt

    =

    21

    2

    01

    0

    tt

    tt

    tt

    tt

    =

    =

    2

    20

    2

    2 )(

    jj

    j

    j

    tt

    tttL

    =

    12

    1

    02

    0

    tt

    tt

    tt

    tt

    =

    =

    2

    10 1

    1 )(

    jj j

    j

    tt

    tttL

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    9/19

    )()()()(2

    12

    1

    02

    0

    121

    2

    01

    0

    020

    2

    10

    1tv

    tt

    tt

    tt

    tttv

    tt

    tt

    tt

    tttv

    tt

    tt

    tt

    tttv

    +

    +

    =

    )35.517()1520)(1020(

    )1516)(1016()78.362(

    )2015)(1015(

    )2016)(1016()04.227(

    )2010)(1510(

    )2016)(1516()16(

    +

    +

    =v

    )35.517)(12.0()78.362)(96.0()04.227)(08.0( ++=

    19.392= m/s.

    9

    Ralat anggaran mutlak relatif di antara keputusan polinomial

    peringkat pertama dan kedua adalah

    10019.392

    70.39319.392

    =a

    %38502.0=

    a

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    10/19

    CONTOH 1(C)

    Halaju menaik sebuah roket diberikan sebagai fungsi masa

    seperti dalam Jadual 1. Cari halaju pada t=16 saat menggunakan

    kaedah interpolasi lagrangekubik.

    t v(t)

    s m/s

    1!

    0 0

    10 227.04

    15 362.78

    20 517.3522.5 602.97

    30 901.67

    Jadual 1

    Velocity vs. time data for the rocket example

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    11/19

    Bagi interpolasi lagrange kubik (polinomial peringkat ketiga), halaju

    adalah

    =

    =

    3

    0

    )()()(

    i

    ii

    tvtLtv

    11

    )()()()()()()()( 33221100 tvtLtvtLtvtLtvtL +++=

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    12/19

    =

    =3

    00 0

    0 )(

    jj j

    j

    tt

    tttL

    =30

    3

    20

    2

    10

    1

    tt

    tt

    tt

    tt

    tt

    tt ;

    =

    =3

    10 1

    1 )(

    jj j

    j

    tttttL

    =

    31

    3

    21

    2

    01

    0

    tttt

    tttt

    tttt

    ( )

    ( )

    ( )

    0 0

    1 1

    2 2

    10, 227.04

    15, 362.78

    20, 517.35

    t v t

    t v t

    t v t

    = =

    = =

    = =

    12

    =

    =3

    20 2

    2 )(

    jj j

    j

    tttttL

    =32

    3

    12

    1

    02

    0

    tttt

    tttt

    tttt ;

    =

    =

    3

    30 3

    3 )(

    jj j

    j

    tt

    tttL

    =

    23

    2

    13

    1

    03

    0

    tttt

    tttt

    tt

    tt

    3 322.5, 602.97t v t= =

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    13/19

    )()(

    )()()(

    3

    23

    2

    13

    1

    03

    0

    2

    32

    3

    12

    1

    02

    0

    1

    31

    3

    21

    2

    01

    00

    30

    3

    20

    2

    10

    1

    tv

    tt

    tt

    tt

    tt

    tt

    tttv

    tt

    tt

    tt

    tt

    tt

    tt

    tvtttt

    tttt

    tttttv

    tttt

    tttt

    tttttv

    +

    +

    +

    =

    )78.362()5.2215)(2015)(1015(

    )5.2216)(2016)(1016()04.227(

    )5.2210)(2010)(1510(

    )5.2216)(2016)(1516()16(

    +

    =v

    13

    )97.602()205.22)(155.22)(105.22(

    )2016)(1516)(1016()35.517()5.2220)(1520)(1020()5.2216)(1516)(1016(

    +

    +

    )97.602)(1024.0()35.517)(312.0()78.362)(832.0()04.227)(0416.0( +++=

    06.392= m/s

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    14/19

    Ralat anggaran mutlak relatif, di antara keputusan polinomial

    peringkat kedua dan ketiga adalaha

    14

    10006.392

    19.39206.392 =a

    %033427.0=

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    15/19

    JJADALADALPPER!ANDINGANER!ANDINGAN

    Peringkat

    Polinomial

    1 2 3

    v(t=16)

    m/s

    393.69 392.19 392.06

    15

    Ra atMutlak Relatif ---------- . . 7

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    16/19

    JJARAKARAK DARIPADADARIPADA PPROFIROFIHHAAJ!AAJ!

    "apatkan jarak yang dilalui oleh roket tersebut pada masa

    t=11" $in%%a t=16" #

    t v(t)

    s m/s

    16

    10 227.04

    15 362.78

    20 517.35

    22.5 602.97

    30 901.67

    Jadual 1

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    17/19

    3 2

    3 2

    3 2

    3 2

    ( ) ( 57.5 1087.5 6750)( 0.36326)

    ( 52.5 875 4500)(1.9348)

    ( 47.5 712.5 3375)( 4.1388)( 45 650 3000)(2.5727)

    v t t t t

    t t t

    t t tt t t

    = + +

    +

    + + + +

    17

    ,00544.013195.0265.21245.4)(32

    ttttv +++= 5.2210 t

    =16

    11

    )()11()16( dttvss

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    18/19

    +++16

    11

    32

    )00544.013195.0265.21245.4( dtttt

    432 ttt

    18

    114.3.2.. t +++=

    1605= m

  • 7/24/2019 Kuliah 4 Interpolasi-Lagrange Method

    19/19

    32dd==

    ,00544.013195.0265.21245.4)(32

    ttttv +++= 5.2210 t

    P&C!TAN DARIPADAPROFIHAAJ!

    "apatkan pecutan roket pada t$1s.

    19

    ,

    ....

    dtdt

    201632.026390.0265.21 tt++=

    2

    )16(01632.0)16(26390.0265.21)16( ++=a

    665.29= 2/sm