4

Why is it not recommended to use the basis $\{1, x, x^2 , \ldots , x^n\}$ to find the interpolating polynomial?

  • 3
    Welcome to MSE! Can you explain more? Interpolating polynomial for what? – Aravind May 11 '20 at 06:52
  • When $n \gg 1$, the numerical evaluation of $x^n$ becomes inaccurate. – induction601 May 11 '20 at 06:52
  • 1
    ... and you need to invert a Vandermonde matrix. – Jyrki Lahtonen May 11 '20 at 06:53
  • @YvesDaoust Isn't it true? Consider $(1+\epsilon)^n$ where $n=10^5$ and $\epsilon = \pm 10^{-3}$. – induction601 May 11 '20 at 06:58
  • 1
    Without any context: because these polynomials are not orthogonal relative to any of the usual inner products in a polynomial space such as $\mathcal{P}[0,1]$. – Ivo Terek May 11 '20 at 07:00
  • 1
    @induction601: what a weird argument. Computing an orthogonal polynomial is million times more numerically unstable ! –  May 11 '20 at 07:21
  • 1
    @induction601: also note that the computation of $1.003^{100000}$ would only be inaccurate if computed iteratively (as in a Horner's polynomial evaluation). When computed by squarings or by logarithms, you get a pretty good estimate. –  May 11 '20 at 07:50
  • @JyrkiLahtonen, that is the main point here. It should help the OP – MAS May 11 '20 at 08:11
  • 1
    It depends. If you're interpolating complex-valued functions, and your nodes are roots of unity, that's a fine base. On the real line, it isn't, because the numerical condition of the resulting systems of equations is catastrophic, especially (but not only) with equally spaced nodes. @JyrkiLahtonen Vandermode systems can be solved in $O(n^2)$ operations, but there are numerical problems, usually. –  May 11 '20 at 13:54
  • A very good comment @ProfessorVector. I should have thought about Vandermonde being a special case. Wouldn't surprise me if the efficient method of solving Vandermonde is equivalent to using Lagrange interpolation - possibly in a hidden form. Roots of unity? Discrete Fourier transform, I presume? – Jyrki Lahtonen May 11 '20 at 14:07
  • @JyrkiLahtonen Yes, of course (both questions). Interestingly, the operation count can be the same order for orthogonal bases. The resulting algorithm is a little bit more complex, though. But then, the choice of a basis depends on the application (what do we want to do with the resulting polynomial, then?), and there isn't really much context, here. –  May 11 '20 at 14:18

0 Answers0