Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

Polynomial used in Interpolation

Posted 11 years ago
Dear friends,

How could I get the polynomial used in the Interpolation command? What is, for example, the polynomial used in the following interpolation:
data = Table[{i, RandomReal[i]}, {i, 1, 10}];
f = Interpolation[data];

What was the order used in the "f = Interpolation[ data]"?
POSTED BY: Ana Squadri
3 Replies
Posted 11 years ago
Thank you for all
POSTED BY: Ana Squadri
data = Table[{i, RandomReal[i]}, {i, 1, 10}];
InterpolatingPolynomial[data, x] // Expand
Out[] = 1227.24 - 3354.85 x + 3658.58 x^2 - 2130.21 x^3 + 740.403 x^4 -
        161.038 x^5 + 22.1034 x^6 - 1.8587 x^7 + 0.0873782 x^8 - 0.0017578 x^9
POSTED BY: Sam Carrettie
The default method is "Hermite"
See how-does-interpolation-really-work
If you want to force a polynomial to be used, you can use the Fit command. (but not a good idea to use polynominal to fitĀ  many points, else too much oscillation in between points, see Runge's phenomenon) that is why Spline or Hermite would be better methods.
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract