Académique Documents
Professionnel Documents
Culture Documents
0.5 0.4
Clculo Numrico
Captulo 4:
0 -0.1 -0.2
Interpolacin y
Aproximacin Funciones
Dr. Gonzalo Hernndez Oliva
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones
-4
-3
-2
-1
p(xi ) = yi i =1,..., n +1
x
yi
x x x x
x x x
p(x)
xi
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 3
a k x k i 1, . . . , n 1 i
k0
x1 x2 x3
x2 1 x2 2 x2 3
xn 1 xn 2 xn 3
a0 a1 a2 an
y1 y2 y3 y n1
4
2 1 x n1 x n1 x n n1
yi
+ ++ ++ + + + + ++ ++ + + + + + + + + + + + + + ++ + + ++ + + + + + + + +++ +
min [ yk ( 0 + 1 xk )]
0 , 1
k =1
xi
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 5
zk = 0 + 1 xk + 2 yk + k
++ + + + + + + + + + + + + + + + + + + ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Ecuaciones Normales:
n
n k1 n k1
xk yk
n n k1 x k k1 y k n n x 2 k1 x k y k k1 k n n x k y k k1 y 2 k k1
0 1 2
n k1 z k n k1 x k zk n y k zk k1
8
f ( x) = exp( x 2 )
x4 pT (x) = 1 x + 2
2
Campana Gauss Taylor 4 Orden
-1
Dr. Gonzalo Hernndez Oliva
-0.5
1
9
f ( x) = x sin( x 2 )
x7 pT (x) = x3 6
-0.5
-1
f(x) = x*sin(x 2) Taylor f(x)
-1.5 -1.5
Dr. Gonzalo Hernndez Oliva
-1
-0.5
1.5
10
> 0)
| f ( x ) p ( x ) |< x [ a, b]
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 11
y = f ( x) +
y = f ( x)
y = p( x)
y = f (x)
x
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 12
[ a, b ] , f
( n +1)
existe en [a,b] , x0 [ a, b]
f ( x) = pn ( x ) + Rn ( x)
f (k ) ( x0 ) f (n+1) ( (x)) (x x0 )k Rn (x) = (x x0 )n+1 pn (x) = (n +1)! k! k =0
n
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 13
x2 x2 x3 x4 x 2 x3 1+ x + + + 1+ x + + 1+ x 1+ x + 2 6 24 2 6 2
2 1.5 1.3 1.1 1.01 1.001 2.5 1.625 1.345 1.105 1.01005 1.0010005 2.666666 1.645833 1.3495 1.10516667 1.01005017 1.00100050000 2.7083333 1.6484375 1.3498375 1.10517083 1.01005017 1.00100050017
ex
2.718281828 1.6487212707 1.34985880757 1.10517091807 1.010050167 1.00100050016
14
f ( x) = ln( x + 1)
2
en torno a x0 = 0 Utilice estos polinomios que aproximan a f para calcular: Cual es el error relativo ?
Dr. Gonzalo Hernndez Oliva
f ( x) = ln( x 2 + 1)
x4 pT (x) = x 2
2
Funcin y Taylor
Funcin Taylor
-1
-0.5
0.5
1.5
16
pn ( x ) = ( 1) ( x 1)
k k =0
0 1
1 -1
2 3
3 -5
4 11
5 -21
6 43
7 -85
pn ( 3)
1 f ( 3) = !!! 3
18
( x , f ( x ) ) , ( x , f ( x ) ) ,..., ( x , f ( x ) )
0 0 1 1 n n
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 19
pL ( xk ) = f ( xk ) k = 0,1,..., n
Donde: pL ( x) =
Dr. Gonzalo Hernndez Oliva
f (x )L
k =0 k
n ,k
( x)
20
(x x0 )(x x1)...(x xk1)(x xk+1)...(x xn ) Ln,k (x) = (xk x0 )(xk x1)...(xk xk1)(xk xk+1)...(xk xn )
Es fcil ver que:
Veamos un ejemplo
Dr. Gonzalo Hernndez Oliva
1 si j = k Ln ,k ( x j ) = 0 si j = k
21
f [a,b]
n+1
f ( x) = pL ( x) + RL ( x)
Error Polinomio Lagrange
Dr. Gonzalo Hernndez Oliva
RL (x) =
( n+1)
1/ 3
Obtenga una cota del error en [0,5]. Determine error absoluto y relativo.
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 23
erf ( x) =
e dt
t 2
1) Determine Pol. de Taylor de orden 4. 2) Determine Pol. de Lagrange en x=0.2, 0.4, 0.6, 0.8, 1.0, utilizando 1). 3) Determine cotas del errores de estas aproximaciones.
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 24
M = mi + n
i =0
Interpolacin y Aproximacin Funciones
26
[ a, b] ( m = max m )
0 i n i
d p d f x = k ( xi ) k = 0,..., mi i = 0,..., n k ( i) dx dx
Interpolacin y Aproximacin Funciones 27
H 2 n+1 ( x ) = f ( x j ) H nj ( x) + f '( x j ) H nj ( x)
Dr. Gonzalo Hernndez Oliva
j =0
j =0
29
H nj ( x) = (1 2( x x j ) L 'nj ( x) ) L ( x)
2 nj
( x) = ( x x ) L2 ( x) H nj j nj
Lnj: j-simo pol. de Lagrange de grado n. Si: f 2 n+2 [ a, b ] x [a, b] ( x) (a, b) :
( x x0 )2 ( x x1 )2 ...( x xn )2 (2n+2) ( ( x)) f ( x) = H2n+1 ( x) + f (2n + 2)
Interpolacin y Aproximacin Funciones 30
3
33
b j +1 = b j + 2c j h j + 3d j h
2 j
c j +1 = c j + 3d j h j j = 0,1,...n 1 3
Interpolacin y Aproximacin Funciones
34
A estas ecuaciones se debe adicionar las condiciones de frontera: Libre o Sujeta Este sist. de ecs. tiene variables: c0,c1,...,cn Tiene solucin nica 6 ?
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 36
h n2 0
0 0 0 0 1
38
h 0 2h 0 h 1
2h n2 h n1 h n1
a 2 a 1 a 3 a 2
3 h0 3 h1
a 1 a 0 a 2 a 1 a n1 a n2
c0 c1 c n1 cn
Incgnitas
h n1
a n a n1 0
h n2
39
2h n2 h n1 h n1
a 1 a 0 3f x0
3 h0 3 h1
a 2 a 1 a 3 a 2
a 1 a 0 a 2 a 1 a n1 a n2
c0 c1 cn1 cn
Incgnitas
42
h n1
a n a n1 3f xn
h n1 3
h n2
a n a n1
Ecuaciones Normales:
n
n x 1k k1 n x 2k k1
n n x 1k k1 x 2k n x nk k1 k1 n n x 2 k1 x 1k x 2k n x 1k x nk k1 1k k1 n n k1 x 2k x nk n x 2k x 1k k1 x 2 2k k1
0 1 2 n
n y k k1 n x 1k y k k1 n x 2k y k k1
n n x nk n x nk x 1k k1 x nk x 2k k1 k1
Dr. Gonzalo Hernndez Oliva
n x2 k1 nk
n x nk y k k1
43
Ecuaciones Normales:
n
k1 x k n x 2 k1 k
Dr. Gonzalo Hernndez Oliva
n k1 n k1 n k1
x k k1 x 2 k x 2 k1 x 3 k k x 3 k1 x 4 k k
n n
0 1 2
yk n k1 x k y k n k1 x 2 y k k
44
n k1
y i pnx i 2
i1 i1
yi ak xk i
k0
m xi i1
m i1 x i m i1 x 2 i
m i1 x2 m xn i i1 i m i1 x3 m x n1 i i1 i
a0 a1 an
m xi yi i1 m x2 yi i1 i
m xn yi i1 i
45
Ecuaciones Normales:
a x 0 dx a x 1 dx a x dx a x dx
1 2 b b b b
c efi co
tes ie n
bi + j +1 a i + j +1 ij = i + j +1
a x 2 dx a x n dx
b 3 x dx a
a0 a1 an
a x 0 fxdx a x 1 fxdx
a x
b
n1
dx
b
Dr. Gonzalo Hernndez Oliva
b n1 b
n2
2n
a x n fxdx 46
Por ejemplo:
( x) =
1 1 x2
en [a,b].
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 48
p ( x) = akk ( x)
k =0
b b b b b
a0 a1 an
afn xdx
Si las funciones { , 2 ,..., n } son ortogonales con respecto a (x) en [a,b] se tiene que:
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 50
j = ( j 2 )( x)dx > 0
a
b a
0 0 2 xdx n
a0 a1 an
2xdx 1 a 0
afn xdx
51
0 ( x) = 1 1 ( x) = x B1 k ( x) = ( x Bk )k 1 ( x) Ckk 2 ( x) k 2
Bk
x ( x) [ = ( x) [
b a b a
k 1
( x) ] dx
2
k 1
( x) ] dx
Ck
( x) [
b a
k 2
( x) ] dx
52
x [ = [
1 1 1
k 1
( x) ] dx
2
( x) ] dx
Ck
xk 2 ( x)k 1 ( x)dx
[
1 1
k 2
( x) ] dx
53
Polinomios de Chebyshev
T0 T3 T4 T1
-0.5
T2
-1
Dr. Gonzalo Hernndez Oliva
-1
0.2
0.4
0.6
0.8
55 1
Para cualquier f
Dr. Gonzalo Hernndez Oliva
n +1
[1,1]
57
f ( x) = xe
0.1743 0.4967 1.588 3.632 5.208
pL ( x )
0.1969 0.5121 1.572 3.650 5.237
f (x) pCL(x)
0.0125 0.0097 0.017 0.012 0.016
58
59
n 1
f ( x)cos(kx)dx
bk =
f ( x)sin(kx)dx
60
2.5
f ( x) = x x [ , ]
1.5
4 S3 ( x) = cos( x) cos(3x) 2 9
0.5 0
Dr. Gonzalo Hernndez Oliva
T3
0 x 1 2 3
61
-3
-2
-1
y
n1 k =1
Sn ( x j )
donde:
bk = y j sin(kx j ) k = 1,2,..., n 1
j =0
2 m1
63
64
Bibliografa
1) R. Burden & J. D. Faires, Anlisis Numrico, Sptima Edicin, Thomson Learning, 2002. 2) J. Stoer & R. Burlisch, Introduction to Numerical Analysis, Second Edition, Springer, 1992. 3) G. Hernndez: Apuntes de Clculo Numrico 2006
Dr. Gonzalo Hernndez Oliva Interpolacin y Aproximacin Funciones 65