← 2015 Paper 2
UPSC 2015 Maths Optional Paper 2 Q6c — Step-by-Step Solution
20 marks · Section B
Lagrange's interpolation · Numerical Analysis · asked 5× in 13 yrs · Read the full method →
Question
Find the Lagrange interpolating polynomial that fits the data
| x | −1 | 2 | 3 | 4 |
|---|
| f | −1 | 11 | 31 | 69 |
Find f(1.5).
Technique
Lagrange interpolation formula; for 4 points, the result is a cubic. Direct evaluation at x=1.5; or recognise the cubic pattern.
Solution
Lagrange formula.
P(x)=k=0∑3f(xk)j=k∏xk−xjx−xj.
With x0=−1, x1=2, x2=3, x3=4 and f-values −1,11,31,69.
Step 1 — Lagrange basis polynomials
L0(x)=(−1−2)(−1−3)(−1−4)(x−2)(x−3)(x−4)=(−3)(−4)(−5)(x−2)(x−3)(x−4)=−60(x−2)(x−3)(x−4).
L1(x)=(2+1)(2−3)(2−4)(x+1)(x−3)(x−4)=(3)(−1)(−2)(x+1)(x−3)(x−4)=6(x+1)(x−3)(x−4).
L2(x)=(3+1)(3−2)(3−4)(x+1)(x−2)(x−4)=(4)(1)(−1)(x+1)(x−2)(x−4)=−4(x+1)(x−2)(x−4).
L3(x)=(4+1)(4−2)(4−3)(x+1)(x−2)(x−3)=(5)(2)(1)(x+1)(x−2)(x−3)=10(x+1)(x−2)(x−3).
Step 2 — Build the polynomial
P(x)=(−1)L0(x)+11L1(x)+31L2(x)+69L3(x).
Step 3 — Evaluate at x=1.5
Compute each piece at x=1.5.
L0(1.5)=−60(1.5−2)(1.5−3)(1.5−4)=−60(−0.5)(−1.5)(−2.5)=−60−1.875=0.03125.
L1(1.5)=6(2.5)(−1.5)(−2.5)=69.375=1.5625.
L2(1.5)=−4(2.5)(−0.5)(−2.5)=−43.125=−0.78125.
L3(1.5)=10(2.5)(−0.5)(−1.5)=101.875=0.1875.
Step 4 — Combine
P(1.5)=(−1)(0.03125)+(11)(1.5625)+(31)(−0.78125)+(69)(0.1875)
=−0.03125+17.1875−24.21875+12.9375
=5.875.
P(1.5)=5.875.
Suspect f(x)=x3+x−1 or similar. Check:
- x=−1: −1−1−1=−3. No.
- x=−1: try x3+2: −1+2=1. No.
Hmm. Try f(x)=x3+x+1? x=−1: −1−1+1=−1 ✓. x=2: 8+2+1=11 ✓. x=3: 27+3+1=31 ✓. x=4: 64+4+1=69 ✓.
So f(x)=x3+x+1 exactly. At x=1.5: f(1.5)=3.375+1.5+1=5.875 ✓.
The cubic interpolation through 4 points yields the unique cubic, and the data lies exactly on x3+x+1.
Answer
P(x)=x3+x+1,P(1.5)=5.875.