Skip to content
GATEiit

GATE AE, CE, XE, MN, ES · Numerical Methods

Interpolation (Linear, Lagrange and Newton Polynomials)

Polynomial interpolation for tabular data: linear interpolation, Lagrange polynomials, Newton divided and forward differences, truncation error bounds, and extrapolation limits.

Before you start

This topic comes before: Concept of airport runway length, calculations and corrections, Principles of surveying

Concept notes

1. Linear interpolation formula and divided difference

Given two points (x0,y0) and (x1,y1) (x0<x<x1), linear interpolation approximates f(x) by the chord joining them: P1(x)=y0+y1−y0x1−x0(x−x0)=(x1−xx1−x0)y0+(x−x0x1−x0)y1. Notice the Lagrange form on the right is a convex weighted blend P1(x)=(1−t)y0+ty1 where t=x−x0x1−x0∈[0,1]. The slope y1−y0x1−x0 is the first divided difference f[x0,x1].

Aerospace table usage: GATE AE questions often give International Standard Atmosphere (ISA) table values at bracket altitudes (e.g. p,ρ,T at 4000 m and 5000 m) or steam/gas tables at nearby Mach numbers and ask for intermediate values.

xy(x₀, y₀)(x₁, y₁)max error ≤ (h²/8)|f″(ξ)|
Linear interpolation draws the secant chord between (x₀, y₀) and (x₁, y₁); the midpoint worst-case curvature error is bounded by (h²/8)|f″(ξ)|.

2. Interpolation error bound and midpoint rule

If f is twice continuously differentiable on [x0,x1] of width h=x1−x0, the exact truncation error of linear interpolation is f(x)−P1(x)=f′′(ξ)2(x−x0)(x−x1),ξ∈(x0,x1). Since max⁡x∈[x0,x1]∣(x−x0)(x−x1)∣=h24 at the midpoint x=x0+x12, the worst-case error bound across the entire interval is ∣f(x)−P1(x)∣≤h28max⁡t∈[x0,x1]∣f′′(t)∣. Note the h2 scaling: halving table spacing shrinks interpolation error by 4×. Notice also inverse interpolation finds x from a given y by rearranging x=x0+x1−x0y1−y0(y−y0).

3. Interpolation vs extrapolation and connection to quadratic Lagrange

  • Interpolation evaluates P1(x) for x∈[x0,x1], keeping (x−x0)(x−x1) small. Extrapolation (x<x0 or x>x1) causes ∣(x−x0)(x−x1)∣ to grow quadratically with distance outside the bracket.
  • Quadratic (3-point) Lagrange upgrade: when curvature ∣f′′∣ is large and three points (x0,y0),(x1,y1),(x2,y2) are available, Newton's divided-difference formula simply adds one quadratic term onto the linear estimate: P2(x)=P1(x)+f[x0,x1,x2](x−x0)(x−x1), where f[x0,x1,x2]=f[x1,x2]−f[x0,x1]x2−x0.

4. Lagrange and Newton Divided-Difference Polynomial Interpolation

Given n+1 distinct data points (x0,y0),(x1,y1),…,(xn,yn), there is a unique interpolating polynomial Pn(x) of degree at most n passing through every point. Lagrange and Newton forms represent the exact same polynomial in two different algebraic bases:

  1. Lagrange Form: Uses cardinal basis polynomials Lk(x) such that Lk(xj)=δkj (1 at xk and 0 at all other nodes): Pn(x)=∑k=0nykLk(x),Lk(x)=∏j=0j≠knx−xjxk−xj
  2. Newton's Divided-Difference Form (arbitrary spacing): Pn(x)=f[x0]+f[x0,x1](x−x0)+f[x0,x1,x2](x−x0)(x−x1)+… where f[xi,xi+1]=f(xi+1)−f(xi)xi+1−xi and f[x0,…,xk]=f[x1,…,xk]−f[x0,…,xk−1]xk−x0. Adding one more data point simply appends one term without recomputing earlier coefficients.
  3. Newton Forward Difference (equal spacing h, parameter p=(x−x0)/h): Pn(x)=y0+pΔy0+p(p−1)2!Δ2y0+p(p−1)(p−2)3!Δ3y0+…
  4. General error: f(x)−Pn(x)=f(n+1)(ξ)(n+1)!∏j=0n(x−xj).
