Fitting a function to a polynomial

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)?

-
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.

-

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).

-
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. –  Ｊ. Ｍ. Nov 16 '11 at 8:34
Section 5.8 of Numerical Recipes apps.nrbook.com/c/index.html 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