Skip to content
CoreSource checked

Polynomial Interpolation

Finds a polynomial that passes through a set of sample points.

Quick Facts

Compact metadata for implementation and discovery.

Category
Numerical Methods
Difficulty
Intermediate
Family
Interpolation
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
5
Code example
Ready
Visualization
Ready

Overview

Polynomial interpolation builds a function that exactly matches known samples, but high-degree fits can oscillate strongly.

Core Concepts

sample pointinterpolating polynomialbasis functionapproximation error

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n^2)

Average

O(n^2)

Worst

O(n^3)

Space

O(n)

When to Use

  • Use when solving equations needs sample point.
  • Use when the input matches the assumptions behind interpolation.

When Not to Use

  • Avoid when the problem is ill-conditioned and no scaling or stability checks are available.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Finds a polynomial that passes through a set of sample points
  • Uses sample point and interpolating polynomial to guide the work.
  • Produces approximate numeric result.

Use Cases

  • Solving equations
  • Approximating integrals
  • Working with matrices and differential equations

Inputs

  • Numeric function, matrix, or sampled data
  • Initial estimate or discretization
  • Tolerance

Outputs

  • Approximate numeric result
  • Error estimate or residual

Key Formulas (1)

Interpolating polynomial

p(xi) = yi for every sample i
p(x_i) = y_i for every sample i

Defines the polynomial by matching all provided samples.

Pseudocode

  1. 1.Prepare the inputs and state needed for Polynomial Interpolation.
  2. 2.Apply the sample point step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return approximate numeric result.

Canonical Example

Input
Polynomial Interpolation input with a small representative case
Output
Approximate numeric result
Explanation
Polynomial Interpolation applies sample point to produce approximate numeric result.

Implementation Notes

  • Check convergence with residuals or estimated error, not iteration count alone.
  • Keep the sample point step separate enough to test independently.

Common Pitfalls

  • Ignoring conditioning and residuals can produce plausible-looking but wrong numeric answers.
  • Forgetting to check edge cases can make Polynomial Interpolation look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show the numeric approximation improving against the target function, matrix, or state.

Polynomial Interpolation mechanism walkthrough step 1 of 4x₀x₁x₂x*
Step 1 of 4: Prepare the inputs and state needed for Polynomial Interpolation.
numerical-methods-mechanism

Notes

Polynomial Interpolation should be used with the assumptions and tradeoffs of interpolation in mind.

Sources (1)

What each reference supports for this entry.

Numerical Recipes

Book

Numerical methods reference covering interpolation formulas and practical polynomial interpolation.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Lagrange interpolation is one polynomial interpolation form.

Newton interpolation is one polynomial interpolation form.

Tags

Numerical MethodsInterpolationPolynomialsApproximation