Está en la página 1de 4

Interpolación de Lagrange

Consiste en conseguir un polinomio tomando como partida una tabla de valores o puntos dados.

x Y n
Pn ( x )=∑ Y k ∗Lk ( x)
X0 Y0 k=0

X1 Y1

X2 Y2

X3 Y3

X4 Y4

Pn ( x )= y 0∗L0 ( x )+ y 1∗L1 ( x ) + y 2∗L2 ( x )+ y 3∗L3 ( x ) … .+ y n∗Ln ( x )

k =0 ( x−x1 )(x−x 2)(x −x3 )( x−x 4 )


; L0 ( x ) =
j=0 ,1,2,3,4 , (x 0 −x1 )( x 0−x 2)(x 0 −x3 )(x 0−x 4 )

k =1 ( x−x 0)( x−x 2 )(x−x 3)(x−x 4 )


; L1 ( x ) =
j=0 ,1 , 2,3,4 (x 1−x 0)( x 1−x 2 )(x1 −x3 )( x 1−x 4 )

k =2 (x −x 0)( x−x 1)( x−x3 )(x−x 4 )


; L2 ( x ) =
j=0,1, 2 ,3,4 (x 2−x 0)(x 2−x 1)( x2 −x3 )( x 2−x 4 )

k =3 ( x−x 0 )(x−x 1)(x −x2 )( x−x 4 )


; L3 ( x ) =
j=0,1,2, 3 , 4 ( x3 −x0 )( x 3−x 1)(x 3−x 2 )(x 3−x 4 )
k =4 ( x−x 0 )( x−x 1)( x− x2 )( x−x 3)
; L4 ( x ) =
j=0,1,2,3, 4 (x 4−x 0 )( x 4−x 1)( x 4 −x 2)(x 4 −x 3)

Ejemplo

x Y

2 4

3 6

4 8

Pn ( x )= y 0∗L0 ( x )+ y 1∗L1 ( x ) + y 2∗L2 ( x )

k =0 ( x−x 1 )(x−x 2) (x−3)(x−4) x 2−4 x−3 x +12 x 2−7 x +12


; L0 ( x ) = = = =
j=0 ,1,2 (x 0−x 1 )(x0 −x 2) (2−3)(2−4) −1∗−2 2

k =1 ( x−x 0 )( x−x 2) ( x−2)(x−4) x 2−4 x−2 x+ 8 x 2−6 x +8


; L1 ( x ) = = = =
j=0 ,1 , 2 (x 1−x 0 )( x 1−x 2) (3−2)(3−4) 1∗−1 −1

k =2 ( x −x 0)( x−x 1 ) ( x−2)( x−3) x 2−3 x−2 x +6 x2 −5 x +6


; L2 ( x ) = = = =
j=0,1, 2 , (x2 −x 0)( x 2−x 1) ( 4−2)(4−3) 2∗1 2
Pn ( x )= y 0∗L0 ( x )+ y 1∗L1 ( x ) + y 2∗L2 ( x )

x2 −7 x +12 x 2−6 x +8 x 2−5 x+6


Pn ( x )=4 ( )+6 ( )+8( )
2 −1 2

Pn ( x )=2 ( x −7 x +12 ) −6 ( x −6 x+ 8 ) + 4( x −5 x +6)


2 2 2

2 2 2
Pn ( x )=2 x −14 x+24−6 x +36 x−48+ 4 x −20 x +24

Pn ( x )=2 x
Ejercicio
1. En la elaboración de un producto se tomaron datos del tiempo de elaboración de una pieza (y) y la cantidad de días para su elaboración (x), con lo cual se pretendía optimizar el trabajo de los
empleados, los datos recogidos fueron los siguientes:

X 10 20 30 40
y 35 28 23 20

2. determinar el polinomio de Lagrange y calcular f(60).

x Y

-1 0

3 3

4 12

5 30

También podría gustarte