← 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

xx1-1223344
ff1-1111131316969

Find f(1.5)f(1.5).

Technique

Lagrange interpolation formula; for 4 points, the result is a cubic. Direct evaluation at x=1.5x=1.5; or recognise the cubic pattern.

Solution

Lagrange formula.

P(x)=k=03f(xk)jkxxjxkxj.P(x)=\sum_{k=0}^3 f(x_k)\prod_{j\ne k}\dfrac{x-x_j}{x_k-x_j}.

With x0=1x_0=-1, x1=2x_1=2, x2=3x_2=3, x3=4x_3=4 and ff-values 1,11,31,69-1,11,31,69.

Step 1 — Lagrange basis polynomials

L0(x)=(x2)(x3)(x4)(12)(13)(14)=(x2)(x3)(x4)(3)(4)(5)=(x2)(x3)(x4)60.L_0(x)=\dfrac{(x-2)(x-3)(x-4)}{(-1-2)(-1-3)(-1-4)}=\dfrac{(x-2)(x-3)(x-4)}{(-3)(-4)(-5)}=\dfrac{(x-2)(x-3)(x-4)}{-60}. L1(x)=(x+1)(x3)(x4)(2+1)(23)(24)=(x+1)(x3)(x4)(3)(1)(2)=(x+1)(x3)(x4)6.L_1(x)=\dfrac{(x+1)(x-3)(x-4)}{(2+1)(2-3)(2-4)}=\dfrac{(x+1)(x-3)(x-4)}{(3)(-1)(-2)}=\dfrac{(x+1)(x-3)(x-4)}{6}. L2(x)=(x+1)(x2)(x4)(3+1)(32)(34)=(x+1)(x2)(x4)(4)(1)(1)=(x+1)(x2)(x4)4.L_2(x)=\dfrac{(x+1)(x-2)(x-4)}{(3+1)(3-2)(3-4)}=\dfrac{(x+1)(x-2)(x-4)}{(4)(1)(-1)}=\dfrac{(x+1)(x-2)(x-4)}{-4}. L3(x)=(x+1)(x2)(x3)(4+1)(42)(43)=(x+1)(x2)(x3)(5)(2)(1)=(x+1)(x2)(x3)10.L_3(x)=\dfrac{(x+1)(x-2)(x-3)}{(4+1)(4-2)(4-3)}=\dfrac{(x+1)(x-2)(x-3)}{(5)(2)(1)}=\dfrac{(x+1)(x-2)(x-3)}{10}.

Step 2 — Build the polynomial

P(x)=(1)L0(x)+11L1(x)+31L2(x)+69L3(x).P(x)=(-1)L_0(x)+11 L_1(x)+31 L_2(x)+69 L_3(x).

Step 3 — Evaluate at x=1.5x=1.5

Compute each piece at x=1.5x=1.5.

L0(1.5)=(1.52)(1.53)(1.54)60=(0.5)(1.5)(2.5)60=1.87560=0.03125L_0(1.5)=\dfrac{(1.5-2)(1.5-3)(1.5-4)}{-60}=\dfrac{(-0.5)(-1.5)(-2.5)}{-60}=\dfrac{-1.875}{-60}=0.03125.

L1(1.5)=(2.5)(1.5)(2.5)6=9.3756=1.5625L_1(1.5)=\dfrac{(2.5)(-1.5)(-2.5)}{6}=\dfrac{9.375}{6}=1.5625.

L2(1.5)=(2.5)(0.5)(2.5)4=3.1254=0.78125L_2(1.5)=\dfrac{(2.5)(-0.5)(-2.5)}{-4}=\dfrac{3.125}{-4}=-0.78125.

L3(1.5)=(2.5)(0.5)(1.5)10=1.87510=0.1875L_3(1.5)=\dfrac{(2.5)(-0.5)(-1.5)}{10}=\dfrac{1.875}{10}=0.1875.

Step 4 — Combine

P(1.5)=(1)(0.03125)+(11)(1.5625)+(31)(0.78125)+(69)(0.1875)P(1.5)=(-1)(0.03125)+(11)(1.5625)+(31)(-0.78125)+(69)(0.1875) =0.03125+17.187524.21875+12.9375=-0.03125+17.1875-24.21875+12.9375 =5.875=5.875.

  P(1.5)=5.875.  \boxed{\;P(1.5)=5.875.\;}

Step 5 — Simplify to closed form (try cubic guess)

Suspect f(x)=x3+x1f(x)=x^3+x-1 or similar. Check:

Hmm. Try f(x)=x3+x+1f(x)=x^3+x+1? x=1x=-1: 11+1=1-1-1+1=-1 ✓. x=2x=2: 8+2+1=118+2+1=11 ✓. x=3x=3: 27+3+1=3127+3+1=31 ✓. x=4x=4: 64+4+1=6964+4+1=69 ✓.

So f(x)=x3+x+1f(x)=x^3+x+1 exactly. At x=1.5x=1.5: f(1.5)=3.375+1.5+1=5.875f(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+1x^3+x+1.

Answer

  P(x)=x3+x+1,P(1.5)=5.875.  \boxed{\;P(x)=x^3+x+1,\quad P(1.5)=5.875.\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.