The following values of the function $f(x) = \sin x + \cos x$, are given $x$: 10°, 20°, 30° $f(x)$: 1.1585, 1.2817, 1.3660 Construct the quadratic interpolating polynomial that fits the data. Hence, find $f(\pi/12)$. Compare with the exact value.
Aakash Om Trivedi, AIR 73, 2025
Using, lagrange interpolation,
$x$ in degree
Quadratic
$f\left(\frac{\pi}{12}\right)$ $\to$ converting to degree
$f(15) = \frac{(1.1585)(15-20)(15-30)}{200} + \frac{1.2817\,(15-10)(15-30)}{-100} + \frac{1.3660}{200}(15-10)(15-20)$
$= \frac{1.1585\,(-5)(-15)}{200} + \frac{1.2817 \times 5 \times -15}{-100} + \frac{1.3660}{200}(5)(-5)$
$= 1.2257125$
original
$f\left(\frac{\pi}{12}\right) = \sin\left(\frac{\pi}{12}\right) + \cos\left(\frac{\pi}{12}\right) = 1.22474487$
$|Error| = F(x)|_{exact} - F(x)|_{calculated}$
putting value
$|Error| = 9.67 \times 10^{-4}$.