UNIHIVE

Study Hub UNIPORT ENG 303

ENG 303 · Engineering Mathematics V (Numerical Methods and Computer Application)

Polynomial interpolation

Fitting a polynomial through data points, the Lagrange form, Newton's divided differences, equal-spacing formulas and interpolation error.

Our notes

1 min read

The idea

Given n + 1 points (xᵢ, yᵢ) with different xᵢ, there is exactly one polynomial of degree at most n through all of them. Interpolation estimates values between the points: steam-table properties, tabulated soil data, calibration curves.

Lagrange form

P(x) = Σ yᵢ Lᵢ(x), where Lᵢ(x) = Π (j ≠ i) (x − xⱼ)/(xᵢ − xⱼ).
Worked example. Points (0, 1), (1, 3), (2, 7); estimate P(1.5).

  • L₀(1.5) = (1.5 − 1)(1.5 − 2) / [(0 − 1)(0 − 2)] = (0.5)(−0.5)/2 = −0.125.
  • L₁(1.5) = (1.5 − 0)(1.5 − 2) / [(1 − 0)(1 − 2)] = (1.5)(−0.5)/(−1) = 0.75.
  • L₂(1.5) = (1.5 − 0)(1.5 − 1) / [(2 − 0)(2 − 1)] = 0.75/2 = 0.375.
  • P(1.5) = 1(−0.125) + 3(0.75) + 7(0.375) = −0.125 + 2.25 + 2.625 = 4.75.

Newton's divided differences

f[x₀, x₁] = (y₁ − y₀)/(x₁ − x₀), f[x₀, x₁, x₂] = (f[x₁, x₂] − f[x₀, x₁])/(x₂ − x₀), and so on.
P(x) = y₀ + f[x₀, x₁](x − x₀) + f[x₀, x₁, x₂](x − x₀)(x − x₁) + ...
For the same data: f[0, 1] = 2, f[1, 2] = 4, f[0, 1, 2] = (4 − 2)/2 = 1.
P(x) = 1 + 2x + 1 × x(x − 1) = x² + x + 1, and P(1.5) = 2.25 + 1.5 + 1 = 4.75. ✓ Adding a new point only adds one new term, which is the advantage of the Newton form.

Equally spaced points

With spacing h and s = (x − x₀)/h, Newton's forward difference formula uses Δy₀, Δ²y₀, ...: P = y₀ + sΔy₀ + s(s − 1)Δ²y₀/2! + ... A difference table makes the work quick and shows data errors (a wrong value disturbs a fan of differences).

Error and cautions

Error = f⁽ⁿ⁺¹⁾(ξ)/(n + 1)! × Π(x − xᵢ) for some ξ in the range. High-degree polynomials through many equally spaced points can oscillate wildly near the ends (Runge's phenomenon); use low-degree pieces (splines) or Chebyshev points instead. Do not extrapolate far outside the data.

Exams usually ask: find an interpolating polynomial by Lagrange or Newton; build a divided-difference or forward-difference table; estimate a value; explain Runge's phenomenon.

Common mistake: mixing up interpolation and least squares. Interpolation passes exactly through every point; least squares fits a curve near noisy points.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All ENG 303 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.