mathcad_interpolacao_vandermond

2
Exercício da Página 2 do Capítulo 3: implementar no MATHCAD a interpolação da função: senh( ) ( ) sen h( )  x  y f x  x Φ = = Φ  TOL 10  9 :=  Φ  5 :=  c sinh  Φ ( ) :=  f x ( ) y  Φ c  x 0 = if y  sinh  Φ x ( ) x c  otherwise y := Coef  x ( ) n .8 x x .1 i  x +  pot 1  b i  f x ( ) A i j ,  pot  pot pot x  j 0 n .. for i 0 n .. for c lsolve A b , ( ) c :=  p int  x c , ( ) n last c ( ) y c n y y x  c i + i n 1  0 .. for y := x .04 :=  c Coef   x ( ) :=  f int  x ( ) p int  x c , ( ) := k 0 100 .. :=  x k k 100 := 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 f x k ( ) f int  x k ( ) x k Comparação entre a função e sua forma interpolada x 0.04 = 0 0.2 0.4 0.6 0.8 1 0 2 10  11 × 4 10  11 × 6 10  11 × 8 10  11 × f x k ( )  f int  x k ( ) x k Erro da Interpolação Polinomial

Upload: paulo-debiagi

Post on 16-Oct-2015

1 views

Category:

Documents


0 download

TRANSCRIPT

  • Exerccio da Pgina 2 do Captulo 3: implementar no MATHCAD a interpolao da funo:

    senh( )( )senh( )

    xy f xx

    = =

    TOL 10 9:= 5:= c sinh ( ):= f x( ) y c

    x 0=if

    ysinh x( )

    x c otherwise

    y

    :=

    Coef x( ) n.8x

    x .1 i x+pot 1bi f x( )

    Ai j, potpot pot x

    j 0 n..for

    i 0 n..for

    c lsolve A b, ( )c

    :=

    pint x c, ( ) n last c( )y cn

    y y x ci+i n 1 0..for

    y

    :=

    x .04:= c Coef x( ):= fint x( ) pint x c, ( ):=k 0 100..:= xk

    k100

    :=

    0 0.2 0.4 0.6 0.8 10

    0.2

    0.4

    0.6

    0.8

    f xk( )fint xk( )

    xk

    Comparao entre a funo e sua forma interpolada

    x 0.04=

    0 0.2 0.4 0.6 0.8 10

    2 10 114 10 116 10 118 10 11

    f xk( ) fint xk( )

    xk

    Erro da Interpolao Polinomial