Capítulo 2. INTERPOLACION
Capítulo 2. INTERPOLACION
Capítulo 2. INTERPOLACION
INTERPOLACIN POLINOMIAL
38
2.1
39
INTRODUCCIN.
La aproximacin de funciones es un tema de uso frecuente en el
Anlisis Numrico, y consiste en aproximar una funcin f por otra que sea
ms fcil de manipular. Entre las razones que justifican la aproximacin
estn:
i)
a e
ii)
f (x ) = e x
es integrable en
[a, b] ,
pero
a i g i (x )
(2.1)
i =0
{gi (x )}in=0
i)
{x }
k n
k =0 :
polinomial )
entonces
g ( x ) = a0 x 0 + a1 x1 + ... + an x n
(Aproximacin
ii)
40
entonces
n
iii)
{e }
kx n
k =0 :
entonces
g ( x ) = a 0 .1 + a1e x + a 2 e 2 x + ... + a n e nx
a)
b)
2.2 INTERPOLACIN.
Sea f definida en un intervalo cerrado tal que:
xi
x0
x1
...
xn 1
xn
f i = f ( xi )
f ( x0 )
f ( x1 )
...
f ( xn1 )
f ( xn )
g ( xi ) = f ( xi ) , i = 0,1,..., n :
f (xi ) = g (x i )
41
cual
satisface las
significa: se debe encontrar una funcin g que pase por los puntos
( xi , f i ) , i = 0,1,..., n .
Una vez hallada la funcin interpolante sta se usa para:
i)
( )
f (x ) = a , para x* .
42
2.3
APROXIMACIN POLINOMIAL.
La tcnica ms usada para interpolar son los polinomios, por su
{ x0 , x1 , ..., xn }
sean
f ( x0 ) , f ( x1 ), ... , f ( xn )
sus
respectivas
( xi , f (xi ) ) ,
i = 0,1,2..., n,
(n + 1)
un nico polinomio de grado menor o igual que n que pasa por estos puntos.
Demostracin.
Sea Pn (x ) = ai x i
(2.2)
i =0
P (x i ) = f (x i ) , i = 0,1,2,..., n ; lo
(2.3)
(n + 1) incgnitas:
43
(n + 1)
ecuaciones con
1 x1
A=
... ...
1 x
n
x02 . . . x0n
x12 . . . x1n
... . . . ...
xn2 . . . xnn
det A =
(xi x j )
n
(2.4)
0 i < j n
lo que det A 0 , por lo tanto la matriz A es invertible. As, el sistema (2.3) tiene
solucin nica, y se pueden obtener nicos valores para las ai , i = 0,1,2,..., n
dando lugar a un polinomio nico.
Al polinomio P que pasa por lo puntos
( xi , f ( x i ) ) , i = 0,1,2,..., n se le
de Newton,
Notas:
a) A los xi se les llama nodos o puntos de interpolacin: xi x j , i j .
44
(2.5)
a0 =
f ( x1 )
,
x1 x0
a1 =
f ( x0 )
x0 x1
Sean
L0 ( x ) =
L1 (x ) =
x x1
,
x0 x1
x x0
,
x1 x0
x x0
x x1
f ( x0 ) +
f ( x1 )
x0 x1
x1 x0
L0 ( x0 ) = 1 ,
L1 ( x0 ) = 0
L0 ( x1 ) = 0
L1 ( x1 ) = 1
( x0 , f (x0 ) ) , ( x1 , f (x1 ) ) ,
(2.6)
donde a0 , a1 , a2 .
45
P2 ( x0 ) = a1 ( x0 x1 )( x 0 x 2 ) = f ( x 0 ) , de donde
a1 =
P2 ( x1 ) = a2 ( x1 x0 )( x1 x2 ) = f ( x1 )
a2 =
P2 ( x2 ) = a0 ( x2 x0 )( x2 x1 ) = f ( x2 ) ;
de donde
a0 =
f ( x0 )
(x0 x1 ) (x0 x2 )
f (x1)
(x1 x 0 ) (x1 x 2 )
f ( x2 )
(x2 x0 ) (x2 x1 )
P2 ( x ) =
(x x0 )(x x 2 )
(x x0 )(x x1 )
(x x1 )(x x 2 )
f (x0 ) +
f ( x1 ) +
f (x )
(x0 x1 ) (x0 x 2 )
(x1 x0 ) (x1 x 2 )
(x 2 x0 ) (x 2 x1 ) 2
Sean :
L0 ( x ) =
(x x1 )(x x2 ) :
(x0 x1 ) (x0 x2 )
L0 ( x0 ) = 1 , L0 ( x1 ) = 0 , L0 ( x2 ) = 0
L1 ( x ) =
(x x0 )(x x2 ) :
(x1 x0 ) (x1 x2 )
L1 ( x1 ) = 1 , L1 ( xi ) = 0 , i = 0,2
L2 ( x ) =
Luego:
En general,
P2 ( x ) = L0 ( x ) f ( x 0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x 2 )
( xi , f (xi ) ) ,
Pn ( x ) = L k ( x ) f ( xk )
k =0
Donde:
(2.7)
Lk ( x ) =
(x x0 )(x x1 ) . . . (x x k 1 ) . (x x k +1 )...(x x n )
(x k x0 ) (x k x1 ) . . . (x k x k 1 )(x k x k +1 ) . . . (x k x n )
n
Lk ( x ) =
i =0
ik
x xi
, k = 0,1,..., n
xk xi
46
(2.8)
(2.9)
1
Lk ( xi ) =
0
s i = k
s i k
Notas:
a) En el numerador de Lk (x ) va el producto de n factores de la forma x xi ,
i = 0,1,..., n excepto el factor ( x xk ) , y en el denominador va dicho producto
evaluado en xk .
y (3,3).
donde:
L0 ( x ) =
(x 2)(x 3)
(1 2) (1 3)
L 0 (x ) =
L1 ( x ) =
(x 1)(x 3)
(2 1) (2 3)
L1 ( x ) =
L2 ( x ) =
(x 1)(x 2)
(3 1) (3 2)
L2 ( x ) =
47
(x
2 )( x 3 )
2
(x 1)(x 3)
1
(x 1)(x 2)
2
Ejemplo 2.2
0.25
0.5
0.75
1.00
0.9162
0.8109
0.6931
0.5596
0.4055
Encuentre
los
valores
de
que
satisfagan
la
relacin
De all:
x = 0.0385
se obtiene
x = 0.4854
y = 0.6 , x = 0.6743
y = 0.5 , x = 0.8467
48
Ejemplo 2.3
xi
f ( xi )
Solucin:
El polinomio es de grado 3:
P 3 ( x ) = L i ( x ) f ( xi ) ,
donde:
i =0
L0 ( x ) f ( x0 ) =
L1 ( x ) f ( x1) =
L2 ( x ) f ( x2 ) =
L3 ( x ) f ( x3 ) =
Luego:
1
5
P3 ( x ) = x 3 + x 2 x + 1
6
6
Se deja al lector que reordene los puntos en otra forma y halle P3 ( x ) , luego
compare con el resultado anterior anterior .
NOTA : Si los nodos estn igualmente espaciados, la frmula de
i = 1,2,3,..., n ,
h=
x n x0
;
n
49
xk = x0 + kh . Luego:
entonces
xk xi = x0 + kh ( x0 + ih )
xk xi = h (k i )
(2.10)
x xi = h (s i )
(2.11)
L k (s ) =
i =0
si
k i
, k = 0,1,2,..., n
KI
s=
donde
x x0
h
, x punto a evaluar.
Lk (s ) =
obtiene:
(2.12 )
xi
1.20
1.40
1.60
1.80
2.00
L0 (s ) =
L1 (s ) =
s (s 2 )(s 3)(s 4 )
1
= s (s 2)(s 3)(s 4)
1( 1)( 2 )( 3)
6
L2 (s ) =
s (s 1)(s 3)(s 4) 1
= s (s 1)(s 3)(s 4 )
2 (1)( 1)( 2 )
4
L3 (s ) =
s (s 1)(s 2 )(s 4 )
1
= s (s 1)(s 2 )(s 4)
3 2 1 ( 1)
6
L4 (s ) =
s (s 1)(s 2 )(s 3) 1
=
s (s 1)(s 2)(s 3)
4 (3)(2 ) (1)
24
50
(2.13)
f (x ) = Pn ( x ) + Rn ( x ) , donde Pn ( x ) es el
para el error:
Rn ( x )
f (n +1) ( )
x xi
(n + 1) !
i =0
51
Rn ( x )
n
M
x xi
(n + 1) !
i =0
(2.14)
P (x ) =
donde: Lk ( x ) =
f (x k ) Lk (x )
k =0
(x x0 )(x x1 ) . . . (x x k 1 )(x x k +1 ) . . (x x n )
(x k x0 )(x k x1 ) . . . (x k x k 1 )(x k x k +1 ) . . . (x k x n )
(x xi )
i =0 (x k xi )
n
Lk (x ) =
k = 0 ,1, . . . , n ,
ik
adems
0 s
Lk ( x i ) =
1 s
ik
i=k
52
Teorema 2.4
(n + 1)
f (x) P (x) =
( x x 0 )( x x1 ) . . . ( x x k )... ( x x n )
f
(n + 1) !
(n +1) (
1
h n +1M , de donde f (n+1) ( x ) M .
4 (n + 1)
(x0 , f (x0 ) )
Luego:
f (2 ) ( )
( x x 0 )( x x1 )
2!
R1 ( x ) =
f (2 ) ( )
2!
x , entre x 0 y x1
( x x 0 )( x x1 )
2
2x0 + h h
g
=
2 2
x0 + x1
, y
2
(mximo )
53
M h 2 Mh 2
=
2 4
8
Observe que el mximo error ocurre en el punto medio del intervalo [x0 , x1 ] ,
por lo que f puede aproximarse por f ( xM ) , donde xM =
x1 + x0
.
2
, 21 =
7
.
60
P1 ( x ) =
x 21
x 20
sen (20) +
sen (21)
20 21
21 20
donde
f (2 ) ( )
7
7
y
x x
, entre
2!
9
60
9 60
0.34202 = sen
De all:
f ( 2 ) ( ) 0.358368 . Luego:
54
R2 (20.3)
2!
9 180
60
180
R2 (20.3)
= 1.146 10 5
2!
180 180
20.3
5
R2
1.146 10
180
EJERCICIOS RESUELTOS
2.1
a)
xi
0.25
0.5
0.75
1.0
f ( xi )
0.9162
0.8109
0.6931
0.5596
0.4055
y 4 de la tabla anterior.
Sea P2 ( x ) = L2 ( x ) f ( x 2 ) + L3 ( x ) f (x 3 ) + L4 ( x ) f ( x 4 )
L2 (x ) =
(x x 3 )(x x 4 )
(x 2 x 3 )(x 2 x 4 )
L3 ( x ) =
(x x 2 )(x x 4 )
L2 ( x ) = 16 ( x 0.25)( x 0.75)
(x 3 x 2 )(x3 x 4 )
L4 ( x ) =
(x x2 )(x x3 )
L4 ( x ) = 8 ( x 0.25)( x 0.75) .
(x 4 x 2 )(x3 x3 )
donde
L2 ( x ) = 8 ( x 0.5)( x 0.75)
Luego:
55
P2 (0.6) = 0.641584
R2 ( x ) =
R 2 (0.6 ) 0.00023
as
2. Considere la tabla
xi
0.25
0.50
0.75
1.00
f ( xi )
0.9162
0.8109
0.6931
0.5596
0.4055
Solucin.
En este caso se deben elegir tres puntos, para ello se tienen las
siguientes opciones:
i)
ii)
iii)
P2 ( x ) =
+
56
(x 0.75)(x 1)
(x 0.5)(x 1)
f (0.5) +
f (0.75)
(0.50 0.75)(0.50 1)
(0.75 0.5)(0.75 1)
(x 0.50)(x 0.75) ( )
f 1.00
(1 0.50)(1 0.75)
De all que:
No se puede estimar el error. Se deja al lector que realice los clculos para la
opcin (iii) . Compare los resultados.
P2 (s ) =
xi
0.50
0.75
1.00
f ( xi )
0.6931
0.5596
0.4055
as:
s=
0.60 0.50
= 0.4 ,
0.25
( xi , f (xi ) ) ,
luego:
i)
f [xi ] , y se definen:
as:
f [xi ] = f ( xi )
ii)
57
i = 0,1,2,..., n
f [x i , x i +1 ] =
iii)
f [x i +1 ] f [xi ]
x i +1 xi
i = 0,1,2 ,..., n 1
definen por:
f [xi , xi +1 , xi + 2 ] =
f [xi +1 , xi + 2 ] f [xi , xi +1 ]
xi + 2 xi
f [xi , xi +1 , . . . , xi + k 1 , xi + k ] =
f [xi +1 , . . . xi + k ] f [xi , . . . , xi + k 1 ]
xi + k xi
(k + 1)
orden (k 1) .
58
Orden 1
Orden 2
x0
F[x0]
x1
F[x1]
F[x0,x1]
x2
F[x2]
F[x1,x2]
F[x0,x1 ,x2]
x3
F[x3]
F[x2,x3]
F[x2,x3 ,x4]
Orden 3
TABLA 1
Si se aade un nodo al final o al principio de la tabla se pueden usar las
diferencias calculadas anteriormente.
Ejemplo 2.5.
Para la
diferencias divididas:
-0.3
-0.2
-0.1
0.0
0.1
0.2
0.3
F(x)
1.6081
1.4016
1.2001
1.0000
0.8001
0.6016
0.4081
Solucin.
xi
F[xi]
Orden
1
-0.3
1.6081
-0.2
1.4016
-2.065
-0.1
1.2001
-2.015
0.25
0.0
1.0000
-2.001
0.07
-0.6
0.1
0.8001
-1.999
0.01
-0.2
1.0
0.2
0.6016
-1.985
0.07
0.2
1.0
0.3
0.4081
-1.935
0.25
0.6
1.0
59
Note que las diferencias divididas de orden 4 tienen el mismo valor, y las
diferencias de orden superior a 4 son nulas, lo cual concuerda con que la
derivada de orden 4 de un polinomio de cuarto grado es constante y su quinta
derivada es cero.
interpolante
Pn ( x )
los
puntos
Pn ( x ) = a0 + a1 ( x x0 ) + a2 ( x x0 )( x x1 ) + ... + an ( x x0 )( x x1 ) ... ( x xn 1 )
(2.15)
(xi , f (xi ) )
polinomio
que
pasa
por
i = 1,2,..., n :
P (x0 ) = a0 = f ( x0 ) a0 = f [x0 ]
P ( x1 ) = a 0 + a1 ( x1 x 0 ) = f ( x1 ) de donde a1 =
f ( x1 ) f ( x 0 )
x1 x 0
as
a1 = f [x0 , x1]
P ( x2 ) = a0 + a1 ( x1 x0 ) + a2 ( x2 x0 )( x2 x1 ) = f ( x2 ) ,
de all que:
f [x 2 ] f [x1 ] f [x1 ] f [x 0 ]
x 2 x1
x1 x 0
f [x1 , x 2 ] f [x 0 , x1 ]
, a2 =
,
a2 =
x2 x0
x2 x2
a 2 = f [x 0 , x1 , x 2 ]
60
a k = f [x 0 , x1 , . . . , x k ] .
En general
Sustituyendo a0 , . . . , an en
(2.15)
se obtiene:
Pn ( x ) = f [x 0 ] + f [x 0 , x1 ] ( x x 0 ) + f [x 0 , x1 , x 2 ] ( x x 0 )( x x1 ) + ...
+ f [x0 , x1 ,..., x n ] ( x x 0 )( x x1 )... ( x x n 1 )
n
k 1
k =1
i =0
(2.16)
(2.17)
xi
x0
...
xn
f ( xi )
f0
...
fn
61
Rn ( x ) = f [x0 , . . . , xn , t ]( x x0 ) . . . ( x xn )
(2.18)
(xi , f (xi ) ) ,
i = 0,1,2,.., n , entonces:
f ( x ) = Pn ( x ) +
f (n +1) ( )
(x x0 )...(x xn )
(n + 1) !
(2.19)
(2.20)
f (n +1) ( )
= f [x 0 , . . . , x n +1 ]
(n + 1) !
, entre
{x 0 ,..., x n+1 }
(2.21)
(n + 1) y la derivada de orden (n + 1) .
f ( k ) ( ) = k ! f [x 0 ,..., x k ]
62
se obtiene:
Pn (s ) = f [x 0 ] + f [x 0 , x1 ] h s + f [x 0 , x1 , x 2 ] h 2 s (s 1) + ...
+ f [x 0 , x1 ,..., x n ] h n s (s 1) ... (s n + 1)
Pn (s ) =
(2.22)
k =0
Nota:
a) El valor de f [x0 , x1 ,..., xk ] se calcula usando la tabla de diferencia dividida.
b) Como x = x0 + h.s , s > 0 , entonces
s=
x x0
,
h
donde x
punto
recuerde que:
lo cual
obtiene :
Pn (s ) =
k =0
()
, Rn ( s ) = f [x0 , x1 ,..., xn ] n ! ns h n +1
(2.23)
f [x0 , x1 ] =
63
f [x1 ] f [x0 ] f ( x0 )
=
x1 x0
h
f [x 0 , x1 , x 2 ] =
f [x1 , x 2 ] f [x 0 , x1 ] f ( x1 ) f ( x 0 ) ( f ( x 0 ))
=
=
x2 x0
2h 2
2h 2
f [x0 , x1 , x2 ] =
1
2h
2 f ( x0 )
1 1 k
f ( x0 )
k ! hk
( ks ) k f (x0 )
n
(2.24)
k =0
(2.25)
x xi = h (s + n i ) , i = 0,1,2,..., n
( Error asociado )
(2.26)
64
NOTAS:
a) las diferencias que aparecen en la frmula (2.26 ) quedan en la diagonal
inferior de la tabla de diferencias divididas.
ENTRADA:
SALIDA:
( elementos de la
Paso 1:
Qi , j 1 Qi 1, j 1
xi xi j
Paso 3:
Escribir Qi ,i , i = 0,1,2,..., n
Paso 4:
i =1
65
i 1
donde: Pi = (a x j )
j =0
Escribir el valor de P (a )
Paso 5:
FIN
Pj = Pj i a x j i ,
Z j = Pj
Escribir Z j , j = 0,1,2,..., n
Para k = 1,2,..., n
calcule: s k = s k 1 + Q k , k Zk
j = 1 : P1 = P0 (a x0 ) P1 = 1(a x0 ) , Z1 = P1
j = 2 P2 = P1 (a x1 ) P2 = (a x0 )(a x1 ) , Z 2 = P2
En general:
j = n:
Pn = (a x 0 )(a x1)... (a x n 1) ,
k = 1:
Zn = Pn
k = 2:
k = 3:
S3 = S 2 + Q3,3 Z 3
66
xi
2.0
2.2
2.4
2.6
2.8
f ( xi )
0.5103757
0.5207843
f( xi )
2.0
0.5103757
2.2
0.5207843
0.052043
2.4
0.5104143
-0.051850
-0.2597325
2.6
0.4813306
-0.145419
-0.2339225
2.8
0.4359160
-0.227073
-0.2041350
0.0430167
0.0496458
0.00828637
b) Halle el polinomio de Newton que ajuste los nodos de la tabla; luego selo
para aproximar f (2.5) :
P4 ( x ) = 0.5103757 + 0.052043 ( x 2 ) 0.2597325 ( x 2)( x 2.2 ) +
0.0430167 ( x 2)( x 2.2)( x 2.4) + 0.00828637 ( x 2)( x 2.2)( x 2.4)( x 2.6)
2.5 2
, de all que S = 2.5 , luego
0.2
P4 (2.5 ) = 0.4980702
67
Como
x = x n + Sh S =
x xn
2.5 2.8
S=
= 1.5 ,
h
0.2
luego:
f (x )
4/3
5/3
Rn ( x ) =
f (n +1) ( )
(x x0 )...( x xn ) entre x0 y xn
(n + 1) !
As: n = 3 , x = 1.5 , f (4 ) (x ) =
Rn (1.5) =
R n (1.5) =
6
,
x4
68
luego:
6
(1.5 1)(1.5 4 / 3)(1.5 5 / 3)(1.5 2)
4!
4
1.736111 10 3
Como 1 2 entonces
entre 1 y 2
1
1
4 1
16
Rn (1.5) 1.736111 10 3
Por lo que:
xi
0.1
0.2
0.4
0.7
1.0
1.2
1.3
f ( xi )
0.1
0.99750
0.2
0.99002 -0.07480
0.4
0.7
1.0
0.01478
1.2
0.04636
0.01218 -0.00236
1.3
0.05643
69
(A)
R2 ( x ) = f [x2 , x3 , x4 , x5 ] ( x x2 )( x x3 )( x x4 ) , luego
70
donde 0.04636 es el
nmero
(C)
es :
(B)
Igual al (C)
3. Dada la tabla:
i
xi
1.00
1.35
1.70
1.90
3.00
f ( xi )
0.00000
0.30010
0.53063
0.64185
1.09861
Solucin ( b ) .
i)
i = 0,1,2 :
ii)
i = 1,2,3 :
71
R 2 (1.5 ) = 1.6248 10 3
R2 (1.5) = 5.682 10 3
4. Sea la tabla:
i
xi
0.25
0.50
0.75
1.00
fi
0.9162
0.8109
0.6931
0.5596
0.4055
xi
f [xi ]
0.9162
0.25
0.8109
-0.4212
0.50
0.6931
-0.4712
-0.1
0.75
0.5596
-0.5340
-0.1256
-0.0341
1.00
-0.6164
-0.1648
-0.0523
0.4055
Orden 1
Orden 2
Orden 3
Orden 4
-0.0182
S=
72
0.6 0.25
= 1.4 , luego
0.25
P2 (1.4 ) = 0.641584
R2 (1.4 ) = 2.7457 10 4
xi
f [xi ]
1.00
0.4055
-0.6164
-0.1648
-0.0523
0.75
0.5596
-0.5340
-0.1256
-0.0341
0.50
0.6931
-0.4712
-0.1000
0.25
0.8109
-0.4212
0.9162
S=
-0.0182
0.6 1
= 1.6 ,
0.25
P(-1.6)=0.642172
50
60
70
80
90
100
24.94
30.11
36.05
42.84
50.57
59.30
Se pide
a) Construir la tabla de diferencia dividida:
Orden 1
Orden 2
Orden 3
73
Orden 0
Orden 4
50
24.94
60
30.11
0.517
70
36.05
0.594
3.85x10-3
80
42.84
0.679
4.25x10-3
1.33x10-5
90
50.57
0.773
4.75x10-3
1.50x10-5
4.25x10-8
100
59.30
0.873
5.00x10-3
1.00x10-5
-1.25x10-7
Orden 5
-1.675x10-7
As
P2 (64) = 32.3936
ii) Repita el ejercicio, pero con los puntos i = 1, 2, 3. Cul de los dos
resultados es mejor? Por qu?
e) Aproxime
P (64)
74
Luego:
ii)
S=
64 T0 64 50
=
S = 1.4 .
h
10
P (1.4 ) = 32.178
Luego:
64 T1 64 60
=
S = 0.4 .
10
h
P (0.4 ) = 32.486
Luego:
iii)
S=
Pero
S=
64 50
= 1.4 , luego
10
P2 (1.4) = 32.385 .
75
, S=
98 100
= 0 . 2 ,
10
P ( 0.2) = 57.55
98 100
= 0.2
10
P ( 0.2) = 57.674
8. Determine
a) Agua:
P: 6.8 MPa.
b) Agua:
V: 0.025 m3/Kg.
P: 8 MPa.
V: 0.040 m3/Kg.
Solucin.
problema
variables:
V:
Volumen especfico.
76
A)
B)
PARTE a:
Agua:
V Vf
Vfg
V: 0.025 m3/Kg.
P: 6.8 MPa.
halla calidad, para ello se necesitan los valores de las Vf y Vfg ( las cuales se
obtienen con la presin dada en la misma tabla ):
Vf = 0.0013448 m3/Kg.
0.025m3 / kg 0.0013448m3 / kg
=0.878552434151
0.0269252m 3 / kg
PARTE b:
Agua:
P: 8 MPa.
V: 0.840 m3/Kg.
77
450
0.03817
0.040
500
0.04175
V =
T 500
T 450
x 0.03817 +
x 0.04175
450 500
500 450
T = 475.5 C
1 Lb = 0.4535927 Kg
1 psi = 14.22 Kg/cm3
1 m3 = 35.31466672 ft3
Se obtiene que :
T1 = 380 F P1 = 195.6 psi = 13.752041Kgf / cm 2
78
V f1 = 0.001146 m 3 / Kg
Vg 2 = 2.286 ft 3 / lbm
V f 2 = 0.018389 ft 3 / lbm
V f 2 = 0.001148 m 3 / Kg
Vg1 = 0.146019 m 3 / Kg
Vg 2 = 0.14271 m 3 / Kg
T(F)
P(Kgf/cm2)
Vg ( m3kg)
Vf ( m3kg)
380
13.752041
0.146019
0.001146
382
14.084593
0.14271
0.001148
T(F)
P(Kgf/cm2)
380
13.752041
382
14.084593
Obtenindose
v = XV g + (1 X )V f
calidad.
X representa la
Para calcular Vg y V f
79
los datos:
T(F)
Vg ( m3kg)
Vf ( m3kg)
380
0.146019
0.001146
382
0.14271
0.001148
Obtenindose :
Vg = 0.144364 m3 / Kg ,
V f = 0.001147 m3 / Kg
Luego
v = 0.097102 m3 / Kg
Solucin:
T = 211 F = 99.44 C
P99.44C =
P100 P95
(T99.44 T95 ) + P95
T100 T95
P99.44C =
80
0.001044 m3 / Kg 0.001040m3 / Kg
(99.44C 95C ) + 0.00104o m3 / Kg
100C 95C
V f = 0.001043 m 3 / Kg
Ahora
v = 0.72 1.7075 m 3 / Kg + (1 0.72) 0.001043 m3 / Kg ,
v = 1.2297 m3 / Kg
a)
dados:
X
0.4
0.8
1.2
f(x)
1.0
1.491
2.225
3.320
81
mediante
2.
Aproxime y =
1+ x
1 + 2 x + 3x 2
Lagrange de orden 4, luego evale el error segn E(x) = y g(x), donde g (x)
es el polinomio de Lagrange. Aproxime y(2) y compare con el valor exacto.
0.25
0.75
1.25
1.50
2.00
-0.23
-0.33
0.70
1.88
6.00
Xi
0.0
0.1
0.3
0.6
1.0
f(Xi)
-7.00000
-5.89483
-5.65014
-5.17788
-4.28172
82
XK
0.25
0.50
0.75
1.00
f(X K )
0.9162
0.8109
0.6931
0.5596
0.4055
Xi
2.2
2.4
2.6
2.8
f(Xi)
0.5103757
0.5207843
0.5104147
0.4813306
0.4359160
83
Xi
-0.3
-0.1
0.1
0.3
f(Xi)
-0.20431
-0.08993
0.11007
0.39569
8. Las densidades del sodio para tres temperaturas estn dadas por:
i (densidad) Kg/m 3
Ti
94c
929
205c
902
371c
860
Ao
1930
Pobl. En 123,203
1940
1950
1960
1970
1980
131,669
150,697
179,323
203,212
226,505
Milla.
Xi
0.5
1.0
1.5
2.0
2.5
f(Xi)
2.119
2.910
3.945
5.720
8.695
84
11. Sea
F( x ) =
1
x
y sean
{ x0 , x1 ,...., xn } ( n + 1 )
puntos distintos.
Calcule:
i)
ii) Las diferencias de orden uno, es decir : F [xi , xi +1] para i = 0,1,, n-1
iii) Las diferencias de orden dos, es decir: F [xi , xi +1 , xi + 2 ] para i = 0,1,, n-2
iv) En general : halle una frmula para la diferencia : F [x0 , x1 ,..., xn ]
85
n-2
n-1
xi
x0
x1
x2
x3
xn 2
xn 1
xn
f ( xi )
f ( x0 )
f ( x1 )
f ( x2 )
f ( x3 )
f ( xn 2 )
f ( xn 1 )
f ( xn )
xi
xi a
Pi = f ( xi )
x0
x0 a
P0 = f ( x0 )
x1
x1 a
P1 = f ( x1 )
P0,1
P2 = f ( x2 )
P1, 2
x2
x2 a
Pi , i + 1
x3
x3 a
P3 = f ( x3 )
P2,3
xn 2
xn 2 a
Pn 2 = f ( xn 2 )
xn 1
xn 1 a
Pn 1 = f ( xn 1 )
Pn 2, n 1
Pn = f ( xn )
Pn 1, n
n-2
n-1
n
xn
xn a
Pi ,i +1,i + 2
P0,1, 2
P1, 2,3
Pn 2,n 1,n
Esquema 1
Pi ,i +1 =
Pi
xi a
Pi +1
xi +1 a
xi +1 xi
b) Polinomios de grado 2:
Pi ( xi +1 a ) Pi +1 ( xi a )
xi +1 xi
86
Pi ,i +1,i + 2 =
Pi ,i +1
xi a
Pi +1,i + 2
xi + 2 a
xi + 2 x i
c) Polinomios de grado 3:
Pi ,i +1,i + 2 ,i + 3 (usan los nodos x i , x i +1 , x i + 2 , x i +3 , i = 0,1,2,3 L , n 3 )
Pi ,i +1,i + 2.i + 3 =
Finalmente:
P0 ,1,L,n 1n ,n =
Pi +1,i + 2
xi a
Pi +1,i + 2.i + 3
xi + 3 a
P0 ,1,L,n 1
P1,2 ,L,n
xi + 3 xi
x0 a
xn a
x n x0
= P(a ) f ( a )
xi
xi a
Pi = f ( xi )
x0
x0 a
P0 = f0
x1
x1 a
P1 = f1
P1 = f1
x2
x2 a
P2 = f2
P2 = f2
x3
x3 a
P3 = f3
Pi ,i +1,i + 2
Pi ,i+1
P0,1 =
P0 ( x1 a) P1( x0 a)
x1 x0
P1,2 =
P1( x2 a) P2 ( x1 a)
x2 x1
P2,3 =
P2 ( x3 a) P3( x2 a)
x3 x2
P0,1,2 =
P1,2,3 =
P0,1( x2 a) P1,2( x0 a)
x2 x0
P1,2( x3 a) P2,3( x1 a)
x3 x1
P0 ,1,2 ,3 =
Finalmente:
87
P0 ,1,2 ( x3 a ) P1,2 ,3 ( x0 a )
= f (a )
x3 x0
2.2
2.4
2.6
2.8
f ( xi )
0.5103757
0.5207843
0.5104147
0.4813306
0.4359160
Solucin:
Construir la tabla:
xi
xi 2.5
f (x i )
2.0
-0.5
0.5103757
2.2
-0.3
0.5207843
0.5363972
2.4
-0.1
0.5104147
0.5052299
0.497438075
2.6
0.1
0.4813306
0.49587265
0.4982119625
0.49806829831
2.8
0.3
0.4359160
0.5040379
0.4979139625
0.4980629625
0.4980704685
f (2.5 ) 0.498070468
De all que
3 con la funcin
x1 = 1,
x 2 = 0,
x3 = 1,
x4 = 2 .
Solucin:
Se quiere aproximar
88
xi
xi 2.5
f ( xi )
-2
-2.5
0.111111
-1
-1.5
0.333333
0.666666
-0.5
1.333333
1.500000
0.5
1.833333
1.777777
1.5
1.500000
1.666666
3 es:
1.708338
1.732050808.
xi
xi -0.78
f (xi ) = Pi
-1
-1.78
0.19876611
-0.9
-1.68
0.2047094
0.3045580945
-0.8
-1.58
0.20035232
0.1315092325
-1.2355765
-0.7
-1.48
0.18610660
-0.0247300786
-1.1809009
-.911168224
-0.6
-1.38
0-16306336
-0.1543333051
1.053335
-.466534663
1.06745112
89
x0 , L , xn ; los valores
ENTRADA: Nodos
f ( x0 ), f ( x1 ) ,L, f ( xn )
( se
SALIDA:
Paso 1:
Para i = 1,2,L , n
Para j = 1,2,L , i
Paso 2:
calcular
Qi , j =
(x x )Q
i j
i , j 1
( x xi )Qi 1, j 1
xi xi j
SALIDA (Q)
FIN
nodo
xi +1 a la tabla y
90
EJERCICIOS PROPUESTOS
1. a) Use el mtodo de Neville para aproximar f (1.03) con P0,1, 2 para la
funcin f (x ) = 3xe x e 2 x usando x0 = 1, x1 = 1.05 y x2 = 1.07 .
b) Suponga que la aproximacin de (a) no es lo suficientemente exacta y
calcule P0,1, 2,3 donde x4 = 1.04 .
2. Repita el ejercicio anterior usando aritmtica de cuatro dgitos. Compare.
3. Considere los siguientes datos:
i
Xi
0.25
0.50
0.75
1.0
F(Xi)
.9162
0.8109
0.6931
.5596
.4055
f ( xi )
x0
f ( x0 )
x1
f ( x1 )
L
L
xn
f ( xn )
Se quiere hallar x tal que f ( x ) = a , con a dado: para ello se puede hallar el
polinomio Pn ( x ) que interpola los datos de la tabla, y luego se resuelve la
ecuacin Pn ( x ) = a . Pero este trabajo resulta un poco complicado ya que
algunas veces se requieren de mtodos numricos para resolver la ecuacin
resultante. Afortunadamente, el mtodo de Neville se puede adaptar para
realizar interpolacin iterada inversa, para ello se requiere que f 1 exista,
f, f`
91
yi y
f ( yi )
y0
y0 y
f ( y0 )
y1
y1 y
f ( y1 )
P0,1
y2
y2 y
f ( y2 )
P1, 2
yn 1
yn 1 y
f ( yn 1 )
yn
yn y
f ( yn )
Pn 1,n
P012...n ( valor de x)
Esquema 2
Ejemplo 2.11 Use interpolacin inversa para encontrar una aproximacin a la
solucin de x e x = 0 , usando:
0.3
x
e x
Solucin:
0.4
0.5
0.6
0.548812
Sea y = f ( x ) = x e x = 0 .
se quiere hallar x tal que f ( x ) = 0 , para ello se aplica el mtodo de Neville con
el esquema 2:
xi
yi = f ( xi )
y yi
xi = f 1 ( yi )
0.3
-0.440818
0.440818
0.3
0.4
-0.27032
0.27032
0.4
0.5585473143
0.5
-0.106531
0.106231
0.5
0.5650416048
0.567111217
0.6
0.051188
0.051188
0.6
0.56754481
0.567146269
0.567142622
92
f (x )
0.5
0.8
0.9
La cual se obtuvo de f ( x ) =
0.941176 0.961538
x2
. Resuelva la ecuacin f ( x ) = 0.93 , en
1+ x2
forma:
a) Exacta.
Solucin:
a) Para calcular el valor exacto se resuelve la ecuacin
que
xi
yi=f(xi)
y yi
f -1(yi)
x2
= 0.93 de all
1+ x2