Académique Documents
Professionnel Documents
Culture Documents
ANALISIS NUMERICO II
UNIDAD 2. INTERPOLACION
1) Considera
g ( x ) =x3
x 0=1, x 1=0
l 0=
xx 1
x0
x
=
= =x l 0=x
x0 x 1 10 1
l 1=
xx 0 x(1 ) x +1 x +1
=
=
=
=x +1l 1=x +1
x 1x 0 0(1 ) 0+ 1
1
P1 ( x ) es :
y 1=g ( x 1 )=g ( 0 )= ( 0 ) =0
y 2=g ( x 2 )=g ( 1 )=( 1 )3=1
Los polinomios de Lagrange son para los nodos dados son:
x
x
( x0 ) ( x1 )
( x ) ( x1 ) 1 2
( 0x1 )( 0x 2)=
=
= ( x x )
(10 ) (11 ) (1 ) (2 ) 2
(xx 1)(xx 2)
l 0=
( xx 0)( xx 2 ) ( x(1 ) ) ( x1 ) ( x +1 ) ( x 1 ) x 21
l 1=
=
=
=
=1x 2
1
(x 1x 0)( x 1x 2 ) ( 0(1 ) ) ( 01 ) ( 0+1 ) (1 )
l 2=
( xx 0)( x x1 ) ( x (1 ) ) ( x0 ) ( x+1 ) ( x ) ( x +1 ) ( x ) 1 2
=
=
=
= ( x + x)
2
(x 2x 0)( x 2x 1 ) ( 1 (1 ) ) ( 10 ) (1+1 ) ( 1 )
(2 )( 1 )
P2 ( x )=
1 2
( x x ) + 1 ( x 2+ x ) = 1 ( ( x2 x ) + ( x 2+ x ) ) = 1 ( ( xx 2 ) + ( x 2 + x ) ) = 1 (xx 2 + x 2+ x )=
2
2
2
2
2
1
2x
P2 ( x )= ( 2 x )= =x P2 ( x ) =x para los nodos x0 =1, x 1=0, x 2=1
2
2
2) Considera la funcin
f (x)=x +2/ x
x 0=1 , x 1=2 ,
2
f ( 1 )=1+ =3
1
2
f ( 2 )=2+ =2+1=3
2
f ( 2.5 ) =2.5+
2
=2.5+0.8=3.3
2.5
x
x
9
x 2 x +5
( x2 ) ( x2.5 ) x 2.5 x2 x +5 x 4.5 x+5
2
( 0x1 )( 0x 2)=
=
=
=
=
1.5
3
( 12 ) ( 12.5 )
(1 ) (1.5 )
2
( xx 1 )( xx 2)
l 0=
l 0=
2 2 9
2
18
10
2
10
x x+ 5 = x 2 x+ ,l 0= x 23 x +
3
2
3
6
3
3
3
l 1=
l 2=
2
2
(xx 0)(x x1 )
( x 1 )( x2 )
x 2 xx +2 x 3 x +2 4 ( 2
=
=
=
= x 3 x+ 2 )=
( x 2x 0)(x 2x 1 ) ( 2.51 )( 2.52 )
3
( 1.5) ( 0.5 )
3 1
( )
2 2
4 2
8
l 2= x 4 x +
3
3
Graficando los polinomios de Lagrange
()
P2 ( x )=f ( x 0 ) l 0 + f ( x1 ) l 1+ f ( x 2 ) l2 =( 3 )
x2
44 2 132
88
44
132
88
x
x + =x 2 2+ 6 + x 219
+10+ 15=
10
10
10
10
10
10
) (
21090132 100+88150
6460
210222 188150
+x(
+
=x (
+ x(
( 20+ 4460
)
)
)
)+ 10 =
10
10
10
10
10
P2 ( x ) =
4 2 12
38
x x + =0.4 x 21.2 x +3.8
10
10
10
El polinomio de interpolacin de Lagrange de orden2 paralos nodos x 0=1, x 1=2, x2 =2.5 para f ( x )=x +
2
2
x
f ( 0.5 ) =0.5+
2
1.2
=0.5+ 4=4.5 error absoluto|3.34.5|=|1.2|=1.2, error relativo=
=26.67
0.5
4.5
2
f ( 1.2 )=1.2+
2
=1.2+1.667=2.867, error absoluto=|2.9362.867|=0.069
1.2
, error relativo=
0.069
=2.406
2.867
Al evaluar el polinomio en x=0.5 el error absoluto es alto 1.2, el relativo es alto 26.67% ;en comparacin con
el error absoluto 0.069 y relativo 2.406% al evaluar el polinomio en x=1.2 . La diferencia se da porque en el
primer caso estoy evaluando un punto fuera del segmento comprendido por los nodos [1, 2.5], x=1.2 es un
punto que pertenece al segmento determinado por los nodos y por ello el error tanto absoluto como relativo es
mnimo.
Graficamos los puntos, nodos, polinomio de interpolacin y funcin as como los errores absolutos.