2

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.

TMM
  • 9,976

1 Answers1

1

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.

Elmar Zander
  • 1,625
  • I see that now. But the problem requests the coefficients a, b, c and d as answers. I used the slope intercept formula to get an equation, but I don't know how to translate it to the form I mentioned in the question. – Gregory-Turtle Mar 20 '13 at 21:32
  • For a straight line $c$ and $d$ are zero, no need to calculate anything, and for $a$ and $b$ you have $17.56492$ and $(18.50515-17.56492)/(8.6-8.3)$ – Elmar Zander Mar 20 '13 at 21:36