Add a fourth observation
At times 0, 1 and 2 a displacement takes values 1, 2 and 5. Construct its Newton polynomial. Append a value of 13 at time 3 and evaluate the revised prediction at 1.5.
Worked solution
The first differences are 1 and 3; the second is 1. The quadratic is
At 3 its value is 10.
The new coefficient is
The correction at 1.5 is \(0.5(1.5)(0.5)(-0.5)=-0.1875\). The revised value is
All three original nodes annul the added term.
Explore the related calculation with adjustable inputs. Vary a slope or endpoint value and examine how an interpolant changes between observations. Map this exercise’s interval to the unit interval before comparing the basis functions.
Combine a slope with two values
Find a quadratic with \(p(1)=4\), \(p'(1)=-1\) and \(p(3)=6\). If the last measurement changes by 0.2, find the change of the midpoint prediction while preserving the first two conditions.
Worked solution
Write \(p=4-(x-1)+c(x-1)^2\). At 3 this gives \(2+4c=6\) and hence \(c=1\). The midpoint prediction at 2 is 4.
The revised curvature coefficient rises by \(0.2/4=0.05\), so \(p(2)\) rises by 0.05. The effect at the repeated node and its derivative both vanish, as the original conditions demand.
Explore the related calculation with adjustable inputs. Vary a slope or endpoint value and examine how an interpolant changes between observations. Map this exercise’s interval to the unit interval before comparing the basis functions.
Certify a line
Approximate \(x^2\) on \([0,2]\) by a line parallel to its endpoint interpolant. Choose the vertical shift minimising the uniform error. Show that allowing a different slope cannot improve the result.
Worked solution
The interpolant is \(2x\). Its error \(x^2-2x=(x-1)^2-1\) lies between \(-1\) and 0. Dropping the line by 0.5 centres the error range, giving \(p=2x-0.5\).
At 0, 1 and 2 the errors are \(+0.5,-0.5,+0.5\). Any strictly better line would differ from this one by a polynomial changing sign twice. A nonzero linear polynomial cannot have those two distinct roots. Thus 0.5 is globally optimal.
Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.