Professional Documents
Culture Documents
Curve Fitting Exercises
Curve Fitting Exercises
1. Given data:
x 0 1 2 3
y 1 0 5 22
Construct Lagrange polynomial. Compare with the real function f ( x )=x 3−2 x +1 is known.
Compare Lagrange polynomial with the real function f ( x ) .
2. Given data:
x 2 4 8
y 1 2 3
a) Construct linear interpolation.
b) Construct Lagrange polynomial.
c) The real function is f ( x )=log 2 ( x ) . Graph it, graph the data points, linear interpolation lines
and the Lagrange polynomial. Compare how linear interpolation and Lagrange polynomial
approximate the real function f ( x ) .