InterpolatingPolynomial[{f1,f2,…},x]
constructs an interpolating polynomial in x which reproduces the function values fi at successive integer values 1, 2, … of x.
InterpolatingPolynomial[{{x1,f1},{x2,f2},…},x]
constructs an interpolating polynomial for the function values fi corresponding to x values xi.
InterpolatingPolynomial[{{{x1,y1,…},f1},{{x2,y2,…},f2},…},{x,y,…}]
constructs a multidimensional interpolating polynomial in the variables x, y, ….
InterpolatingPolynomial[{{{x1,…},f1,df1,…},…},{x,…}]
constructs an interpolating polynomial that reproduces derivatives as well as function values.
InterpolatingPolynomial
InterpolatingPolynomial[{f1,f2,…},x]
constructs an interpolating polynomial in x which reproduces the function values fi at successive integer values 1, 2, … of x.
InterpolatingPolynomial[{{x1,f1},{x2,f2},…},x]
constructs an interpolating polynomial for the function values fi corresponding to x values xi.
InterpolatingPolynomial[{{{x1,y1,…},f1},{{x2,y2,…},f2},…},{x,y,…}]
constructs a multidimensional interpolating polynomial in the variables x, y, ….
InterpolatingPolynomial[{{{x1,…},f1,df1,…},…},{x,…}]
constructs an interpolating polynomial that reproduces derivatives as well as function values.
Details and Options
- The function values
and sample points
, etc. can be arbitrary real or complex numbers, and in 1D can be arbitrary symbolic expressions. - With a 1D list of data of length
, InterpolatingPolynomial gives a polynomial of degree
. - With any given specified set of data, there are infinitely many possible interpolating polynomials; InterpolatingPolynomial always tries to find the one with lowest total degree.
- InterpolatingPolynomial gives the interpolating polynomial in a Horner form, suitable for numerical evaluation.
- Different elements in the data can have different numbers of derivatives specified.
- For multidimensional data, the

