Questions:
Find Lagrange polynomials that approximate
5
f x x
(a) Find the linear interpolation polynomial using the nodes
(b) Find the quadratic interpolation polynomial using the nodes
(с) Find the cubic interpolation polynomial using the nodes
(d) Find the linear interpolation polynomial using the nodes
(e) Find the quadratic interpolation polynomial using the nodes
2. Use the centers x0= 2, =3 , =5, x3=5 and the coefficients =-2, =0,4, =1,5,
= -0,4, and = 0,0005 to find the Newton polynomials (x), (x), (x), and (x),
and evaluate them at the value x=c=2,7.
Hint. Use equations (1) through (4)
(1)
(2) ),
(3)
(4)
4
Name ……………………………. Date ……………………………..
Second name
(surname)……………………….
Part 3 (Bisection Method)
Consider finding the root of f(x) = x
2
– 5. Let εstep = 0.01, εabs = 0.01 and start with the interval
[1, 2].
Table 1. Bisection method applied to f(x) = x
2
– 5.
a b f(a) f(b) c = (a + b)/2 f(c) Update new b −
Answers:
Ans 1.
(a)
(b)
(c)
(d)
(e)
Ans 2.
Ans3.
a | b | f(a) | f(b) | c=(a+b)/2 | f(c) | Update | new b-a |
1 | 2 | -4 | -1 | 1.5 | -2.75 | c=a=1.5 | 0.5 |
1.5 | 2 | -2.75 | -1 | 1.75 | -1.9375 | c=a=1.75 | 0.25 |
1.75 | 2 | -1.9375 | -1 | 1.875 | -1.48438 | c=a=1.875 | 0.125 |
1.875 | 2 | -1.48438 | -1 | 1.9375 | -1.2461 | c=a=1.9375 | 0.0625 |
1.9375 | 2 | -1.2461 | -1 | 1.96875 | -1.124 | c=a=1.96875 | 0.03125 |
1.96875 | 2 | -1.124 | -1 | 1.98438 | -1.062 | c=a=1.98438 | 0.01562 |
1.98438 | 2 | -1.06224 | -1 | 1.99219 | -1.03118 | c=a=1.99219 | 0.00781 |