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

Let $P=[a,b]\times (c,d)$. Assume that we have given $n$ points $(x_1,y_1),...,(x_n,y_n)\in P$, such that $x_i\neq x_j$ for $i\neq j$; $i,j=1,...,n$. Does there exist a polynomial $f$ such that $f(x_i)=y_i$ for $i=1,...,n$ and $c<f(x)<d$ for $x \in [a,b]$?

share|cite|improve this question
I think you mean $f(x_i)=y_i$, and I think you need the $x_i$ to be distinct. – Gerry Myerson Feb 18 '12 at 21:59
and $\forall i\ c<y_i < d$ – yohBS Feb 18 '12 at 22:04
All points are from $P$, in particular $c<y_i<d$. – Richard Feb 18 '12 at 22:06
up vote 3 down vote accepted

Of course, Lagrange interpolation will give you a polynomial going through all the points, but with no guarantee of obeying the bounds. But I think there's a stronger form of interpolation that lets you get local maxima or minima at the interpolation points (see Hermite interpolation at, e.g.,, and I think that can solve the problem. For each $i$, if $y_i$ is bigger than both $y_{i-1}$ and $y_{i+1}$, make the polynomial have a local maximum at $x_i$; if $y_i$ is smaller than both $y_{i-1}$ and $y_{i+1}$, make the polynomial have a local minimum at $x_i$. To avoid bad behavior left of $x_1$ and right of $x_n$, add, say, a local maximum at $(a,d)$ and a local minimum at $(b,c)$.

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.