Beruflich Dokumente
Kultur Dokumente
x : a x0 x1 ... xn 1 xn b
Con intervalos [x j x j 1 ] j=0,..,n-1
Definición: Una función S:[a b] Es decir spline cúbico, si
2
• S C [ a b] es decir, S es dos veces continuamente diferenciable en [a, b];
• S Es un polinomio cúbico en cada parte del intervalo [x j x j 1 ] 0 j n 1
S x j f x x j x j1 s j ( x) d j c j ( x x j ) b j ( x x j ) 2 a j ( x x j )3
Objetivo: Interpolación de datos x , f , 0 j n, con un spline cúbico
j j S,
Tal que:
S x j f x j , para 0 j n
Prof. Ing. R.M.G.J. 2
Interpolación con Spline Cúbico
Observaciones:
• Un spline cúbico posee 4n parámetros, los cuales son determinados como
siguen:
• Propiedades de la Interpolación
S x j 1 f j 1 y S x j f j para todo 1 j n;
• Continuidad en la derivada
S x j S j 1 x j para todo 1 j n 1;
• Continuidad en la segunda derivada
S x j S j1 x j para todo 1 j n 1;
Tal que: dj fj
f j 1 f j 2M j M j 1
cj hj
hj 6
Mj
bj
2 0 j n 1
M j 1 M j
aj
6h j
Donde h j x j 1 x j para todo
Los momentos M j S ( x j ) se obtienen a partir de un sistema tridiagonal.
M 1 ,..M n 1
2h0 M 0 h0 M 1 6 yx0 , x1 A
hn 1 M n 1 2hn 1 M n 6B yxn 1 , x n
Y llegamos a tener n+1 ecuaciones con n+1 incógnitas:
2h0 h0 0 0 M 0 yx0 , x1 A
h 2h0 h1 h1 M 1 yx , x f x , x
0 1 2 0 1
0 0 6
hn 2 2hn 2 hn 1 hn 1 M n 1 y x n 1 , x n f x n 2 , x n 1
0 0 hn1 2hn 1 M n B yx n 1 , x n
h0=0.5 h1=1
y[x0,x1]=-15/8 y[x1,x2]=0
A f 1 / 2 4 B f 1 1 / 2
2h0 h0 0 M 0 yx0 x1 A
h 2 h h h M 6 yx x yx x
0 0 1 1 1 1 2 0 1
0 h1 2h1 M 2 B yx1 x2
1 1 / 2 0 M 0 17 / 8 51 / 4
1 / 2 3 1 M 615 / 8 45 / 4
1
0 1 2 M 2 1 / 2 3
M 0 12 M 1 3 / 2 M 2 3 / 4
Prof. Ing. R.M.G.J. 15
Ejemplo Spline Forzado
M i 1 M i
a0 = -7/2 a1=-1/8 ai
6hi
b0 = 6 b1=3/4 Mi
bi
c0 = -4 c1=-5/8 2
d0 = 1 d1=1/16 M i 1 2M i
ci yxi xi 1 hi
6
d i yi
f’(-1/2)=-4 f ‘(1)=1/2
c)
S1(0.25)= -0.0923 f(0.25)= 0.0039 Error1= |f(0.25)- S1(0.25)| =0.088
S1(0.75)=-0.0449 f(0.75)= 0.0039 Error2= |f(0.75)- S1(0.75)| =0.041