Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad


Lagrange Interpolation, Diapositivas de Métodos Matemáticos para Análisis Numérico y Optimización

Numerical Methods

Tipo: Diapositivas

2015/2016

Subido el 11/10/2016

marcopaaz
marcopaaz 🇲🇽

1 documento

1 / 14

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
ì!
Ing.!Raquel!Landa!([email protected])!
Numerical*Methods*
Curve!fi:ng!–!Lagrange!Interpola>on!
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Vista previa parcial del texto

¡Descarga Lagrange Interpolation y más Diapositivas en PDF de Métodos Matemáticos para Análisis Numérico y Optimización solo en Docsity!

ì

Ing. Raquel Landa ([email protected])

Numerical Methods

Curve fi:ng – Lagrange Interpola>on

Lagrangian Interpolation

Lagrangian interpolating polynomial is given by

=

n

i

n i i

f x L x f x

0

where ‘ n ’ in f ( x )

n

stands for the

th

n order polynomial that approximates the function y = f ( x )

given at ( n + 1 ) data points as

( ) ( ) ( ) ( )

n n n n

x , y , x , y ,......, x , y , x , y

0 0 1 1 − 1 − 1

, and

=

n

j i

j i j

j

i

x x

x x

L x

0

L ( x )

i

is a weighting function that includes a product of ( n − 1 ) terms with terms of j = i

omitted.

Linear Interpolation

10 12 14 16 18 20 22 24

350

400

450

500

550

y

s

f ( range)

f x

desired

x

s

1

x + 10

s

0

− 10 x

s

, rangex

desired

,

1

0

i i

i

v t L t v t

=

= L t v t + L t v t

t = ν t =

t = ν t =

Linear Interpolation (contd)

=

=

1

0

0 0

0

( )

j

j j

j

t t

t t

L t

0 1

1

t t

t t

=

=

=

1

1

0 1

1

( )

j

j j

j

t t

t t

L t

1 0

0

t t

t t

=

( ) ( ) ( )

1

1 0

0

0

0 1

1

v t

t t

t t

v t

t t

t t

v t

= ( 517. 35 )

20 15

15

( 362. 78 )

15 20

20

=

t t

( 517. 35 )

20 15

16 15

( 362. 78 )

15 20

16 20

( 16 )

v =

= 0. 8 ( 362. 78 )+ 0. 2 ( 517. 35 )

m/s.

Example

The upward velocity of a rocket is given as a function of

time in Table 1. Find the velocity at t=16 seconds using

the Lagrangian method for quadratic interpolation.

Table Velocity as a

func>on of >me

Figure. Velocity vs. >me data

for the rocket example

(s) (m/s)

0 0

10 227.

15 362.

20 517.

22.5 602.

30 901.

t v ( t )

10 ,

0

t = ( ) 227. 04

0

v t =

15 ,

1

t = ( ) 362. 78

1

v t =

20 ,

2

t = ( ) 517. 35

2

v t =

=

( )

j

j

j

j

t t

t t

L t

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

=

t t

t t

t t

t t

=

( )

j

j j

j

t t

t t

L t

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

=

t t

t t

t t

t t

=

( )

j

j

j

j

t t

t t

L t

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

=

t t

t t

t t

t t

Quadratic Interpolation

Cubic Interpolation Example

The upward velocity of a rocket is given as a function of

time in Table 1. Find the velocity at t=16 seconds using

the Lagrangian method for cubic interpolation.

Table Velocity as a

func>on of >me

Figure. Velocity vs. >me data

for the rocket example

(s) (m/s)

0 0

10 227.

15 362.

20 517.

22.5 602.

30 901.

t

v ( t )

Cubic Interpolation (contd)

o o

t vt 15 , ( ) 362. 78

1 1

t = vt =

2 2

t = vt = 22. 5 , ( ) 602. 97

3 3

t = vt =

=

3

0

0 0

0

j

j j

j

t t

t t

L t

0 3

3

0 2

2

0 1

1

t t

t t

t t

t t

t t

t t

=

3

1

0 1

1

j

j j

j

t t

t t

L t

1 3

3

1 2

2

1 0

0

t t

t t

t t

t t

t t

t t

=

3

2

0 2

2

j

j j

j

t t

t t

L t

2 3

3

2 1

1

2 0

0

t t

t t

t t

t t

t t

t t

=

3

3

0 3

3

j

j j

j

t t

t t

L t

3 2

2

3 1

1

3 0

0

t t

t t

t t

t t

t t

t t

Comparison Table

Order of Polynomial 1 2 3

v(t=16) m/s 393.69 392.19 392.

Absolute Rela>ve

Approximate Error

Exercise

Get the interpola>on polynomial using Lagrange’s

Method for these data points:

x 1 -­‐4 -­‐

y 10 10 34