metodos numericos_ splines-ejemplo

2
NOTAS EJEMPLO CORREGIDO SPLINES Ejemplo 4.12: Se trata de estimar (2.3) f utilizando splines cúbicas construidas con los datos de la tabla siguiente, i 0 1 2 3 4 x i 1.2 1.6 2.1 2.5 2.7 f(x i ) 0.079181 0.204120 0.322219 0.397994 0.431364 (1) Caso con las Condiciones sobre la Segunda Derivada: En ese caso: h 0 =0.4, h 1 =0.5, h 2 =0.4 y h 3 =0.2, por otra parte, se tiene las condiciones M 0 = M 4 = 0, - - - - - - - - - = + + + 2 2 3 3 3 4 1 1 2 2 2 3 0 0 1 1 1 2 3 2 1 3 2 2 2 2 1 1 1 1 0 3 6 0 6 3 6 0 6 3 h y y h y y h y y h y y h y y h y y M M M h h h h h h h h h h 1 1 2 2 3 3 0.3 0.083333 0 0.076148 0.233809 0.083333 0.3 0.066667 0.046897 0.072066 0 0.066667 0.2 0.022183 0.086893 M M M M M M - - = - = - - - Como x=2.3 se encuentra en el intervalo [2.1, 2.5], donde es válida la spline S 2 (x), se tiene: [ ] [ ] [ ] 3 3 2 2 3 2 2 3 3 2 2 3 3 2 2 3 2 2 3 3 2 1 1 () ( ) ( ) ( ) ( ) ( ) ( ) 6 6 1 1 (2.3) (2.5 2.3) ( 0.072066) (2.3 2.1) ( 0.086893) (2.5 2.3)(0.322219) (2.3 2.1)(0.397994) 6*0.4 0.4 0.4 ( 6 h S x x x M x x M x xy x x y x xM x x M h h S = - + - + - + - - - + - = - - + - - + - + - - [ ] 2 2.5 2.3)( 0.072066) (2.3 2.1)( 0.086893) (2.3) (2.3) 0.361669 f S - - + - - = el valor exacto de la función es 361728 . 0 ) 3 . 2 ( = f , entonces el error relativo del resultado es de 0.016%.

Upload: sergio-imana-guzman

Post on 20-Nov-2015

5 views

Category:

Documents


0 download

DESCRIPTION

splines-metodos numericos

TRANSCRIPT

  • NOTAS EJEMPLO CORREGIDO SPLINES

    Ejemplo 4.12: Se trata de estimar (2.3)f utilizando splines cbicas construidas con los datos de la tabla siguiente,

    i 0 1 2 3 4

    xi 1.2 1.6 2.1 2.5 2.7

    f(xi) 0.079181 0.204120 0.322219 0.397994 0.431364

    (1) Caso con las Condiciones sobre la Segunda Derivada:

    En ese caso: h0=0.4, h1=0.5, h2=0.4 y h3=0.2, por otra parte, se tiene las condiciones M0 = M4 = 0,

    =

    +

    +

    +

    2

    23

    3

    34

    1

    12

    2

    23

    0

    01

    1

    12

    3

    2

    1

    322

    2211

    110

    360

    636

    063

    h

    yy

    h

    yy

    h

    yy

    h

    yy

    h

    yy

    h

    yy

    M

    M

    M

    hhh

    hhhh

    hhh

    1 1

    2 2

    3 3

    0.3 0.083333 0 0.076148 0.233809

    0.083333 0.3 0.066667 0.046897 0.072066

    0 0.066667 0.2 0.022183 0.086893

    M M

    M M

    M M

    = =

    Como x=2.3 se encuentra en el intervalo [2.1, 2.5], donde es vlida la spline S2(x), se tiene:

    [ ] [ ]

    [ ]

    3 3 2

    2 3 2 2 3 3 2 2 3 3 2 2 3

    2 2

    3 3

    2

    1 1( ) ( ) ( ) ( ) ( ) ( ) ( )

    6 6

    1 1(2.3) (2.5 2.3) ( 0.072066) (2.3 2.1) ( 0.086893) (2.5 2.3)(0.322219) (2.3 2.1)(0.397994)

    6*0.4 0.4

    0.4 (

    6

    hS x x x M x x M x x y x x y x x M x x M

    h h

    S

    = + + + +

    = + + +

    [ ]

    2

    2.5 2.3)( 0.072066) (2.3 2.1)( 0.086893)

    (2.3) (2.3) 0.361669f S

    +

    =

    el valor exacto de la funcin es 361728.0)3.2( =f , entonces el error relativo del resultado es de 0.016%.

  • (2) Caso con las Condiciones sobre la Primera Derivada:

    Se supone que se tiene los datos sobre las derivadas 361912.0)2.1( 0 == yf y 160850.0)7.2( 4 == yf ,

    =

    +

    +

    +

    3

    344

    2

    23

    3

    34

    1

    12

    2

    23

    0

    01

    1

    12

    00

    01

    4

    3

    2

    1

    0

    33

    3322

    2211

    1100

    00

    36000

    63600

    0636

    0

    00636

    00063

    h

    yyy

    h

    yy

    h

    yy

    h

    yy

    h

    yy

    h

    yy

    h

    yy

    yh

    yy

    M

    M

    M

    M

    M

    hh

    hhhh

    hhhh

    hhhh

    hh

    0

    1

    2

    3

    4

    0.133333 0.066667 0 0 0 0.049565

    0.066667 0.3 0.083333 0 0 0.076148

    0 0.083333 0.3 0.066667 0 0.046897

    0 0 0.066667 0.2 0.033333 0.022183

    0 0 0 0.033333 0.066667 0.006268

    M

    M

    M

    M

    M

    =

    0

    1

    2

    3

    4

    0.290394

    0.162689

    0.095782

    0.069071

    0.059499

    M

    M

    M

    M

    M

    =

    Como la spline vlida para x=2.3 es S2(x), se tiene:

    [ ] [ ]

    [ ]

    3 3 2

    2 3 2 2 3 3 2 2 3 3 2 2 3

    2 2

    3 3

    2

    1 1( ) ( ) ( ) ( ) ( ) ( ) ( )

    6 6

    1 1(2.3) (2.5 2.3) ( 0.095782) (2.3 2.1) ( 0.069071) (2.5 2.3)(0.322219) (2.3 2.1)(0.397994)

    6*0.4 0.4

    0.4 (2

    6

    hS x x x M x x M x x y x x y x x M x x M

    h h

    S

    = + + + +

    = + + +

    [ ].5 2.3)( 0.095782) (2.3 2.1)( 0.069071)

    +

    2(2.3) (2.3) 0.361728f S = , que es una buena aproximacin del resultado exacto (0.0000966 % de error relativo).