Diferencias Divididas.pdf

ElisberJRuizAsuncion 69 views 11 slides Nov 16, 2022
Slide 1
Slide 1 of 11
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11

About This Presentation

apuntes


Slide Content

Interpolación y aproximación polinomial
Métodos Numéricos
Docentes
Mg. Ana L. Gamarra Carrasco
•Ana L. Gamarra Carrasco
•Alex Neri Gutiérrez

Definición
Un polinomio de grado nes una expresión de la forma:
P(x) = a
nx
n
+ a
n-1x
n-1
+ ... +a
1x+ a
0
Donde a
nes diferente de 0.
Teorema (teorema de aproximación de Weierstrass)
Suponga que festá definida y es continua en [a, b]. Para e> 0
existe un polinomio Pdefinido en [a, b], con la propiedad de
que
|f(x) –P(x)| < e, para toda xen [a, b]

Interpolación polinomialde Newton
Revisaremos solo algunos casos: lineal, segundo grado y de
tercer grado.

Interpolación lineal
x
0 xx
1
f(x
0)
f
1(x)
f(x
1)
f(x)
Utilizando triángulos semejantes
01
01
0
01
xx
xfxf
xx
xfxf





Reordenando

 
0
01
01
01 xx
xx
xfxf
xfxf 




Ejemplo 1
Estimar ln2 mediante interpolación lineal si ln1 = 0 y ln6 = 1.791759 y ln4 = 1.386294

 
0
01
01
01 xx
xx
xfxf
xfxf 


  3583519.012
16
0791759.1
1ln2
1 


f  4620981.012
14
0386294.1
1ln2
1 


f
Valor real ln2 = 0.6931472
Error relativo porcentual = 33.3%0 1 2 3 4 5 6 7 8
-1
-0.5
0
0.5
1
1.5
2
2.5
f(x) = ln x
f
1(x)
Estimaciones lineales
Valor verdadero

Interpolación cuadrática
Polinomiocuadrático
f
2(x)=b
0+b
1(x–x
0)+b
2(x–x
0)(x–x
1) (1)
simplificado
f
2(x)=b
0+b
1x–b
1x
0+b
2x
2
+b
2x
0x
1–b
2xx
0–b
2xx
1
Podemosescribirlocomo
f
2(x)=a
0+a
1x+a
2x
2
Donde
a
0=b
0–b
1x
0+b
2x
0x
1,a
1=b
1–b
2x
0–b
2x
1,a
2=b
2
Podemosevaluarb
0,b
1yb
2sustituyendox
0,x
1yx
2enlaecuación(1),seobtiene
b
0=f(x
0)
01
01
1
xx
xfxf
b


 
02
01
01
12
12
2
xx
xx
xfxf
xx
xfxf
b






Ejemplo 2
Calculemos ln2 con ln4 y ln6, los punto que se conocen son:
x
0= 1 f(x
0) = 0
x
1= 4 f(x
0) = 1.386294
x
0= 6 f(x
0) = 1.791759
Aplicando las ecs. anteriores
b
0= 0
b
1= (1.386294 –0)/(4 –1) = 0.4620981
b
2= ((1.791759 –1.386294)
/(6 –4) –0.4620981)/(6 –1)
= –0.0518731
El polinomio es
f
2(x) = 0.4620981(x–1) –0.0518731(x –1)(x –4)
f
2(2) = 0.56584440 1 2 3 4 5 6 7 8
-1
-0.5
0
0.5
1
1.5
2
2.5
f(x) = lnx
Estimación cuadrática
Valor verdadero
Estimación lineal
Valor real ln 2 = 0.6931472
Error relativo porcentual = 18.4%

Forma general
Polinomiogeneral
f
n(x)=b
0+b
1(x–x
0)+...+b
n(x–x
0)(x–x
1)...(x–x
n–1)
Loscoeficientessecalculancon
b
0=f(x
0)
b
1=f[x
1,x
0]
b
2=f[x
2,x
1,x
0]
b
n=f[,x
n,x
n–1,...,x
1,x
0]
Dondelosparéntesiscuadradossedenominandiferenciasdivididasfinitas.
Lan-ésimadiferenciadivididafinitaes:
SeconocecomopolinomiodeinterpolacióndeNewtonendiferenciasdivididas. 
  
0
02111
011
,...,,,...,,
,,...,,
xx
xxxfxxxf
xxxxf
n
nnnn
nn





Ejemplo 3
Calculemos ln2 con ln0, ln4, ln5 y ln6, los punto que se conocen son:
x
0= 1 f(x
0) = 0
x
1= 4 f(x
1) = 1.386294
x
2= 6 f(x
3) = 1.791759
x
3= 5 f(x
2) = 1.609438
primeras diferencias
f [x
1, x
0] = (1.386294 –0)/(4 –1) = 0.4602981
f [x
2, x
1] = (1.791759 –1.386294)/(6 –4) = 0.2027326
f [x
3, x
2] = (1.609438 –1.791759)/(5 –6) = 0.1823216
Segundas diferencias
f [x
2, x
1, x
0] = (0.2027326 –0.4602981)/(6 –1) = –0.05187311
f [x
3, x
2, x
1] = (0.1823216 –0.2027326)/(5 –4) = –0.02041100
tercera diferencia
f [x
3, x
2, x
1 , x
0] = (–0.02041100–(–0.05187311))/(5 –1) = 0.007865529
Polinomio
f
3(x) = 0 + 0.4602981(x–1) –0.05187311(x–1) (x–4) + 0.007865529(x–1) (x–4) (x–6)
Valor calculado con el polinomio
f
3(2) = 0.6287686

Ejemplo 30 1 2 3 4 5 6 7 8
-1
-0.5
0
0.5
1
1.5
2
2.5
f(x) = ln xValor verdadero
Estimación cúbica
f
3(x)

Mg. Ana L. Gamarra Carrasco
Nos vemos la próxima clase. Gracias…
Tags