derivative can be given as a tensor with a structure corresponding to D[f,{{x,y,…},n}]. » - InterpolatingPolynomial allows any function value or derivative to be given as Automatic, in which case it will attempt to fill in the necessary information from derivatives or other function values. »
- The option setting Modulus->n specifies that the interpolating polynomial should be found modulo
. »
Examples
open all close allBasic Examples (2)
Construct an interpolating polynomial for the squares:
InterpolatingPolynomial[{1, 4, 9, 16}, x]Expand[%]Construct an interpolating polynomial through three points:
InterpolatingPolynomial[{{-1, 4}, {0, 2}, {1, 6}}, x]Check the result at a single point:
% /. x -> 0Scope (3)
InterpolatingPolynomial[{4, 7, 2, 8, 9}, x]Show[Plot[%, {x, 0, 6}], ListPlot[{4, 7, 2, 8, 9}]]Make the polynomial have derivative 0 when it has value 8:
InterpolatingPolynomial[{4, 7, 2, {8, 0}, 9}, x]Show[Plot[%, {x, 0, 6}], ListPlot[{4, 7, 2, 8, 9}]]Interpolate values depending on 2 variables:
InterpolatingPolynomial[{{{0, 0}, 1}, {{1, 0}, 7}, {{0, 1}, 10}, {{2, 1}, 40}, {{3, 3}, 151}, {{1, 2}, 47}}, {x, y}]ContourPlot[%, {x, 0, 3}, {y, 0, 3}, Epilog -> {Green, Map[Point, {{0, 0}, {1, 0}, {0, 1}, {2, 1}, {3, 3}, {1, 2}}]}]Generalizations & Extensions (3)
Make the polynomial have zero derivative at
and
without specifying the values there:
InterpolatingPolynomial[{{-1, Automatic, 0}, {0, 1, 1}, {1, Automatic, 0}}, x]Plot[%, {x, -1, 1}]Specify some of the partial derivatives in 2 dimensions:
InterpolatingPolynomial[{{{0, 0}, 1, {2, 3}}, {{1, 0}, 7}, {{0, 1}, 10, {Automatic, 15}}}, {x, y}]Interpolate values and a gradient in 3 variables:
InterpolatingPolynomial[{{{1, 2, 3}, 4, {5, 6, 7}}, {{3, 2, 1}, 0}}, {x, y, z}]Options (1)
Modulus (1)
Find a polynomial interpolating the given points in arithmetic mod 47:
p = InterpolatingPolynomial[{{0, 1}, {4, 2}, {9, 3}, {16, 4}}, x, Modulus -> 47]The polynomial takes on the specified values mod 47:
p /. x -> {0, 4, 9, 16}Mod[%, 47]Applications (5)
Construct a polynomial with roots a, b, and c:
InterpolatingPolynomial[{{0, 1}, {a, 0}, {b, 0}, {c, 0}}, x]Factor[%]Newton–Cotes integration formulas with
points:
TableForm[Table[
abc = Range[0, n - 1] / (n - 1);
Integrate[InterpolatingPolynomial[Table[{x, f[x]}, {x, abc}], x], {x, 0, 1}],
{n, 2, 8}]]Centered finite difference formula of order
for approximating the first derivative:
TableForm[Table[
abc = Range[-k / 2, k / 2];
Together[D[InterpolatingPolynomial[Table[{s, f[x + s h]}, {s, abc}], s], s] / h /. s -> 0],
{k, 2, 10, 2}]]Interpolate to find the characteristic polynomial of a matrix:
m = RandomInteger[1, {6, 6}]InterpolatingPolynomial[Table[Det[m - λ IdentityMatrix[6]], {λ, 11}], x]Expand[%] === CharacteristicPolynomial[m, x]Create a tensor product interpolation:
{m, n} = {4, 4};
{xc, yc} = {Range[m], Range[n]};
zc = RandomInteger[{-9, 9}, {m, n}];Create an interpolating polynomial for each fixed
value:
yinterp = Map[InterpolatingPolynomial[Transpose[{yc, #}], y]&, zc]Show the interpolation curves in the
direction:
points = Graphics3D[{PointSize[Medium], Red, Point@Flatten[Table[{xc[[i]], yc[[j]], zc[[i, j]]}, {i, m}, {j, n}], 1]}];Show[ParametricPlot3D[Evaluate@Table[{xc[[i]], y, yinterp[[i]]}, {i, m}], {y, 1, n}, BoxRatios -> {1, 1, 0.4}], points]Interpolate between the curves in the
direction:
xyinterp = InterpolatingPolynomial[Transpose[{xc, yinterp}], x]Show the interpolating surface and data points:
Show[Plot3D[xyinterp, {x, 1, m}, {y, 1, n}], points]Properties & Relations (3)
The interpolating polynomial always goes through the data points:
data = {1, 2, 3, 5, 8, 5};InterpolatingPolynomial[data, x]% /. x -> Range[6]ListInterpolation creates a tensor product interpolation:
{m, n} = {5, 6};
{xc, yc} = {Range[m], Range[n]};
zc = RandomInteger[{-9, 9}, {m, n}];Create a numerical InterpolatingFunction object:
linterp = ListInterpolation[zc, {xc, yc}, InterpolationOrder -> {m - 1, n - 1}]Create a symbolic polynomial by interpolating in each dimension separately:
yinterp = Map[InterpolatingPolynomial[Transpose[{yc, #}], y]&, zc];
interp = InterpolatingPolynomial[Transpose[{xc, yinterp}], x];Verify that results agree with random data points:
Max[Abs[Table[interp - linterp[x, y], {x, RandomReal[{1, m}, 2m]}, {y, RandomReal[{1, n}, 2n]}]]]Choose some points to be interpolated:
pts = {{0, 0}, {1 / 10, 3 / 10}, {1 / 2, 3 / 5}, {1, -1 / 5}, {2, 3}};Use VandermondeMatrix in LinearSolve to obtain the coefficients of the interpolating polynomial:
LinearSolve[VandermondeMatrix[pts[[All, 1]]], pts[[All, 2]]]% == CoefficientList[InterpolatingPolynomial[pts, x], x]Possible Issues (3)
f[x_] := 1 / (1 + 25 x ^ 2);Sampling at evenly spaced intervals in the interval from
to
:
points = Table[{x, f[x]}, {x, -1, 1, .1}];The polynomial that interpolates these points has large oscillations:
Plot[Evaluate[InterpolatingPolynomial[points, x]], {x, -1, 1}, PlotRange -> All, Epilog -> {Red, Map[Point, points]}]Interpolation uses a lower-order piecewise polynomial that does not have this problem:
Interpolation[points]Plot[%[x], {x, -1, 1}, Epilog -> {Red, Map[Point, points]}]When derivatives are specified without function values an interpolant may not be found:
InterpolatingPolynomial[{{-1, 1}, {0, Automatic, 0}, {1, -1}}, x]There is no quadratic polynomial that satisfies the interpolation conditions:
Expand[InterpolatingPolynomial[{{-1, 1}, {0, a, 0}, {1, -1}}, x]]Points with abscissas lying on a line in 2 dimensions:
data = {{{0, 0}, 1}, {{1, 1}, 2}, {{2, 2}, 4}};In multiple dimensions an interpolant may not be found for some arrangements of points:
InterpolatingPolynomial[data, {x, y}]This polynomial interpolates the data above, but has total degree 2:
InterpolatingPolynomial[{{0, 1}, {1, 2}, {2, 4}}, x]Tech Notes
Related Guides
History
Introduced in 1991 (2.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1991), InterpolatingPolynomial, Wolfram Language function, https://reference.wolfram.com/language/ref/InterpolatingPolynomial.html (updated 2007).
CMS
Wolfram Language. 1991. "InterpolatingPolynomial." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/InterpolatingPolynomial.html.
APA
Wolfram Language. (1991). InterpolatingPolynomial. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InterpolatingPolynomial.html
BibTeX
@misc{reference.wolfram_2026_interpolatingpolynomial, author="Wolfram Research", title="{InterpolatingPolynomial}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/InterpolatingPolynomial.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_interpolatingpolynomial, organization={Wolfram Research}, title={InterpolatingPolynomial}, year={2007}, url={https://reference.wolfram.com/language/ref/InterpolatingPolynomial.html}, note=[Accessed: 13-June-2026]}