How do you come up with the system of equations to determine the coefficients of the natural cubic splines passing through a given set of points?

1k Views Asked by At

points

Not sure if I'm doing it right, but these are the equations I came up with so far.

equations

1

There are 1 best solutions below

0
On BEST ANSWER

The equations come in groups based on certain conditions:

First, the spline has to pass through the given points, so: $$ S_1(3) = 10 \;\; , \;\; S_1(4) = 15 \;\; , \;\; S_2(6) = 35 $$ Next, the values and first and second derivatives have to match at the join where $x = 4$, so $$ S_1(4) = S_2(4) \;\; , \;\; S_1'(4) = S_2'(4) \;\; , \;\; S_1''(4) = S_2''(4) $$ Finally, the "natural" end conditions say that starting and ending second derivatives should be zero, so: $$ S_1''(3) = 0 \;\; , \;\; S_2''(6) = 0 $$ So, you have eight equations, which will allow you to calculate the eight unknown coefficients $a_1$, $b_1$, $c_1$, $d_1$, $a_2$, $b_2$, $c_2$, $d_2$.