x y (x₀, y₀) (x₁, y₁) (x₂, y₂) Quadratic P₂(x) [Lagrange / Newton] Piecewise linear chords (dashed)
Through 3 distinct nodes, Lagrange and Newton build the same smooth degree-2 polynomial P₂(x), reducing curvature error relative to piecewise chords.

Formulas to remember

Linear interpolation
P1(x)=y0+y1−y0x1−x0(x−x0)
Normalized blend form
P1(x)=(1−t)y0+ty1,t=x−x0x1−x0
Pointwise truncation error
E(x)=f(x)−P1(x)=f′′(ξ)2(x−x0)(x−x1)
Maximum error bound on [x₀, x₁]Attained at midpoint when h = x₁ − x₀
max⁡[x0,x1]∣E(x)∣≤h28max⁡∣f′′∣
Inverse linear interpolation
x=x0+x1−x0y1−y0(y−y0)
Lagrange degree-n basis
Li(x)=∏j≠ix−xjxi−xj,∑i=0nLi(x)=1
Newton divided-difference polynomial
P2(x)=y0+f[x0,x1](x−x0)+f[x0,x1,x2](x−x0)(x−x1)
Second divided difference
f[x0,x1,x2]=f[x1,x2]−f[x0,x1]x2−x0
Newton forward difference
Pn(x0+ph)=y0+pΔy0+p(p−1)2!Δ2y0+…

Common mistakes

  • Using h24 instead of h28 in the linear-interpolation maximum error bound: (x−x0)(x−x1) peaks at h2/4, and dividing by 2! yields h28.
  • Interpolating out-of-range (x<x0 or x>x1) without realizing you are extrapolating.
  • Swapping (x−x0) with (x1−x) in the Lagrange weights L0,L1 (check at x=x0: weight on y0 must equal 1).
  • Using incorrect denominator sign y0−y1 matched against x1−x0 in inverse linear interpolation.
  • Confusing Δx with h when interpolating a 2D table row/column by row/column.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Interpolating standard atmosphere density

numerical

Standard atmosphere tables list density ρ=0.909 kg/m3 at altitude h=3000 m and ρ=0.819 kg/m3 at h=4000 m. Estimate ρ at h=3400 m by linear interpolation.

  1. Step 1: Find normalized fraction t.

    Try it on paper first.

Example 2: Maximum truncation error bound for linear table lookup

numerical

A table of f(x)=sin⁡x on [0,1] has uniform spacing h=0.02. Bound the worst-case linear interpolation error on any grid interval.

  1. Step 1: Bound |f″(x)| on [0, 1].

    Try it on paper first.

Example 3: Quadratic interpolation via Newton divided differences and Lagrange check

numerical

Given data points (0,1), (1,2), and (3,16), construct the unique quadratic interpolating polynomial P2(x) and evaluate P2(2).

  1. Step 1: Build Newton divided-difference table

    Try it on paper first.

Example 4: Why convex interpolation stays bounded between y₀ and y₁

conceptual

For x∈[x0,x1], show that P1(x) always lies strictly between min⁡(y0,y1) and max⁡(y0,y1), and explain why this fails in extrapolation.

  1. Step 1: Check Lagrange weights L₀(x) = 1 − t and L₁(x) = t.

    Try it on paper first.

Previous year questions

No official PYQ in our currently live papers is tagged with this exact topic yet. The topic test below uses original GATE-style questions.

Topic test

8 questions: original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE Engineering Mathematics (AE, CE, XE, MN, ES) syllabus; being checked by a reviewer. Updated 2026-12-01. Spotted a mistake? Use Report an issue on any question, or contact us.