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

I have a black box called $F(t)$ with me where I don't have any information on the exact expression of $F(t)$. But if I supply a $t\ge 0$ I will get a value of $F(t)$ from the black box as output. It is also given that $F(t)$ is non-decreasing and $0\le F(t)\le 1$. I want to fit $F(t)$ against a polynomial of the form $\sum a_{i}t^{i}$. Is there any tool for this where the degree of the polynomial is user-defined (can be very large like 100)?

share|cite|improve this question
Is this going on forever, or is there a finite time $T$ when the process ends? – Christian Blatter Nov 15 '11 at 15:45
Actually, it is going forever but we can approximate it by some maximum t (t for which 1-F(t)<$\epsilon$). – aaaaaa Nov 16 '11 at 5:37

Not sure what you mean by fitting against a polynomial (normally I would say fitting the polynomial to the data). But as an answer, you can compute F(23.0079) (or any other argument you like) and take the constant polynomial of that value. Or if you're more industrious, you can evaluate at a million points and take the average of the results as value for a constant polynomial. Anyway, you're not going to do better than with a constant polynomial: any non-constant polynomial is a pretty lousy approximation of a function on the positive reals with value bounded between 0 and 1.

share|cite|improve this answer
I agree that polynomials are a poor choice to approximate a bounded nondecreasing function. A rational function (quotient of two polynomials) with a horizontal asymptotic (the two polynomials have the same degree) would seem more natural. – Justpassingby Nov 26 '15 at 14:24

If you collect $n$ points of data, there will be exactly one polynomial of degree $n-1$ or less that goes through those points. You can use Lagrange interpolation to find it. Choosing the points differently will give different polynomials unless your function is in fact a polynomial of degree $n-1$ or less. People often like the Chebyshev polynomials where the points are distributed as $x_k=1+\frac{1}{2}\cos\frac{(2k-1)\pi}{2n}$ (where my 1 and 1/2 are to make the interval $(0,1)$ instead of $(-1,1)$ as in the article).

share|cite|improve this answer
The reason behind the fondness for Chebyshev's nodes for Lagrangian interpolation being their property of minimising Runge's phenomenon. – Evpok Nov 15 '11 at 19:56
In general, one wants a point distribution that is "clustered" at the ends of the interval of approximation. Chebyshev happens to be one of the particularly convenient ones. – J. M. Nov 16 '11 at 8:34
Section 5.8 of Numerical Recipes is useful for this-obsolete versions are free. It has a discussion of why they are nice-Runge's phenomenon, spreading the error out, and truncation to lower degree are all cited. – Ross Millikan Nov 16 '11 at 13:47

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.