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

Could someone explain the justification and limits of fitting polynomials to arbitrary data points? I mean what about square roots or fractional or inverse powers? Most of the time some wants to improve a linear fit, they rather include quadric terms than anything else.

Can you think of a mathematical justification why plain powers are favoured? I assume it might be related to function approximation Taylor series.

Suppose I wanted to include fractional powers, would it rather make sense to include $x^a$ or $x^{0.5}+a\cdot x^{1.5}$ for "common real world data".

Or do rational polynomials do better and I'd rather try these first?

Maybe someone can elaborate the power of these method to approximate an unknown function in data.

share|cite|improve this question
Polynominals are smooth on whole $\mathbb R$, but $\sqrt{x} = x^{\frac 1 2}$ isn't differentiable at 0 for example. – Stefan Nov 17 '12 at 17:56
Ease of manipulation, smoothness(?). Further, almost everything can be written out as polynomials using Taylor Expansion. – Inquest Nov 17 '12 at 17:56
@Inquest: Not everything, so the question is why is the "almost" part more relevant for the "real world". – Gerenuk Nov 17 '12 at 18:04
@Stefan: Can this be translated into an argument why differentiability at zero is important for real world data? I suppose that is because real world shouldnt have infinite slopes? – Gerenuk Nov 17 '12 at 18:06
Well, Taylor approximation is such a good tool, and for it to work you need your function to be smooth, if you can't differentiate at a point, you can approximate. And of course infinite slopes don't make sense in real world application. – Stefan Nov 17 '12 at 18:13
up vote 5 down vote accepted

There are lots of theoretical results telling us that approximation by polynomials works well for various classes of functions, and even telling us what the maximum approximation error will be. For example, there's the Stone-Weiertrass theorem mentioned in the other answer, plus the "Jackson" theorems and many others in constructive approximation:

There are fast reliable easy-to-implement algorithms for computing the approximations. For some good examples, look at the Chebfun system, which basically does everything by computing high-degree polynomial approximations:

Once you have a polynomial, it's relatively easy (and inexpensive) to calculate function values, derivatives, integrals, zeros, bounds, and so on. Again, see Chebfun for examples.

In some fields (like computer-aided design), polynomial forms are considered "standard", and using anything else causes data exchange problems.

Rational approximations will sometimes work better than polynomial ones (in the sense that you get a smaller error with no increase in the degrees of freedom of the approximant). But optimal rational approximations are much harder to compute, and, once you have them, they are more difficult to handle (harder to integrate, for example).

Polynomial approximation is not always the best choice (nothing is), but it's often a pretty good one, and it's a reasonable thing to try unless the nature of your specific problem suggests something different.

share|cite|improve this answer

The square root itself is approximated with polynomial functions see here (for example for computations), so polynomials are here a bit more 'fundamental'.

By the Stone–Weierstrass theorem every continuous function defined on a closed interval [a,b] can be uniformly approximated as closely as desired by a polynomial function.

For numerical quadrature the definite integral of polynomials is exact, so if you approximate your function with polynomials the only step where approximation errors happens is the polynomial approximation...

However, polynomials are not the only suitable basis for approximating continuous functions. For example $\sin(nx)$ and $\cos(nx)$ are very popular. Additionally if your functions are continuous but maybe have values that are not differentiable then in fact wavelets are a more modern alternative...

EDIT: as to fitting points... no, polynomials are not usually the top choice. For points the function to be fitted depends very much on your problem domain. For example if the points represent populations growth then usually exponential functions are fitted. Also it matters how many dimensions your data has. High dimension point fitting problems (or clustering or seperating the points etc) go more in the direction of machine learning than approximation...

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.