Answer on Question #56855 β Math β Algorithms | Quantitative Methods
For the given functions f (x), let x0 = 0, x1 = 0.6, and x2 = 0.9. Construct interpolation polynomials of degree
at most one and at most two to approximate f (0.45), and find the absolute error.
a. f (x) = cos x
Solution
π¦0 = π(π₯0 ) = cos 0 = 1;
π¦1 = π(π₯1 ) = cos 0.6 = 0.8253;
π¦2 = π(π₯2 ) = cos 0.9 = 0.6216;
a) The Lagrange interpolation polynomial of degree at most 1 is constructed as follows:
π₯1 β π₯
π₯ β π₯0
π¦0 +
π¦ , πππ π₯ β [π₯0, π₯1],
π₯ βπ₯
π₯1 β π₯0 1
πΏ1 (π₯) = { π₯1 β π₯0
π₯ β π₯1
2
π¦1 +
π¦ , πππ x β [x1, x2],
π₯2 β π₯1
π₯2 β π₯1 2
πΏ1 (π₯) = {
1 β 0.2912π₯, πππ π₯ β [0, 0.6],
1.2327 β 0.679π₯, πππ π₯ β [0.6, 0.9],
π(0.45) β 0.8690 is approximated through the linear Lagrange polynomial: π(0.45) = cos 0.45 = 0.9004.
The absolute error is
|0.9004 β 0.8690| = 0.0314.
b) The Lagrange interpolation polynomial of degree at most 2 is constructed as follows:
πΏ2 (π₯) = π0 (π₯)π¦0 + π1 (π₯)π¦1 + π2 (π₯)π¦2 ,
where
π0 (π₯) = (
π₯ β π₯1
π₯ β π₯2
)(
)
π₯0 β π₯1 π₯0 β π₯2
π1 (π₯) = (
π₯ β π₯0
π₯ β π₯2
)(
)
π₯1 β π₯0 π₯1 β π₯2
π2 (π₯) = (
π₯ β π₯0
π₯ β π₯1
)(
)
π₯2 β π₯0 π₯2 β π₯1
π(0.45) β 0.8980 is approximated through the quadratic Lagrange polynomial.
The absolute error is
|0.9004 β 0.8980 | = 0.0024.
www.AssignmentExpert.com
© Copyright 2026 Paperzz