I am currently learning how to do small natural cubic spline problems by hand. I was doing quite well, since most of the problems gave 3 points to begin with (two intervals). I then ran into a problem that has 5 points $f(0.5)=2$, $f(0.625)=1.6$, $f(0.75)=0.625$, $f(0.875)=1.14$, $f(1)=1$.
The strategy that I've been using so far made use of the following format for the rl polynomials $$ S_j(x)=a_j+b(x−x_j)+c(x−x_j)^2+d(x−x_j)^3 $$ I have to figure out the constants for each $S_j(x)$, where $j$ is a subscript representing one of the given intervals. My problem is that this problem solving method depends on there being 2 or more intervals (or so it seems). Can anyone give me some hint of how to do this? The book I am using provides no examples of a single-interval solution.
If three points gave you two intervals in your earlier problems, then 5 points will give you four intervals. The technique is exactly the same -- you set up linear equations for the coefficients $a_j$, $b_j$, $c_j$, $d_j$, and solve them. But, with 5 points, you'll have more equations, so solving them will be more laborious.