From Wikipedia, the free encyclopedia
1.) Spline vs. Cubic Hermite
a.) Data:
s
(
0
)
=
1
{\displaystyle s(0)=1}
s
′
(
0
)
=
1
{\displaystyle s'(0)=1}
s
(
1
)
=
2
{\displaystyle s(1)=2}
s
′
(
1
)
=
y
{\displaystyle s'(1)=y}
s
(
2
)
=
2
{\displaystyle s(2)=2}
s
′
(
2
)
=
0
{\displaystyle s'(2)=0}
The coefficients of the piecewise cubic function on the first interval (0-1) are found by solving:
[
0
0
0
1
0
0
1
0
1
1
1
1
3
2
1
0
]
[
a
b
c
d
]
=
[
1
1
2
y
]
{\displaystyle {\begin{bmatrix}0&0&0&1\\0&0&1&0\\1&1&1&1\\3&2&1&0\\\end{bmatrix}}{\begin{bmatrix}a\\b\\c\\d\\\end{bmatrix}}={\begin{bmatrix}1\\1\\2\\y\\\end{bmatrix}}}
And on the second interval (1-2):
[
1
1
1
1
3
2
1
0
8
4
2
1
12
4
1
0
]
[
a
b
c
d
]
=
[
2
y
2
0
]
{\displaystyle {\begin{bmatrix}1&1&1&1\\3&2&1&0\\8&4&2&1\\12&4&1&0\\\end{bmatrix}}{\begin{bmatrix}a\\b\\c\\d\\\end{bmatrix}}={\begin{bmatrix}2\\y\\2\\0\\\end{bmatrix}}}
b.) This becomes a cubic spline if the second derivative is continuous. Since we only have two intervals, this will hold if the second derivative for both equations is equal at 1. That is, if:
6
(
y
−
1
)
−
2
(
y
−
1
)
=
6
y
−
10
y
{\displaystyle 6(y-1)-2(y-1)=6y-10y}
4
y
−
4
=
−
4
y
{\displaystyle 4y-4=-4y}
8
y
=
4
{\displaystyle 8y=4}
y
=
1
/
2
{\displaystyle y=1/2}
2.) More on Cubic Splines
3.) Linear Programming