← 2017 Paper 2

UPSC 2017 Maths Optional Paper 2 Q6b — Step-by-Step Solution

15 marks · Section B

Lagrange's interpolation · Numerical Analysis · asked 5× in 13 yrs · Read the full method →

Question

For given equidistant values u1,u0,u1u_{-1},u_0,u_1 and u2u_2, a value is interpolated by Lagrange’s formula. Show that it may be written in the form

ux=yu0+xu1+y(y21)3!Δ2u1+x(x21)3!Δ2u0,u_x=yu_0+xu_1+\frac{y(y^2-1)}{3!}\Delta^2 u_{-1}+\frac{x(x^2-1)}{3!}\Delta^2 u_0,

where x+y=1x+y=1.

Technique

Write Lagrange’s 4-node formula explicitly, substitute Δ2u1,Δ2u0\Delta^2 u_{-1},\Delta^2 u_0 into the target form, and match the coefficient of each uiu_i to the corresponding Li(x)L_i(x) using y=1xy=1-x.

Solution

Setup. Four equidistant nodes at arguments 1,0,1,2-1,0,1,2 with values u1,u0,u1,u2u_{-1},u_0,u_1,u_2. We interpolate at the point with argument xx (measured in units of the spacing, from u0u_0), and write y=1xy=1-x so that x+y=1x+y=1. Recall the forward differences

Δ2u1=u12u0+u1,Δ2u0=u22u1+u0.\Delta^2 u_{-1}=u_1-2u_0+u_{-1},\qquad \Delta^2 u_0=u_2-2u_1+u_0.

Step 1 — Lagrange’s formula on the four nodes

With nodes 1,0,1,2-1,0,1,2, Lagrange’s interpolation polynomial at argument xx is

ux=iuiLi(x),u_x=\sum_{i}u_i L_i(x), L1=x(x1)(x2)(1)(2)(3)=x(x1)(x2)6,L_{-1}=\frac{x(x-1)(x-2)}{(-1)(-2)(-3)}=-\frac{x(x-1)(x-2)}{6}, L0=(x+1)(x1)(x2)(1)(1)(2)=(x+1)(x1)(x2)2,L_{0}=\frac{(x+1)(x-1)(x-2)}{(1)(-1)(-2)}=\frac{(x+1)(x-1)(x-2)}{2}, L1=(x+1)x(x2)(2)(1)(1)=(x+1)x(x2)2,L_{1}=\frac{(x+1)\,x\,(x-2)}{(2)(1)(-1)}=-\frac{(x+1)x(x-2)}{2}, L2=(x+1)x(x1)(3)(2)(1)=(x+1)x(x1)6.L_{2}=\frac{(x+1)\,x\,(x-1)}{(3)(2)(1)}=\frac{(x+1)x(x-1)}{6}.

Step 2 — Regroup into the difference combination

We must show

ux=yu0+xu1+y(y21)6(u12u0+u1)+x(x21)6(u22u1+u0),u_x=y\,u_0+x\,u_1+\frac{y(y^2-1)}{6}(u_1-2u_0+u_{-1})+\frac{x(x^2-1)}{6}(u_2-2u_1+u_0),

with y=1xy=1-x. Substitute the differences and collect the coefficient of each uiu_i on the right-hand side:

Coefficient of u1u_{-1}: y(y21)6\dfrac{y(y^2-1)}{6}. With y=1xy=1-x,   y21=(y1)(y+1)=(x)(2x)\;y^2-1=(y-1)(y+1)=(-x)(2-x), so y(y21)6=(1x)(x)(2x)6=x(x1)(x2)6=L1.\dfrac{y(y^2-1)}{6}=\dfrac{(1-x)(-x)(2-x)}{6}=-\dfrac{x(x-1)(x-2)}{6}=L_{-1}.

Coefficient of u2u_2: x(x21)6=x(x1)(x+1)6=L2.\dfrac{x(x^2-1)}{6}=\dfrac{x(x-1)(x+1)}{6}=L_{2}.

Coefficient of u0u_0: y2y(y21)6+x(x21)6y-2\cdot\dfrac{y(y^2-1)}{6}+\dfrac{x(x^2-1)}{6}. Substituting y=1xy=1-x and simplifying gives exactly L0=(x+1)(x1)(x2)2.L_0=\dfrac{(x+1)(x-1)(x-2)}{2}.

Coefficient of u1u_1: x+y(y21)62x(x21)6x+\dfrac{y(y^2-1)}{6}-2\cdot\dfrac{x(x^2-1)}{6}. Simplifying gives exactly L1=(x+1)x(x2)2.L_1=-\dfrac{(x+1)x(x-2)}{2}.

Since the coefficient of each of u1,u0,u1,u2u_{-1},u_0,u_1,u_2 matches the corresponding Lagrange coefficient Li(x)L_i(x), the two expressions for uxu_x are identical.

Step 3 — Result

Answer

  ux=yu0+xu1+y(y21)3!Δ2u1+x(x21)3!Δ2u0,x+y=1.  \boxed{\;u_x=y\,u_0+x\,u_1+\frac{y(y^2-1)}{3!}\,\Delta^2 u_{-1}+\frac{x(x^2-1)}{3!}\,\Delta^2 u_0,\qquad x+y=1.\;}
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.