Find the interpolating polynomial passing through the points
,
,
,
, using the Lagrange method.
By using the Lagrange method, we need to find the lagrange basis polynominals first.Since we know
![{\displaystyle {\begin{aligned}x_{0}&=1&&&&&f(x_{0})&=2\\x_{1}&=3&&&&&f(x_{1})&=4\\x_{2}&=5&&&&&f(x_{2})&=6\\x_{3}&=7&&&&&f(x_{3})&=8.\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c807fff05583a03e75010472d91248256ee5e289)
So we can get the basis polynominals as following:
![{\displaystyle \ell _{0}(x)={x-x_{1} \over x_{0}-x_{1}}\cdot {x-x_{2} \over x_{0}-x_{2}}\cdot {x-x_{3} \over x_{0}-x_{3}}=-{1 \over 48}(x-3)(x-5)(x-7)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/afaf1c19d14fe1009e3d5da37d3aeac06f9e2784)
![{\displaystyle \ell _{1}(x)={x-x_{0} \over x_{1}-x_{0}}\cdot {x-x_{2} \over x_{1}-x_{2}}\cdot {x-x_{3} \over x_{1}-x_{3}}={1 \over 16}(x-1)(x-5)(x-7)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/962c8368fd246d9a55ee5d4fb0f9bdecdbaa9933)
![{\displaystyle \ell _{2}(x)={x-x_{0} \over x_{2}-x_{0}}\cdot {x-x_{1} \over x_{2}-x_{1}}\cdot {x-x_{3} \over x_{2}-x_{3}}=-{1 \over 16}(x-1)(x-3)(x-7)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f1c18aba37b499fef1a82f326ff81c2ea150e784)
![{\displaystyle \ell _{3}(x)={x-x_{0} \over x_{3}-x_{0}}\cdot {x-x_{1} \over x_{3}-x_{1}}\cdot {x-x_{2} \over x_{3}-x_{2}}={1 \over 48}(x-1)(x-3)(x-5).}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0504e34f6b90327d59c2035327a3e183395f6143)
Thus the interpolating polynomial then is:
![{\displaystyle {\begin{aligned}L(x)&=f(x_{0})\ell _{0}(x)+f(x_{1})\ell _{1}(x)+f(x_{2})\ell _{2}(x)+f(x_{3})\ell _{3}(x)\\[10pt]&=2\cdot {1 \over 16}(x-1)(x-5)(x-7)+4\cdot {-1 \over 16}(x-1)(x-3)(x-7)+6\cdot {-1 \over 16}(x-1)(x-3)(x-7)+8\cdot {1 \over 48}(x-1)(x-3)(x-5)\\[10pt]&={\frac {5}{12}}x^{3}-{\frac {65}{12}}x^{2}+{\frac {247}{12}}x-{\frac {163}{12}}.\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0f8425accdce1cdf4d8c668a1812b07f59893ede)
Therefore, we get the Lagrange form interpolating polynomial: