Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I achieve a spline interpolation such that when given non-decreasing sequence of points the resulting spline will also be a non-decreasing function (and vice-versa, when given non-increasing sequence the interpolation would also be non-increasing)?

For example, here is a natural cubic spline interpolation: a natural cubic spline interpolation

over the following dataset:

270 71
333 102
355 109
406 111
427 168
As you can see, the polynom between points [355, 109] and [406, 111] is decreasing at some interval.

What kind of spline is best suited for such "monotone" interpolation?

EDIT: so here is the result of monotone cubic Hermite interpolation using Fritsch–Carlson method suggested by bubba: a monotone cubic Hermite interpolation using Fritsch–Carlson method

share|cite|improve this question
Search terms that might be useful are "splines under tension" and "monotone splines". – marty cohen Aug 13 '13 at 13:57
up vote 2 down vote accepted

One popular method is the Fritsch-Carlson algorithm. It's described on this Wikipedia page.

The basic idea is to use some simple formulae to obtain a derivative at each data point. Then, between each two data points, you can construct a Hermite cubic segment from two points and two derivatives.

The resulting curve is only $C_1$ continuous, as opposed to the $C_2$ continuity that you would get from a conventional interpolating cubic spline. But, I expect that monotonicity is more important to you than $C_2$ continuity, so this is probably not a problem.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.