Está en la página 1de 19

Interpolación Polinómica

Interpolación Polinómica

Interpolación lineal
Interpolación cuadrática
Polinomio de interpolación
Forma de Lagrange
Forma de Newton
 Tabla de diferencias divididas
 Error del polinomio de interpolación
Forma de Neville
Interpolación lineal

Recta por los puntos 25


(x0,y0) y (x1,y1)
20
P1( x)  a0  a1x
15

Grados
a0  a1x0  y 0 

a0  a1x1  y1  10

5
5 10 15 20
Hora
Ejemplo. . Por un recibo de gas en el que se han consumido
10 m3 se han pagado 50 € y por 16 m3 se han pagado71 €.
¿Cuánto habrá que pagar por un consumo de 15 €?.

Puntos (10, 50) y (16, 71), la fórmula de interpolación lineal queda:

y1  y0
y  y0  ( x  x0 )
x1  x0
=


71  50 21
y  50  (15  10)  50  5  67,50
16  10 6
Interpolación cuadrática

Expresión del Polinomio de grado2


polinomio 25

P2( x)  a0  a1x  a2x2 20

Condiciones de

Grados
interpolación 15

a0  a1x0  a2 x02  y 0  10


a0  a1x1  a2 x12  y1 
2  5
a0  a1x 2  a2 x 2  y 2  5 10 15 20
 Hora
Hallar la función cuadrática de interpolación
correspondiente a los valores
X 1 3 4 5
Y 4 9 ? 18

P2( x)  a0  a1x  a2x2

( x  x1 )( x  x 2 ) ( x  x 0 )( x  x 2 ) ( x  x 0 )( x  x1 )
y  y0  y1  y2
( x 0  x1 )( x  x 2 ) ( x1  x 0 )( x 0  x 2 ) ( x 2  x 0 )( x 2  x1 )

( x  3)( x  5) ( x  1)( x  5) ( x  1)( x  3)


y4 9  18
(1  3)(1  5) (3  1)(3  5) (5  1)(5  3)

( x 2  8 x  15) ( x 2  6 x  5) ( x 2  4 x  3)
y4 9  18
8 4 8
4 x 2  32 x  60  18 x 2  108 x  90  x182  72 x  54
y
8
4 x 2  4 x  24
y
8

y  0.5x 2  0.5x  3

Determina su valor cuando x=4


y  0.5  4   0.5  4   3
2

y  0.5*16  0.5* 4  3
y  8 23
y  13
Forma normal del polinomio
de interpolación

Expresión
Pn( x)  a0  a1x  a2x2    anxn

Determinación
a0  a1x0  a2 x0 0  y0 
2
   an xn

n  y 
a0  a1x1  a2 x1 2
   an x1 1

n  y 
2
a0  a1x 2  a2 x 2    an x 2 2

      

a0  a1xn  a2 xn 2
   an xnn  yn 

Polinomios de Lagrange
n

(x  a )
i j
i
( x  a1 )L ( x  a j 1 )( x  a j 1 )L ( x  an )
l j ( x)   ; j  1,..., n
n
(a j  a1 )L (a j  a j 1 )(a j  a j 1 )L (a j  an )
 (a j  ai )
i j

Polinomio de interpolación
n
Ln ( x)   f (a j ) l j ( x)
j 1

Pn (x)  y 0 L0 (x)  y1 L1(x)  y 2 L2 (x)  ··· yn Ln (x)


Ejemplo:
X 1 -3 5 7
Y -2 1 2 -3

