PLEASE NOTE:
Unless otherwise stated, the arguments of any trigonometric functions given in this module are in radians.
The questions given below are based on the following data for a certain function:
$x_i$ | 1.0 | 1.1 | 1.3 | 1.5 | 1.9
$f(x_i)$ | 1.84 | 1.96 | 2.21 | 2.45 | 2.94
Question 1
(a) Approximate $f(1.4)$ using
(i) Lagrange interpolating polynomials of degree two and three;
(ii) Newton's divided difference interpolating polynomials of degree two and three.
(b) Approximate $f(1.4)$ and the error when using the following:
(i) the least-squares polynomial of degree two;
(ii) a least-squares function of the form $bx^a$.
(c) Plot, on the same axes, the second degree polynomials in (a) and (b) above (i.e. Lagrange, Newton's and least-squares) and compare with the given data.
Question 2
(a) Find the clamped cubic spline that approximates $f(1.4)$ using the data points at $x_i = 1.3, 1.5$ and 1.9
(b) Find the Bezier polynomial between the points (1.1, 1.96) and (1.9, 2.94) that makes use of (1.3, 2.21) and (1.5, 2.45) as guide points.
(c) Which of the polynomials in (a) and (b) do you think approximates the function more closely? Justify your answer.
2