Natural cubic spline on one interval

1k Views Asked by At

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 only have two points (one interval).

$$f(8.3) = 17.56492$$ $$f(8.6) = 18.50515$$

The strategy that I've been using so far made use of the following format for the resulting 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.

1

There are 1 best solutions below

2
On BEST ANSWER

The solution for just one interval is simply a straight line, going through both of your points. For natural splines you know that the second derivatives vanish at the endpoints, which is obviously the case for a straight line.