Question 4 of 7: Lagrange Interpolation and Forward-Difference Derivatives
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
National Examinations, December 2017 — 04-BS-5 Advanced Mathematics, 3 hours, closed book (approved Casio/Sharp calculator and one double-sided aid sheet permitted). Any five of the seven questions constitute a complete paper and all questions are of equal value; all seven are answered below as a full study resource.
Reference texts: Kreyszig, Advanced Engineering Mathematics, 10th ed. (Wiley) — Ch. 11 (Sturm–Liouville Problems, Fourier Series, Fourier Integrals and Transforms), Ch. 19 (Numerics in General: interpolation, numerical differentiation, Romberg integration, iterative equation solving), Ch. 20 (Numeric Linear Algebra: LU/Crout factorization). Supporting: Chapra & Canale, Numerical Methods for Engineers, 7th ed. — Ch. 5–6 (bracketing and open root-finding methods), Ch. 18 (interpolation), Ch. 22 (Romberg integration); Strang, Introduction to Linear Algebra, 6th ed. — Ch. 2 (LU factorization).
Given (A). Five data points, with $x=-3,-1,0,1,4$ and $f(x)=0,-36,0,16,-56$.
Given data for the Lagrange interpolation (Part A)
$x$
$-3$
$-1$
$0$
$1$
$4$
$f(x)$
$0$
$-36$
$0$
$16$
$-56$
Find (A). The unique interpolating polynomial of degree $\le4$ through these five points.
Given (B). $f(x)$ tabulated at ten equally spaced nodes $h=1$ apart, $x=-4$ to $x=5$.
Given data for the forward-difference derivatives (Part B)
$x$
$-4$
$-3$
$-2$
$-1$
$0$
$1$
$2$
$3$
$4$
$5$
$f(x)$
$600$
$233$
$86$
$39$
$20$
$5$
$18$
$131$
$464$
$1185$
Find (B). $f'(-3),f''(-3),f'''(-3),f^{(4)}(-3)$ using the supplied 5-point forward-difference stencils with $h=1$.
Approach. (A) Build the five Lagrange basis polynomials $L_k(x)$ and sum $\sum f(x_k)L_k(x)$, then expand and simplify. (B) Read the five needed table values starting at $x_0=-3$ and substitute directly into each supplied formula.
(A) Lagrange basis and sum. With nodes $x_0,\dots,x_4=-3,-1,0,1,4$,
$$P(x)=\sum_{k=0}^{4}f(x_k)\prod_{j\ne k}\dfrac{x-x_j}{x_k-x_j}$$
Only $x_k=-1$ and $x_k=1$ contribute (the others have $f(x_k)=0$):
$$L_{-1}(x)=\dfrac{(x+3)(x-0)(x-1)(x-4)}{(-1+3)(-1-0)(-1-1)(-1-4)},\qquad L_{1}(x)=\dfrac{(x+3)(x+1)(x-0)(x-4)}{(1+3)(1+1)(1-0)(1-4)}$$
so $P(x)=-36\,L_{-1}(x)+16\,L_1(x)$.
Expand and simplify. Carrying out the expansion collapses to a single quartic:
$$\boxed{P(x)=x^{4}-4x^{3}-11x^{2}+30x}$$
Factor as a bonus check. Because $P(-3)=P(0)=0$, $x$ and $(x+3)$ are factors; dividing out leaves $x^3-4x^2-11x+30=(x+3)(x^2-7x+10)=(x+3)(x-2)(x-5)$, so remarkably
$$P(x)=x(x+3)(x-2)(x-5)$$
— two clean integer roots ($x=2,5$) that were never among the five given nodes, a convenient way to re-check the expansion by evaluating $P(2)$ and $P(5)$ independently and confirming both equal zero.
(B) Identify the stencil values. With $x_0=-3,\ h=1$: $f_0=f(-3)=233,\ f_1=f(-2)=86,\ f_2=f(-1)=39,\ f_3=f(0)=20,\ f_4=f(1)=5$.
First derivative.
$$f'(-3)\approx\dfrac{1}{12}\big[-25(233)+48(86)-36(39)+16(20)-3(5)\big]=\dfrac{-2796}{12}=\boxed{-233.0}$$
Second, third and fourth derivatives. Substituting the same five values into the remaining stencils,
$$f''(-3)\approx\dfrac{2592}{12}=\boxed{216.0},\qquad f'''(-3)\approx\dfrac{-288}{2}=\boxed{-144.0},\qquad f^{(4)}(-3)\approx\dfrac{48}{1}=\boxed{48.0}$$