Documentos de Académico
Documentos de Profesional
Documentos de Cultura
De curvas y supercies
Contenidos de la presentación
Índice
1. Introducción 1
2. Prob.Lagrange 5
2.1. Polinómica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2. Pol.Lagrange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3. Dif.Divididas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4. Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5. Chebyshev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3. Pb.Hermite 17
3.1. Pol.Hermite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2. DD Gener. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3. Error. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4. Segmentaria 19
4.1. Lineal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2. Cuadrática . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3. Cúbica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5. Paramétrica 26
6. Bidimensional 27
6.1. Malla regular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7. Bibliografía 30
8. Demostraciones 30
8.1. Lagrange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.1.1. D.D.Newton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.1.2. Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.1.3. Chebishev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.2. Hermite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.3. Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1. Introducción
Introducción
Se realizan ensayos para determinar la relación entre esfuerzo (fuerza aplicada al material por unidad de área) y
deformación (deexión por unidad de longitud) en el mástil de un velero construido con una nueva aleación de aluminio.
1
σ (Kg/cm2 ) 126 365 506 527 562 703
Planteamiento
1. Se plantea la sustitución de una función f (x) por otra ψ (x) próxima más sencilla de evaluar, porque:
c) ...
3. Los puntos S donde se imponen condiciones al interpolante se denominan soporte o puntos de interpolación.
4. El interpolante se obtiene como como combinación de la base B = {ϕ0 (x) , ϕ1 (x) , · · · , ϕm (x)} de un espacio
vectorial de funciones.
m
X
ψ (x) = ak ϕk (x)
k=0
Objetivos
1. Plantear las condiciones de existencia y unicidad de solución del problema general de interpolación.
3. Calcular el único polinomio de interpolación de grado mínimo que resuelve el problema de Lagrange.
4. Conocer las diferentes formas de representar dicho polinomio (Lagrange, Newton), con sus ventajas e inconve-
nientes.
5. Comprender la relación entre diferencias divididas y la expansión en serie de Taylor, así como su uso para acotar
el error.
Tipos de problemas
Se tienen diferentes problemas dependiendo de las condiciones que debe vericar el interpolante ψ (x) en el soporte
S.
Taylor: soporte de un punto y el interpolante y sus derivadas deben tomar valores jados en él.
ψ (xi ) = f (xi ) , i = 0, 1, · · · , n
Hermite: soporte de varios puntos y el interpolante y su derivada deben tomar valores jados en cada uno.
2
¾Existe solución? ¾Es única?
La existencia y unicidad de solución vienen asociados al sistema lineal que se plantea al imponer las condi-
ciones al interpolante.
Problema de Taylor
Especicaciones:
Soporte: S = {x0 }
B = {ϕ0 (x) , ϕ1 (x) , · · · , ϕm (x)}
Base:
Xm
Interpolante: ψ (x) = ak ϕk (x)
k=0
···
ϕ0 (x0 ) ϕ1 (x0 ) ϕ2 (x0 ) ϕm (x0 )
ϕ00 (x0 ) ϕ01 (x0 ) ϕ02 (x0 ) ··· ϕ0m (x0 )
ϕ000 (x0 ) ϕ001 (x0 ) ϕ002 (x0 ) ··· ϕ00m (x0 )
A=
. . . .
. . . .. .
. . . . .
(m) (m) (m) (m)
ϕ0 (xo ) ϕ1 (xo ) ϕ2 (xo ) · · · ϕm (xo )
xt = , bt = f (x0 ) f 0 (x0 ) · · ·
a0 a1 ··· am f (m) (x0 )
Se obtiene un desarrollo en serie de funciones, ¾bajo qué condiciones el interpolante converge a la función?
∞
X ¾converge?
ak ϕk (x) −−−−−−−→ f (x)
¾donde?
k=0
Si B es una base polinómica, se tienen los desarrollos en series de potencias, y hay criterios para determinar si
hay convergencia y su radio de convergencia.
Convergencia de la serie: los criterios más habituales son el criterio de d'Alembert o del cociente y el criterio
Cauchy o de la raíz
ak+1 p
lı́m =L lı́m k |ak | = L
k→∞ ak k→∞
x0 = 0 si L=∞
Radio de convergencia ∀x si L=0
|x| < L1 si L ∈ (0, ∞)
Problema de Lagrange
Especicaciones:
Soporte: S = {x0 , x1 , · · · , xn }
B = {ϕ0 (x) , ϕ1 (x) , · · · , ϕm (x)}
Base:
Xm
Interpolante: ψ (x) = ak ϕk (x)
k=0
3
Sistema: Ax = b donde
ϕ0 (x0 ) ϕ1 (x0 ) ϕ2 (x0 ) · · · ϕm (x0 )
ϕ0 (x1 ) ϕ1 (x1 ) ϕ2 (x1 ) · · · ϕm (x1 )
A= .
. . .. .
.. . . .
. . . .
ϕ0 (xn ) ϕ1 (xn ) ϕ2 (xn ) · · · ϕm (xm )
xt = , bt =
a0 a1 ··· am f (x0 ) f (x1 ) · · · f (xm )
Si m = n ∧ |A| =
6 0 ⇒SCD: sol. única
Problema de Hermite
Especicaciones:
Soporte: S = {x0 , x1 , · · · , xn }
B = {ϕ0 (x) , ϕ1 (x) , · · · , ϕm (x)}
Base:
Xm
Interpolante: ψ (x) = ak ϕk (x)
k=0
Sistema Ax = b donde
ϕ0 (x0 ) ϕ1 (x0 ) ϕ2 (x0 ) ··· ϕm (x0 )
ϕ00 (x0 ) ϕ01 (x0 ) ϕ02 (x0 ) ··· ϕ0m (x0 )
ϕ0 (x1 ) ϕ1 (x1 ) ϕ2 (x1 ) ··· ϕm (x1 )
A= .
. . .. .
.. . . .
. . . .
ϕ0 (xn ) ϕ1 (xn ) ϕ2 (xn ) · · · ϕm (xm )
ϕ00 (xn ) ϕ01 (xn ) ϕ02 (xn ) · · · ϕ0m (xm )
xt =
a0 a1 ··· am
4
rango (A) = 1 < rango (A|b) = 2 → S.I.
sin solución
Sistema:
1 cos (−π) cos (−2π) 1 1 −1 1 1
1 cos (0) cos (20) 0 ∼ 1 1 1 0
1 cos (π) cos (2π) 1 1 −1 1 1
rango (A) = 2 = rango (A|b) < 3 → S.C.I.
1 1
múltiples soluciones: ψ (x) =
2 (1 − cos x) , 2 (cos (2x) − cos x)
Ejemplo 2. Determinar las condiciones para que el interpolante de la función f (x) tal que f (x0 ) = y0 , f (x1 ) =
y1 , f 0 (x2 ) = y2
sea único en la base 1, x, x2 :
Sistema
x20
1 x0 y0
1 x1 x21 y1
0 1 2x2 y2
Aplicando Gauss
x20 x20
1 x0 y0 1 x0 y0
0 x1 − x0 x21 − x20 y1 − y0 ∼ 0 x1 − x0 x21 − x20 y1 − y0
0 1 2x2 y2 0 0 2x2 − x0 − x1 y2 − xy11 −y0
−x0
Imponiendo |A| =
6 0
1
x0 6= x1 ∧ x2 6= 2 (x0 + x1 )
2. Prob.Lagrange
2.1. Polinómica
Soporte: S = {x0 , x1 , · · · , xn }
Base: B = 1, x, x2 · · · , xn
m
X
Interpolante: ψ (x) = Pm (x) = a0 + a1 x1 + · · · + am xm = ak xk
k=0
5
Interpolación polinómica (3)
Hecho 5. No interesa la resolución directa o frontal del sistema porque está muy mal condicionado.
Hecho 6. El polinomio de interpolación se puede expresar de varias formas, pero sigue siendo único.
Datos: (xk , f (xk )) = {(−1, 5) , (0, 1) , (1, −1)}
1. Forma canónica
P2 (x) = x2 − 3x + 1
2. Forma de Lagrange
P2 (x) = 52 x (x − 1) − (x + 1) (x − 1) − 12 x (x + 1)
3. Forma de Newton
P2 (x) = 5 − 4 (x + 1) + x (x + 1)
P3 (x) = 5 − 4 (x + 1) + x (x + 1) + x (x + 1) (x − 1)
P3 (x) = 5 − 4 (x + 1) + x (x + 1) + 2x (x + 1) (x − 1)
2.2. Pol.Lagrange
Obtención:
6
Representación
0
Los polinomios Ln (x) , L1n (x) , L2n (x) · · · , Lnn (x) se denominan polinomios de Lagrange asociados al soporte
S = {x0 , x1 , · · · , xn }.
El problema de Lagrange se resuelve combinando los polinomios de Lagrange
n
X
ψ (x) = f (x0 ) L0n (x) + f (x1 ) L1n (x) + · · · + f (xn ) Lnn (x) = f (xk ) Lkn (x)
k=0
(x − (−1)) (x − 1) (x − 2)
L03 (x) =
(−2 − (−1)) (−2 − 1) (−2 − 2)
x3 − 2x2 − x + 2
L03 (x) =
−12
(x − (−2)) (x − 1) (x − 2)
L13 (x) =
(−1 − (−2)) (−1 − 1) (−1 − 2)
x3 − x2 − 4x + 4
L13 (x) =
6
(x − (−2)) (x − (−1)) (x − 2)
L23 (x) =
(1 − (−2)) (1 − (−1)) (1 − 2)
x3 + x2 − 4x − 4
L23 (x) =
−6
(x − (−2)) (x − (−1)) (x − 1)
L33 (x) =
(2 − (−2)) (2 − (−1)) (2 − 1)
x3 + 2x2 − x − 2
L33 (x) =
12
ψ (x) = − 13 0 1 2 3 3
5 L3 (x) − 3L3 (x) − 2L3 (x) + 5 L3 (x) =
1 3
10 x + 21 x2 + 25 x − 3
Representación
7
Polinomios de Lagrange (3)
Ventajas:
Fáciles de calcular
Inconvenientes
Si se añade, elimina o modica algún punto del soporte, cambian todos los polinomios de Lagrange y es
necesario repetir los cálculos.
ψ (x) = Pn (x)
puede ser mucho más simple que L0n (x) , L1n (x) , L2n (x) · · · , Lnn (x)
◦ Datos: (xk , f (xk )) = {(−2, −5) , (−1, −3) , (1, 1) , (2, 3)}
◦ Soporte: S = {−2, −1, 1, 2} (conocido)
◦ ψ (x) = −5L03 (x) − 3L13 (x) + L23 (x) + 3L33 (x) = 2x − 1
Propiedades:
n
X
Suma: Lkn (x) = 1
k=0
◦ El polinomio único de menor grado que vale uno en todos los puntos del soporte es la función constante
unidad.
Expresión alternativa:
n
Y
n πn+1 (x) = (x − xj )
Y (x − xj ) πn+1 (x)
◦ Lkn (x) = = 0 donde j=0
j=0
(xk − xj ) (x − xj ) πn+1 (xj ) π 0 (x ) = d Π
j dx n+1 (x) x=x
n+1
j6=k j
Derivación:
n n n n n
d k Y 1 d Y Y 1 X Y
dx Ln (x) = (x − xj ) = (x − xj )
x − x dx x − x
j=0 k j j=0 j=0 k j i=0 j=0
j6=k j6=k j6=k i6=k j6=k,i
n
d k
X 1
◦ x = xk → dx Ln (x)x=x =
k
i=0
xk − xi
i6=k
n
d k
1 Y xi − xj
◦ x = xi → dx Ln (x)x=xi =
xk − xi j=0 xk − xj
j6=k,i
2.3. Dif.Divididas
8
Sn−1 = {x0 , x1 , · · · , xn−1 } → ψ (x) = Pn−1 (x).
Sn = {x0 , x1 , · · · , xn−1 , xn } → ψ (x) = Pn (x).
Sea Qn (x) = Pn (x) − Pn−1 (x) (grado ≤ n)
Qn (x) = an (x − x0 ) (x − x1 ) (x − x2 ) · · · (x − xn−1 )
n−1
Y
Pn (x) = Pn−1 (x) + an πn (x) donde πn (x) = (x − xk )
k=0
Se necesita determinar los valores de los coecientes {a1 , a2 , · · · , an−1 , an }, denominados diferencias divididas y
representados por ak = f [x0 , x1 , · · · , xk ]
Pn (x) = f [x0 ]+f [x0 , x1 ] (x − x0 )+f [x0 , x1 , x2 ] (x − x0 ) (x − x1 )+· · ·+f [x0 , x1 , · · · , xn ] (x − x0 ) (x − x1 ) · · · (x − xn−1 )
n
X i−1
Y
Pn (x) = f [x0 , · · · , xi ] (x − xk )
i=0 k=0
Propiedad 1
k
X f (xi )
Los coecientes de las D.D. se obtienen como f [x0 , x1 , · · · , xk ] = k
i=0
Y
(xi − xj )
j=0
j6=i
9
Propiedad 2
f (n) (ξ)
Sea f (x) ∈ C n ([a, b]) y S = {x0 , x1 , · · · , xn } ∈ [a, b], entonces f [x0 , x1 , · · · , xn ] = , mı́n (xk ) ≤ ξ ≤ máx (xk )
n! k k
(demostración 69 en la página 31)
f [x0 ] = f (x0 )
f [x0 , · · · , xn−1 ] − f [x1 , · · · , xn ]
f [x0 , x1 , · · · , xn ] =
x0 − xn
f (x0 )−f (x1 ) f [x0 ,x1 ]−f [x1 ,x2 ] f [x0 ,x1 ,x2 ]−f [x1 ,x2 ,x3 ]
f [x0 , x1 ] = x0 −x1 , f [x0 , x1 , x2 ] = x0 −x2 , f [x0 , x1 , x2 , x3 ] = x0 −x3
Expresiones de P3 (x)
= − 13 2 1 3
5 + (x + 2) − 5 + (x + 1) + (x − 1) 10 10
= 35 + (x − 2) 13 7 1
5 + (x − 1) 10 + (x + 1) 10
= −2 + (x − 1) 12 + (x + 1) 103 1
+ (x + 2) 10
···
1 3
= 10 x + 21 x2 + 25 x − 3
10
Diferencias divididas de Newton (4)
Forma de Newton para S = {x0 , x1 , · · · , xn−1 , xn }
n
X Yn
Pn (x) = f [x0 , · · · , xj ] πj (x) con πn+1 (x) = (x − xk )
j=0 k=0
Ventajas
◦ {(−2,−5) , (−1,
Datos:
−3) , (1,
1) , (2,33)}
x o x0 o x1 o x2 o x
−2 −5
−1 −3 2
1 1 2 0
2 3 2 0 0
◦ Expresión: P3 (x) = −5 + 2 (x + 2) = 2x − 1
Inconvenientes
Diferencias nitas
Considerando puntos equiespaciados xk = x0 + k · h de denen:
2.4. Error
11
Condiciones para seleccionar el orden de los puntos de interpolación
Los puntos deben hacer mínima la cota de error; habitualmente se seleccionan dependiendo de su distancia
a z.
Nota: aumentar los puntos de interpolación no siempre disminuye el error.
Error de interpolación
Interpolación mediante diferencias divididas
Se realizan ensayos para determinar la relación entre esfuerzo (fuerza aplicada al material por unidad de área) y
deformación (deexión por unidad de longitud) en el mástil de un velero construido con una nueva aleación de aluminio.
2900Kg
Punto de interpolación: z= 5.65cm2 ' 513.27Kg/cm2
Tabla:
σ δ (σ)
506 2.0
527 4.5 1.190 · 10−1
562 6.0 4.286 · 10−2 −1.361 · 10−3
365 1.3 2.386 · 10−2 1.173 · 10−4 −1.048 · 10−5
703 8.5 2.130 · 10−2 −1.813 · 10−5 −7.694 · 10−7 4.930 · 10−8
126 0.5 1.386 · 10−2 3.112 · 10−5 −1.129 · 10−7 −1.637 · 10−9 1.340 · 10−10
Cálculos
Soporte Pn (σ) Pn (z)
{506, 527} P1 (σ) = 2.0 + 1.190 · 10−1 Π1 (σ) 2.86599241
{· · · , 562} P2 (σ) = P1 (σ) − 1.361 · 10−3 Π2 (σ) 3.00183608
{· · · , 365} P3 (σ) = P2 (σ) − 1.048 · 10−5 Π3 (σ) 2.95084573
{· · · , 703} P4 (σ) = P3 (σ) + 4.930 · 10−8 Π4 (σ) 2.98640702
{· · · , 126} P5 (σ) = P4 (σ) + 1.340 · 10−10 Π5 (σ) 2.96806249
12
Representación
|(x + 2) (x + 1) (x − 1) (x − xn )|
a) Cota: máx |f (x) − Pn (x)| ≤ máx f (n+1) (x) · máx
x∈[a,b] x∈[a,b] x∈[a,b] 4!
4
≤ 122 · ' 20.33
4!
Representación: (cotas muy conservadoras)
13
Interpolación lineal:
(2) 2
· máx |π1 (x)| = M2 h
f (x)
máx |f (x) − P1 (x)| ≤ máx
x∈[x0 ,x1 ] x∈[x0 ,x1 ] (2)! x∈[x0 ,x1 ] 2! 4
Interpolación cuadrática:
(3) 3
· máx |π2 (x)| = M3 2h
f (x)
máx |f (x) − P2 (x)| ≤ máx √
x∈[x0 ,x2 ] x∈[x0 ,x2 ] (3)! x∈[x0 ,x2 ] 3! 3 3
Interpolación cúbica:
(4)
f (x) M
máx |f (x) − P3 (x)| ≤ máx · máx |π3 (x)| = 4 h4
x∈[x0 ,x3 ] x∈[x0 ,x3 ] (4)! x∈[x0 ,x3 ] 4!
Interpolación con polinomio de cuarto grado:
(5) √ √ p√
5 − 10 + 5 58
f (x) M 145 + 15 5 3.63
máx |f (x) − P4 (x)| ≤ máx · máx |π4 (x)| = h ' M5 h5
x∈[x0 ,x4 ] x∈[x0 ,x4 ] (5)! x∈[x0 ,x4 ] 5! 50 5!
1. ¾Cuántos puntos son necesarios para que al interpolar linealmente entre dos valores consecutivos el error entre la
función y el interpolante no supere la media unidad?
f 00 (x) = −2ex sin x. Extremos cuandof 000 (x) = 2ex (sin x + cos x) = 0
√
f (x) = 2e 34 π
3 (2)
Puntos extremales:
4 π, −π, π ⇒ máx x∈[−π,π]
c) Número de puntos
h2 √ 3 h2 2π
máx f (2) (x) · = 2e 4 π < 0.5 → h < 0.5178 → N > h + 1 = 14
x∈[x0 ,x1 ] 8 8
2. ¾Y si se utiliza una interpolación con tres puntos consecutivos?
f 000 (x) = 2ex (sin x + cos x). Extremos cuando f iv (x) = −4ex cos x = 0
π π (3)
Puntos extremales: − , , −π, π ⇒ máx f (x) = 2eπ
2 2 x∈[−π,π]
c) Número de puntos
h3 h3 2π
máx f (3) (x) · √ = 2eπ √ < 0.5 → h < 0.5522 → N > h + 1 = 13
x∈[x0 ,x1 ] 9 3 9 3
3. ¾Cual es el máximo error cometido al utilizar 5 puntos equiespaciados?
14
a) Expresión del error
5
3.6314h
máx |f (x) − P4 (x)| ≤ máx f (5) (x) ·
x∈[x0 ,x4 ] x∈[−π,π] 5!
1) Acotación de la derivada
f (5) (x) = 4ex (sin x − cos x). Extremos cuando (6)
(5) f = 8e
x
sin x = 0
π
Puntos extremales: {0, −π, π} ⇒ máx f (x) = 4e
x∈[−π,π]
2) Error
2π 5
3.6314 4
máx |f (x) − P4 (x)| ≤ 4 · < 26.7873
x∈[−π,π] 5!
4. ¾Y si se toman 9?
Representación: 5 y 9 puntos
15
2.5. Chebyshev
2. Un estudio de πn+1 (x) (ver 73 en la página 34) muestra que con un soporte equiespaciado, los máximos
decrecen cuando se interpola cerca del centro del intervalo.
La elección óptima son las raíces ξk de los polinomios de Chebishev, denidos en el intervalo [−1, 1].
ςk = cos 2k π
n 2 , k = 0, 1, 2, · · · n ςk ∈ [−1, 1]
3. Las n raíces de Tn (x) son (ver 74 en la página 34)
ξk = cos 2k−1 π
n 2 , k = 1, 2, · · · n ξk ∈ [−1, 1]
4. El coeciente de mayor grado de Tn (x) , n > 0 es 2n−1 (ver 74 en la página 34)
Los polinomios de mónicos son aquellos en que el coeciente de mayor grado es uno.
Los polinomios de Chebishev mónicos se denen como T̄n (x) = 21−n Tn (x)
Teorema
12. El polinomio mónico de Chebishev T̄n (x) es el polinomio mónico de grado n de menor norma uniforme
y
T̄n (x)
∞ = 21−n . (ver 74 en la página 34)
Corolario 13. Seaf (x) ∈ C ([a, b]), Pn (x) el polinomio de interpolación en {xk } y ξk las raíces de T̄n+1 (x), entonces
16
Mn+1
1. Si [a, b] = [1, 1] y xk = ξk , kf (x) − Pn (x)k∞ ≤ con Mn+1 = máx f (n+1) (x) (ver 74 en la
2n (n + 1)! x∈[−1,1]
página 34)
!n+1
Mn+1 b−a
2. Si xk = , kf (x) − Pn (x)k∞ con Mn+1 = máx f (n+1) (x) (ver 74 en la
a+b b−a
2 + 2 ξk ≤ n
2 (n + 1)! 2 x∈[a,b]
página 34)
Otras propiedades:
1
1. Forman una familia de polinomios ortogonales en [−1, 1] con ω (x) = √ .
1 − x2
R1 0 n 6= m
−1
ω (x) Tn (x) Tm (x) dx = π n=0
1
2π n 6= 0
2. Se relacionan con la fórmula de De Moivre.
1 − x2 y 00 − xy 0 + n2 y = 0
1 − x2 y 00 − 3xy 0 + n (n + 2) y = 0
3. Pb.Hermite
Interpolación polinómica
Soporte: X = {x0 , x1 , · · · , xn }
Base: B = 1, x, x2 · · ·
Teorema 14. Existe un único interpolante Pm (x) con m ≤ 2n+1 que resuelve el problema de interpolación de Hermite
si y solo si todos los puntos del soporte son diferentes.
17
3.1. Pol.Hermite
Polinomios de Hermite
Se obtienen a partir de los polinomios de Lagrange
2
φi (x) = (α + βx) Lin (x)
Son de dos clases
Hm
i
(x) interpola la función
Hm (xj ) = δij y dx
i d i
Hm (x)x=xj = 0
n
i
X 1
i 2
Hm (x) = 1 − 2 (x − xi ) L (x)
xi − xk n
k=0
k 6= i
H̃m
i
(x) interpola la derivada.
i
H̃m (xj ) = 0 y
d i
dx H̃m (x) = δij
x=xj
i
2
H̃m (x) = (x − xi ) Lin (x)
Ventajas
n o
i
Hm i
(x) , H̃m (x) fáciles de calcular
n o
Hm
i i
(x) , H̃m (x) independientes de f (x)
Inconvenientes
n o
i
Hm i
(x) , H̃m (x) cambian si varía S
n o
P2n+1 (x) puede ser más simple que
i
Hm i
(x) , H̃m (x)
3.2. DD Gener.
Cada punto del soporte se repite consecutivamente tantas veces como condiciones deba vericar .
Propiedad
Los coecientes de las D.D. generalizadas se obtienen como
18
Diferencias divididas generalizadas
Ejemplo
Un vehículo recorre un circuito de 6.5 Km. Se le toma el tiempo y la velocidad cada vez que pasa por meta:
Vuelta 0 1 2
x f [◦]
z0 = 0 f (z0 ) = 0
z1 = 0 f (z1 ) = 0 f [z0 , z1 ] = f 0 (z0 )
z2 = 125 f (z2 ) = 6500 f [z1 , z2 ] f [z0 , . . . , z2 ]
z3 = 125 f (z3 ) = 6500 f [z2 , z3 ] = f 0 (z2 ) f [z1 , . . . , z3 ] f [z0 , . . . , z3 ]
z4 = 240 f (z4 ) = 13000 f [z3 , z4 ] f [z2 , . . . , z4 ] f [z1 , . . . , z4 ] f [z0 , . . . , z4 ]
z5 = 240 f (z5 ) = 13000 f [z4 , z5 ] = f 0 (z4 ) f [z3 , . . . , z5 ] f [z2 , . . . , z5 ] f [z1 , . . . , z5 ] f [z0 , . . . , z5 ]
x f [◦]
0 0
0 0 0.000
125 6500 52.000 0.4160
125 6500 65.000 0.1040 −2.493 · 10−3
240 13000 56.581 −0.0737 −0.741 · 10−3 7.315 · 10−6
240 13000 70.000 0.1172 1.660 · 10−3 −10.003 · 10−6 11.202 · 10−9
Interpolante
2 2
P5 (x) = 0+0x+0.4160x2 −2.493·10−3 x2 (x − 125)+7.3145·10−6 x2 (x − 125) +11.202·10−9 x2 (x − 125) (x − 240)
3.3. Error.
4. Segmentaria
Denición k−1
El interpolante segmentario de grado m es una función S (x) = Pm (x) ∀x ∈ (xk−1 , xk ] donde
k
1. Pm (x) es un polinomio de grado menor o igual que m
k−1 k
2. S (xk ) = Pm (xk ) = Pm (xk ) = f (xk ) k = 0, 1, . . . , n
3. S (x) ∈ C m−1 ([a, b]) (derivadas continuas)
19
Interpolación segmentaria (2)
Incógnitas Condiciones
a)
00 00 00 00
Parabólica: S (x0 ) = S (x1 ) y/o S (xn−1 ) = S (xn )
b)
000 000 000 000
Cúbica: S (x0 ) = S (x1 ) y/o S (xn−1 ) = S (xn )
4. Periódica: S (j) (a) = S (j) (b) , j = 0, 1, . . . , m − 1
5. Otras
4. Selección del intervalo al que pertenece el punto a interpolar y uso del polinomio correspondiente.
4.1. Lineal
Procedimiento: se utiliza diferencias divididas, pero calculando sólo hasta la segunda columna (polinomios de
primer grado).
20
Interpolación segmentaria lineal
(2)
−2, − 13 3
Datos: (xk , f (xk )) = 5 , (−1, −3) , (1, −2) , 2, 5
x f [◦] f [◦, ◦]
13
−2 5
( 13
5 )−(−3) 2
−1 −3 −2−(−1) = − 5
(−3)−(−2) 1
1 −2 −1−(1) = 2
3 (−2)−( 35 )
2 5 1−(2) = 13
5
Intervalos e interpolantes
Representación
4.2. Cuadrática
Hay una incógnita más que ecuaciones: se debe añadir una condición
Su uso es escaso.
bk+1 − bk
ak = k = 0, 1, 2, · · · , n − 1 con hk = xk+1 − xk
2hk
ck = f (xk−1 ) k = 0, 1, 2, · · · , n − 1
21
El sistema de ecuaciones se reduce a
Matricialmente: Ax = B
1 1 0 0 ··· 0 0 b0 f [x1 , x0 ]
0 1 1 0 ··· 0 0 b1 f [x2 , x1 ]
. . = 2
.. .. .. .. .. .
. . .
.
.
. . . . . . . . .
0 0 0 ··· 0 1 1 bn f [xn , xn−1 ]
b1 = ma
Sistema:
1
1 0 0 ··· 0 0
2 ma
b 0
1 1 0 ··· 0 0
f [x 1 , x0 ]
b1
0 1 1 ··· 0 0 f [x2 , x1 ]
. = 2
. ..
. . . .. . .
. . . . . .
. . . . . . .
bn
0 0 0 ··· 1 1 f [xn , xn−1 ]
bn = m b
Sistema:
1 1 0 ··· 0 0 f [x1 , x0 ]
b 0
0 1 1 ··· 0 0
b
f [x2 , x1 ]
. 1
.. .. .. .. . .
. . . = 2 .
. . . . . . .
..
0 0 0 ··· 1 1 f [xn , xn−1 ]
bn 1
0 0 0 ··· 0 1 2 mb
a) Lineal
Extremo izquierdo
d 0
d 1
Condición:
dx P2 (x) x=x0 = dx P2 (x)x=x1
Ecuación: b0 − b1 = 0
Extremo derecho
n−1 n−1
d
d
Condición:
dx P2 (x)x=xn−1 = dx P2 (x)x=xn
Ecuación: −bn−1 + bn = 0
b) Cuadrática
Extremo izquierdo
d2 0 d2 1
Condición:
dx2 P2 (x) = dx2 P2 (x)
x=x0 x=x1
Ecuación: −h1 b0 + (h0 + h1 ) b1 − h0 b2 = 0
22
Extremo derecho
d2 n−2 d2 n−1
Condición:
dx2 P2 (x) = dx2 P2 (x)
x=xn−1 x=xn
Ecuación: −hn−1 bn−2 + (hn−2 + hn−1 ) bn−1 − hn−2 bn = 0
n−1
d 0
d
4. Comportamiento periódico:
dx P2 (x) x=x = dx P2 (x)x=x
0 n
Ecuaciones:
−b0 + bn = 0
5. etc.
Representación
4.3. Cúbica
23
00
4. Continuidad
S en los n−1 puntos interiores:
2
d k d2 k+1
dx2 P3 (x) = dx2 P3 (x) k = 0, 1, · · · , n − 2
x=xk+1 x=xk+1
Hay dos incógnitas más que ecuaciones: se deben añadir dos condiciones
bk+1 − bk
ak = , k = 0, 1, · · · , n − 1
3hk
1
ck = f [xk+1 , xk ] − 3 (bk+1 + 2bk ) hk , k = 0, 1, · · · , n − 1
dk = f (xk ) , k = 1, 2, · · · , n
y el sistema de ecuaciones se reduce a
b1 = 21 α
bn+1 = 12 β
Sistema:
1 0 0 0 ··· 0 0 0
h0 2 (h0 + h1 ) h1
0 h1 2 (h1 + h2 ) h2 ··· 0 0 0
A= .
. . . .. . . .
.. . . . . . .
. . . . . . .
0 0 0 0 ··· hn−2 2 (hn−2 + hn−1 ) hn−1
0 0 0 0 ··· 0 0 1
24
1
6α
f [x1 , x2 ] − f [x0 , x1 ]
f [x2 , x3 ] − f [x1 , x2 ]
B = 3
.
.
.
f [xn−1 , xn ] − f [xn−2 , xn−1 ]
1
6β
2h0 b0 + h0 b1 = 3 (f [x1 , x0 ] − ma )
hn−1 bn−1 + 2hn−1 bn = 3 (mb − f [xn−1 , xn ])
Sistema:
2h0 h0 0 0 ··· 0 0 0
h0 2 (h0 + h1 ) h1
0 h1 2 (h1 + h2 ) h2 ··· 0 0 0
A=
. . . . .. . . .
. . . . . . .
. . . . . . . .
0 0 0 0 ··· hn−2 2 (hn−2 + hn−1 ) hn−1
0 0 0 0 ··· 0 hn−1 2hn−1
f [x0 , x1 ] − ma
f [x 1 , x2 ] − f [x0 , x1 ]
.
B = 3 .
.
f [xn−1 , xn ] − f [xn−2 , xn−1 ]
mb − f [xn−1 , xn ]
3. Aproximación polinomial en los extremos:
b1 − b2 = 0
−bn−1 + bn = 0
c) Cúbica: S 000 (x0 ) = S 000 (x1 ) =, S 000 (xn−1 ) = S 000 (xn )
Ecuaciones:
−h1 b0 + (h0 + h1 ) b1 − h0 b2 = 0
−hn−1 bn−2 + (hn−2 + hn−1 ) bn−1 − hn−2 bn = 0
4. Comportamiento periódico: S 0 (x0 ) = S 0 (xn ) =, S 00 (x0 ) = S 00 (xn )
Ecuaciones:
Interpolación segmentaria
cúbica
(5)
Sean M= máx f (4) (x) y h = máx (hk ), el error de la interpolación cúbica segmentaria está acotado por (ver
x∈[x0 ,xn ] k
79 en la página 38)
25
2. Sujeta: S (k−1) (a) = ma , S (k−1) (b) = mb
máx f (k) (x) − S (k) (x) ≤ αk M h4−k , k = 0, 1, 2
x∈[x0 ,xn ]
5 1 3
con α0 = 384 α1 = 24 α2 = 8
x a b c d
À [−2, −1] 0.0375 0 -0.4375 -2.6
[−1, 1] 0.15 0.1125 -0.325 -3
[1, 2] -0.3375 1.0125 1.925 -2
Á [−2, −1] 0.47714286 -1.19714286 0.32 -2.6
[−1, 1] 0.16857143 0.23428571 -0.64285714 -3
[1, 2] -0.96285714 1.24571429 2.31714286 -2
Âb [−2, −1] 0 0.14 -0.54 -2.6
[−1, 1] 0.12 0.14 -0.26 -3
[1, 2] 0 0.86 1.74 -2
Âc [−2, −1] 0.1 -0.1 -0.4 -2.6
[−1, 1] 0.1 0.2 -0.3 -3
[1, 2] 0.1 0.8 1.7 -2
Representación
5. Paramétrica
Interpolación paramétrica
En ocasiones debemos interpolar puntos de la forma {(xi, yi ) , i = 0, 1, . . . , n} en que no podemos obtener una
función que exprese y en función de x.
(puntos sobre una curva cerrada, se repiten puntos del soporte, etc)
La solución está en buscar una curva en el plano mediante una expresión paramétrica
Así se relaciona con el problema del viajante (TSP), que indica el orden de recorrido.
26
Interpolación paramétrica
Ejemplo 9 puntos equiespaciados sobre una circunferencia .
6. Bidimensional
Interpolación n-dimensional
Al aumentar la dimensión del espacio, se produce la maldición de la dimensionalidad
En la siguiente tabla se muestra, a modo de ejemplo, como el número de datos necesarios al interpolar con un
polinomio de grado n en un espacio de dimensión m
m=2 m=3 m=4 m=5 m=6 m=7 ···
n=1 2 3 4 5 6 7 ···
n=2 3 6 10 15 21 28 ···
n=3 4 10 20 35 56 84 ···
..
n=4 5 15 35 70 126 210 .
Interpolación de supercies
Datos sobre una cuadrícula o mallado regular (Generalización de 1 dim.)
Bilineal
Bicúbica
Bisplines
27
Datos sin una cuadrícula o con mallado irregular
Muchos datos
Triangularización de Delaunay
Pocos datos
Krigeaje
Inverso de la distancia
Interpolación bilineal
Denición
Dada una malla, y sea el cuadrilátero denido por los puntos [xi−1 , xi ] × [yj−1 , yj ], se dene en ella la función bilineal
mediante
f (xi−1 , yj−1 ) (xi − x) (yj − y) +
1 f (xi , yj−1 ) (x − xi−1 ) (yj − y) +
φ (x, y) ≈
(xi − xi−1 ) (yj − yj−1 ) f (xi−1 , yj ) (xi − x) (y − yj−1 ) +
f (xi , yi ) (x − xi−1 ) (y − yj−1 )
Programación
Interpolación bicúbica
Calcula un polinomio de tercer grado en cada variables para cada cuadrilátero
[xi−1 , xi ] ×[yj−1 , yj ] de la malla.
2 2 3 2 2 3 3 2 2 3
φ (x, y) ≈ a00 +(a
10 x + a01 y)+ a20 x + a11 xy + a02 y + a30 x + a21 x y + a12 xy + a 03 y + a31 x y + a 22 x y + a13 xy +
3 2 2 3 3 3
a32 x y + a23 x y + a33 x y
Incógnitas (coecientes): 16
Condiciones:
28
Programación
Triangulación de Delaunay
Una triangulación de Delaunay es una red de triángulos conexa y convexa que cumple la condición de Delaunay.
La condición establece que la circunferencia circunscrita de cada triángulo de la red no debe contener ningún
vértice de otro triángulo.
Se le denomina así por el matemático ruso Borís Nikolaevich Delone quien lo ideó en 1934.
La triangulación se usa como soporte para denir funciones de interpolación sobre los triángulos.
Programación
Krigeaje
Desarrollada inicialmente por Danie G. Krige a partir del análisis de regresión entre muestras y bloques de mena.
Puede ser entendido como una predicción lineal o una forma de inferencia bayesiana.
Parte del principio que puntos próximos en el espacio tienden a tener valores más parecidos que los puntos más
distantes.
Es lineal porque sus estimaciones son combinaciones lineales ponderadas de los datos existentes.
29
Es insesgado porque procura que la media de los errores sea nula.
Es el mejor (óptimo) porque los errores de estimación tienen una variancia (variancia de estimación) mínima.
Inversa de la distancia
El interpolante se obtiene ponderando los valores en los puntos conocidos de forma inversa a la distancia.
Un caso particular se obtiene cuando la ponderación se realiza mediante funciones gausianas denidas en el
soporte.
Considera en cada nodo Pk una distribución normal bidimensional centrada de varianza {σx , σy }k .
n q
(x−xk )2 (y−yk )2
X
ψ (x, y) = αk e−dk . siendo dk (x, y) = σx − σy
k=0
La varianza se presuponen, para obtener una supercie suave.
Los coecientes se calculan exigiendo que la supercie pase por los puntos conocidos:ψ (Pk ) = zk .
Programación
7. Bibliografía
8. Demostraciones
8.1. Lagrange
Problema de Lagrange
Unicidad del polinomio de interpolación de Lagrange (volver 3 en la página 5)
Existe un único interpolante Pm (x) con m ≤ n que resuelve el problema de interpolación de Lagrange de f (x)
si y solo si todos los puntos del soporte S son diferentes.
Dado el soporte S = {x0 , x1 , · · · , xn−1 , xn }, se considera que existen dos polinomios de interpolación diferentes
Pn (x) y Qn (x) tales quePn (xk ) = Qn (xk ) = f (xk ) , k = 0, 1, . . . , n.
Deniendo Rn (x) = Pn (x) − Qn (x), Rn (xk ) = 0, k = 0, 1, . . . , n, luego S = {x0 , x1 , · · · , xn } son raíces de
Rn (x).
Rn (x) = γ (x − x0 ) (x − x1 ) · · · (x − xn ) que es un polinomio de grado n + 1.
Pero la diferencia de dos polinomios de grado n no puede ser de grado superior, luego γ = 0 → Rn (x) = 0 ⇒
Pn (x) = Qn (x).
c.q.d.
30
8.1.1. D.D.Newton
Diferencias divididas
(volver 17 en la página 9)
k
X f (xi )
f [x0 , x1 , · · · , xk ] = k
i=0
Y
(xi − xj )
j=0
j6=i
El polinomio de interpolación de grado mínimo de una función f (x) en el soporte S = {x0 , x1 , · · · , xn−1 , xn } es
único, aunque se pueda expresar de diferentes formas.
n
X n
Y
(F.Newton): Pn (x) = f [x0 , · · · , xj ] πj (x) donde πn+1 (x) = (x − xk )
j=0 k=0
Coeciente de xn : f [x0 , · · · , xn ]
n n
X Y (x − xk )
(F.Lagrange): Pn (x) = f (xi ) Lni (x) con Lni (x) =
i=0
(xi − xk )
k=0
k6=i
n
X
Coeciente de xn : f (xi ) coefn (Lni (x)) donde coefn (Lni (x)) representa el coeciente en xn de Lni (x).
i=0
n
Y 1
coefn (Lni (x)) =
(xi − xk )
k=0
k6=i
n n
X Y 1
Coeciente de xn : f (xi )
j=0
(xi − xk )
k=0
k6=i
n n
X Y 1
f [x0 , · · · , xn ] = f (xi )
i=0
(xi − xk )
k=0
k6=i
Diferencias divididas
f (n) (ξ)
f [x0 , x1 , · · · , xn ] = (volver 17 en la página 10)
n!
Pn (x) el polinomio de interpolación de f (x) ∈ C n ([a, b]) en el soporte S = {x0 , x1 , · · · , xn−1 , xn } ∈ [a, b].
Sea
Diferencias divididas
Dado S = {x0 , x1 , · · · , xn−1 , xn } y P (x) = α (x − x0 ) (x − x1 ) · · · (x − xn ) (volver 17)
Coef Términos
xn+1 α
1
xn α (−1) (x0 + x1 + · · · + xn−1 + xn )
2
xn−1 α (−1) (x0 x1 + x0 x2 + · · · + x0 xn + x1 x2 + · · · + xn−1 xn )
. .
. .
. .
k
xn+1−k α (−1) (x0 . . . xk−1 + x1 . . . xk + · · · + xn−k+1 . . . xn )
. .
. .
. .
n
x1 α (−1) (x1 x2 · · · xn−1 xn + x0 x2 · · · xn−1 xn + · · · + x0 x1 x2 · · · xn−1 )
n+1
x0 α (−1) (x0 · x1 · x2 · · · xn−1 · xn )
n+1−k kP Q k
Genérico: x → α (−1) Cn+1
31
Ejemplo: P4 (x) = (x − 1) (x − 2) (x − 3) (x − 4) = x4 − 10x3 + 35x2 − 50x + 24
Gr It. Términos
4 C40 1
1
3 C41 = 4 (−1) (1 + 2 + 3 + 4)
2
2 C42 = 6 (−1) (1 · (2 + 3 + 4) + 2 · (3 + 4) + 3 · 4)
3
1 C43 = 4 (−1) (1 · 2 · 3 + 1 · 2 · 4 + 1 · 3 · 4 + 2 · 3 · 4)
4
0 C44 = 1 (−1) (1 · 2 · 3 · 4)
El polinomio de interpolación de grado mínimo de una función f (x) en el soporte S = {x0 , x1 , · · · , xn−1 , xn } es
único, aunque se pueda expresar de diferentes formas
◦ f [x0 , x1 , · · · , xn−1 ]+f [x0 , · · · , xn ](−x0 − x1 − . . . xn−1 ) = f [xn , xn−1 , · · · , x1 ]+f [x0 , · · · , xn ] (−xn − xn−1 − . . .
◦ f [x0 , · · · , xn ] ((xn + xn−1 + . . . x1 ) − (x0 + x1 + . . . xn−1 )) = f [xn , xn−1 , · · · , x1 ] − f [x0 , x1 , · · · , xn−1 ]
f [xn ,xn−1 ,··· ,x1 ]−f [x0 ,x1 ,··· ,xn−1 ]
◦ f [x0 , · · · , xn ] = xn −x01
32
n
X n−i n
4n fk = (−1) fk+i
i
i=0
1
X 1−i 1 1 1 1−i 1
(−1) fk+i = (−1) fk+i + (−1) fk+i = f (xk+1 ) − f (xk ) = 4fk
i 0 i
i=0
n
X n−i n
Inducción: supuesto
n
4 fk = (−1) fk+i
i
i=0
n n
n+1 n n nX X
n−i n−i n
4 fk = 4 fk+1 − 4 fk = (−1) fk+1+i − (−1) fk+i
i i
i=0 i=0
n−1 n
n−n n X n−i n X n−i+1 n n n
= (−1) fk+1+n + (−1) fk+1+i + (−1) fk+i − (−1) fk
n i i 0
i=0 i=1
n
X n−i−1 n n−i+1 n n+1 n+1
= fk+1+n + (−1) fk+i + (−1) fk+i + (−1) fk
i−1 i 0
i=1
n
X n−i+1 n+1 n+1 n+1
= fk+1+n + (−1) fk+i + (−1) fk
i 0
i=1
n+1
X n+1−i n+1
= (−1) fk+i c.q.d.
i
i=0
n
n
X n−i n
∇ fk = (−1) fk−n+i
i
i=0
n
X n−i n−k
∇n fk = 4n fk−n = (−1) fk−n+i c.q.d.
i
i=0
8.1.2. Error
Problema de Lagrange
Sean f ∈ C n+1 ([a, b]) , S = {x0 , x1 , · · · , xn } ∈ [a, b] y Pn (x) el polinomio de interpolación de f (x) en S , entonces
(n+1) (x − x0 ) (x − x1 ) · · · (x − xn )
para cualquier x ∈ [a, b] existe ξx ∈ [a, b] tal que f (x) − Pn (x) = f (ξx )
(n + 1)!
Sea Pn (x) el polinomio de interpolación de f (x) en S = {x0 , x1 , · · · , xn } ∈ [a, b] y x ∈ [a, b], se dene
n
Y (t − xk )
g (t) = (f (t) − Pn (t)) − (f (x) − Pn (x))
(x − xk )
k=0
g (t) se anula en n+2 puntos, y aplicando el T.V.M. generalizado ∃ξ ∈ [a, b] se tiene que
" n
#
d(n+1) Y (x − xk )
g (n+1) (ξ) = 0 = (f (x) − Pn (x)) − (f (x) − Pn (x))
dt(n+1) k=0
(x − xk )
x=ξ
33
n
Y 1
0 = f (n+1) (ξ) − (f (x) − Pn (x)) (n + 1)!
(x − xk )
k=0
n
f (n+1) (ξ) Y
f (x) − Pn (x) = (x − xk ) c.q.d.
(n + 1)!
k=0
8.1.3. Chebishev
Polinomio producto πn+1 (x)
Recursividad: Tn+1 (x) = 2xTn (x) − Tn−1 (x) (volver 2 en la página 16)
Tn+1 (x) + Tn−1 (x) = 2 cos (nθ) cos (θ) = 2xTn (x) c.q.d.
2k π
Extremos: ςk = cos
n 2 , k = 0, 1, 2, · · · n ςk ∈ [−1, 1] (volver 2 en la página 16)
2k−1 π
Raíces: ςk = cos n 2 , k = 1, 2, · · · n ςk ∈ [−1, 1] (volver 3 en la página 16)
1 1
2k π
En los ςk = cos n 2 , k = 0, 1, 2, · · · n, extremos de T̄n (x) se tiene que T̄n (ςk ) = Tn (ςk ) = ±
2n−1 2n−1
Se demuestra
por reducción al absurdo, suponiendo que existe Pn (x) ∈ P̄n (x) tal que kPn (x)k∞ <
T̄n (x)
∞
1
◦ |Pn (ςk )| < |Pn (ςk )| =
T̄n (x)
∞ =
2n−1
34
1
◦ Pn (ςk ) < T̄n (ςk ) = , k = 0, 2, 4, · · ·
2n−1
1
Pn (ςk ) > T̄n (ςk ) = − , k = 1, 3, 5, · · ·
2n−1
>0 k = 0, 2, 4, · · ·
◦ Deniendo ϕ (x) = T̄n (x)−Pn (x), se tiene que ϕ (ςk ) = es una función continua
<0 k = 1, 3, 5, · · ·
y grado (ϕ (x)) es n − 1.
◦ Aplicando Bolzano a los n intervalos donde cambia de signo, ϕ (x) tiene n raíces, luego es un polinomio
tal que grado (ϕ (x)) es n.
c.q.d.
(n+1)
f (x)
La cota del error de interpolación viene dada por máx |f (x) − Pn (x)| ≤ máx · máx |Πn+1 (x)|
x∈[a,b] x∈[a,b] (n + 1)! x∈[a,b]
Si xk = ξk y [a, b] = [−1, 1] se tiene que Πn+1 (x) = T̄n+1 (x), y el teorema 12 ha demostrado que
máx T̄n+1 (x) =
T̄n+1 (x)
∞ = 2−n c.q.d.
x∈[−1,1]
!n+1
Mn+1 b−a
2. kf (x) − Pn (x)k∞ ≤ n con Mn+1 = máx f (n+1) (x) (volver 1 en la página 17)
2 (n + 1)! 2 x∈[a,b]
n
Y
a+b b−a
En este caso Πn+1 (x) = (x − xk ) donde xk = 2 + 2 ξk .
k=0
a+b
Haciendo el cambio de variable x= + b−a
22 y se tiene que (x − xk ) = b−a
2 (y − ξk ), luego
n
b−a n+1 n+1
Y
(y − ξk ) = b−a
Πn+1 (x) = 2 2 T̄n+1 (x) c.q.d.
k=0
8.2. Hermite
8.3. Splines
2
P2k (x) = ak (x − xk ) + bk (x − xk ) + ck
d k
dx P2 (x) = 2ak (x − xk ) + bk
2
d k
dx2 P2 (x) = 2ak
k+1
d
d
dx P2k (x) x=xk+1
= dx P2 (x)x=x k = 0, 1, · · · , n − 2
k+1
(
d
dx P2k (x)x=x
= 2ak (xk+1 − xk ) + bk = 2ak hk + bk
d k+1
k+1 →
dx P2 (x) x=xk
= bk+1
bk+1 − bk
ak = , k = 0, 1, · · · , n − 1
2hk
35
ck = f (xk ) , k = 0, 1, · · · , n − 1
1. Sujeta/Natural si α = β = 0:
Extremo izquierdo Extremo derecho
n−1
d 0
d
dx P2 (x) x=x0
=α dx P2
(x)x=xn = β
2an−1 hn−1 + bn−1 = β
bn − bn−1
2 hn−1 + bn−1 = β
2hn−1
b0 = α bn = β
2. Lineal:
= d P n−1 (x)
d
dx P20 (x) x=x0 dx 2 x=xn → b0 = 2an−1 hn−1 + bn−1 →
bn − bn−1
b0 = 2 hn−1 + bn−1 → −b0 + bn = 0
2hn−1
3 2
P3k (x) = ak (x − xk ) + bk (x − xk ) + ck (x − xk ) + dk
2
d k
dx P3 (x) = 3ak (x − xk ) + 2bk (x − xk ) + ck
d2
k
dx2 P3 (x) = 6ak (x − xk ) + 2bk
3
d k
dx3 P3 (x) = 6ak
36
d2 k d2 k+1
dx2 P3 (x) = dx2 P3 (x) k = 0, 1, · · · , n − 2
x=xk+1 x=xk+1
d2 k
P (x) = 6ak (xk+1 − xk ) + 2bk = 6ak hk + 2bk
dx2 3
x=x
k+1 →
d2 k+1
dx2 P3 (x) = 2bk+1
x=xk+1
bk+1 − bk
ak = , k = 0, 1, · · · , n − 1
3hk
Pk (xk ) = f (xk ) , k = 0, 1, · · · , n − 1
3 2
ak (xk − xk ) + bk (xk − xk ) + ck (xk − xk ) + dk = f (xk ) →
dk = f (xk ) , k = 0, 1, · · · , n − 1
Pk (xk+1 ) = f (xk+1 ) , k = 0, 1, · · · , n − 1
3 2
ak (xk+1 − xk ) + bk (xk+1 − xk ) + ck (xk+1 − xk ) + dk = f (xk+1 )
ck hk = f (xk+1 ) − dk − ak h3k − bk h2k
Sustituyendo ak , dk por las relaciones de las condiciones À y Á,
f (xk+1 ) − f (xk ) bk+1 − bk 2
ck = − hk − bk hk →
hk 3hk
1
ck = f [xk+1 , xk ] − 3 (bk+1 + 2bk ) hk , k = 0, 1, · · · , n − 1
k+1
d
d
dx P3k (x) x=xk+1
= dx P3 (x)x=x k = 0, 1, · · · , n − 2
k+1
( d
dxP3k (x) x=x
= 3ak h2k + 2bk hk + ck
d k+1
k+1 →
dx P3 (x)x=x
k+1
= ck+1
3ak h2k + 2bk hk + ck = ck+1
Sustituyendo ak , ck por las relaciones de las condiciones À y Â
bk+1 − bk 2
3 hk + 2bk hk + f [xk+1 , xk ] − 13 (bk+1 + 2bk ) hk = f [xk+2 , xk+1 ] − 1
3 (bk+2 + 2bk+1 ) hk+1
3hk
5. Despejando se llega al sistema lineal
1. Sujeta:
(
d 0
dx P3 (x) x=x = α c0 = α
n−1
0 → →
d
dx P3 (x) x=x
=β 3an−1 h2n−1 + 2bn−1 hn−1 + cn−1 = β
n
(
f [x1 , x0 ] − 13 (b1 + 2b0 ) h0 = α
−bn−1 2 →
3 bn3h n−1
hn−1 + 2bn−1 hn−1 + f [xn , xn−1 ] − 1
3 (bn + 2bn−1 ) hn−1 = β
2h0 b0 + h0 b1 = 3 (f [x1 , x0 ] − α)
hn−1 bn−1 + 2hn−1 bn = 3 (β − f [xn , xn−1 ])
2. Natural:
d2 0
dx2 P3 (x) =α
x=x
2
0 bn+1 − bn →
d n−1
dx2 P3 (x) = β → 6an hn + 2bn = 6 hn + 2bn = β
x=xn 3hn
37
2b0 = α
2bn+1 = β
3. Lineal:
(
d 0 d
dx P3 (x) x=x
= dx P31 (x)x=x1
n−2
0 →
P3n−1 (x)x=xn
d d
dx P3 (x)x=xn−1 = dx
c0 = c1
→
3an−2 h2n−2 + 2bn−2 hn−2 + cn−2 = 3an−1 h2n−1 + 2bn−1 hn−1 + cn−1
f [x1 , x0 ] − 13 (b1 + 2b0 ) h0 = f [x2 , x1 ] − 13 (b2 + 2b1 ) h1
bn−1 − bn−2 2
3 hn−2 + 2bn−2 hn−2 + f [xn−1 , xn−2 ] − 31 (bn−1 + 2bn−2 ) hn−2 =
3hn−2 →
bn − bn−1 2 1
=3
hn−1 + 2bn−1 hn−1 + f [x2 , x1 ] − 3 (bn−1 + 2bn−2 ) hn−1
3hn−1
−2h0 b0 + (−h0 + 2h1 ) b1 + h1 b2 = 3 (f [x2 , x1 ] − f [x1 , x0 ])
hn−2 bn−2 + (2hn−2 − hn−1 ) bn−1 − 2hn−1 bn = 3 (f [xn , xn−1 ] − f [xn−1 , xn−2 ])
4. Cuadrática:
d2 d2
0 1
dx2 P3 (x) = dx2 P3 (x)
2b0 = 2b1
x=x x=x1
d2
0
d2
→ →
n−2 n−1 6an−2 hn−2 + 2bn−2 = 6an−1 hn−1 + 2bn−1
dx2 P3 (x) = P (x)
dx 2 3
x=xn−1 x=xn
2b0 = 2b1
bn−1 − bn−2 bn − bn−1 →
6 hn−2 + 2bn−2 = 6 hn−1 + 2bn−1
3hn−2 3hn−1
b0 − b1 = 0
−bn−1 + bn = 0
5. Cúbica:
b1 − b0 b2 − b1
d3 d3
0 1 =
dx3 P3 (x) = dx3 P3 (x)
6a0 = 6a1
x=x
0 x=x1
→ → 3h0 3h1 →
d3 n−2 d3 n−1 6an−2 = 6an−1 b − bn−2 bn − bn−1
dx3 P3 (x) = P (x) n−1
dx 3 3
=
x=xn−1 x=xn 3hn−2 3hn−1
−h1 b0 + (h0 + h1 ) b1 − h0 b2 = 0
−hn−1 bn−2 + (hn−2 + hn−1 ) bn−1 − hn−2 bn = 0
6. Periódica:
c.q.d.
38