( x  x1 )( x  x2 )  x  x3  ( x  x0 )( x  x2 )  x  x3  ( x  x0 )( x  x1 )  x 
y  y0  y1  y2
( x0  x1 )( x0  x2 )( x1  x3 ) ( x1  x0 )( x1  x2 )( x1  x3 ) ( x2  x0 )( x2  x1 )( x1 

( x  3)( x  5)  x  7  ( x  3)( x  5)  x  7 
L0  x   
(1  3)(1  5)(1  7) 96
( x  1)( x  5)  x  7  ( x  1)( x  5)  x  7 
L1  x   
(3  1)(3  5)(3  7) 320
( x  1)( x  3)  x  7  ( x  1)( x  3)  x  7 
L2  x   
(5  1)(5  3)(5  7) 64
( x  1)( x  3)  x  5 ( x  1)( x  3)  x  5 
L3  x   
(7  1)(7  3)(7  5) 120

( x  3)( x  5)  x  7  ( x  1)( x  5)  x  7  ( x  1)( x  3)  x  7  ( x  1)( x  3)  x  5 


p  x   2  2 3
96 320 64 120

(4  3)(4  5)  4  7  (4  1)(4  5)  4  7  (4 1)(4  3)  4  7  (4 1)(4  3)  4  5 


p  x   2  2 3
96 320 64 120

42 9 126 63
p  x     
96 320 64 120
649
p  x   2.028125
320
Forma de Newton del
polinomio de interpolación
Expresión
Pn(x) = c0 + c1(xx0) + c2(xx0)(xx1) +   
+ cn(xx0)(xx1)    (xxn1)

Determinación algebraica
Pn(x0) = y0 = c0
Pn(x1) = y1 = c0+ c1(x1x0)
Pn(x2) = y2 = c0+ c1(x2x0) + c2(x2x0)(x2x1)
Diferencias divididas

 c 0 = f [ x0 ]  y0

f [ x1]  f [ x0 ]
 c1 = f [ x 0 , x1] 
x1  x0

f [ x1, x 2 ]  f [ x0, x1]


 c 2  f [ x0, x1, x 2 ] 
x 2  x0

f[x 1, x2, xk ]  f[x 0, x1, xk 1]


 ck  f[x 0, x1, xk ] 
xk  x 0
Tabla de diferencias divididas
y0  f [ x0 ]
y1  f [ x1] f [ x0, x1]
y2  f [ x2 ] f [ x1, x 2 ] f [ x0 , x1, x 2 ]
y3  f [ x3 ] f [ x 2, x3 ] f [ x1, x 2, x3 ] f [ x0 , x1, x 2, x3 ]

Ejemplo de las temperaturas


12 18
14 21 1.5000
10 12 2.2500 -0.3750
16 19 1.1667 -0.5417 -0.0417
i = corriente, v = voltaje aproxime el valor de v para
i = 3.5 en polinomio de Newton con Diferencias
Divididas
X=i 1 2 3 4

Y=v 120 94 75 62

p3  x   f  x   f  x  ( x  x0 )  2
f  x  ( x  x0 )  x  x1
3
f  x  ( x  x0 )( x  x1 )  x  x2 
f  x :
f  x1   f  x0  94  120
f  x1 ; x0     26
( x1  x0 ) 2 1
f  x2   f  x1  75  94
f  x2 ; x1     19
( x2  x1 ) 32
f  x3   f  x2  62  75
f  x3 ; x2     13
( x3  x2 ) 43
2
f  x :
f  x2 ; x1   f  x1 ; x0  19  26
f  x2 ; x0     3.5
( x2  x0 ) 3 1
f  x3 ; x2   f  x1 ; x0  13  19
f  x3 ; x1    3
( x2  x1 ) 42

3
f  x :
f  x3 ; x2 ; x1   f  x2 ; x1; x0  3  3.5
f  x3 ; x0     0.167
( x3  x0 ) 4 1
X F(x) ∆F(x)
1 120
-26
2 94 3.5
-19 -0.167
3 75 3
-13
4 62

p3  x   120  26( x 1)  3.5( x 1)  x  2  0.167( x 1)( x  2)  x  3

Para i = x = 3.5

p3  3.5   120  26(3.5  1)  3.5(3.5  1)  3.5  2   0.167(3.5  1)(3.5  2)  3.5  3


p3  3.5   67.8125
Error de interpolación
Expresión del error
f (n1) ()
f(x)  Pn (x)  (x  x0 )(x  x1)(x  xn )
(n  1)!

Estimación de la derivada
f (n1) ()
f x0, x1, , xn, xn+1 
(n  1)!
FIN

También podría gustarte