- Let f(x) = ex, for 0 x 2.
- Approximate f(0.25) using linear Lagrange interpolation with x0 = 0 and x1 = 0.5. Approximate f(0.75) using linear Lagrange interpolation with x0 = 0.5 and x1 = 1.
iii. Approximate f(0.25) and f(0.75) by using the second Lagrange interpolating polynomial with x0 = 0, x1 = 1, and x2 = 2. iv. Which approximations are better and why?
- Use appropriate Lagrange interpolating polynomials of degrees one, two, and three toapproximate each of the following:
- f(8.4) if f(8.1) = 16.94410, f(8.3) = 17.56492, f(8.6) = 18.50515, f(8.7) =
18.82091
- 33493750,
- Find the Lagrange form of interpolating polynomial P2(x) that interpolates the function f(x) = ex2 at the nodes x0 = 1,x1 = 0 and x2 = 1. Further, find the value of P2(0.9) (use 6-digit rounding). Compare the value with the true value f(0.9) (use 6digit rounding). Find the max error in this calculation.
- Use the following values and four-digit rounding arithmetic to construct a third Lagrange polynomial approximation to f(1.09). The function being approximated is f(x) = log10(tanx). Use this knowledge to find a bound for the error in the approximation. f(1.00) = 0.1924, f(1.05) = 0.2414, f(1.10) = 0.2933, f(1.15) = 0.
- Write three programs that accept as inputs (x1,,xn), (f1,,fn), z R and return P(f[x1,,xn])(z), where the interpolating polynomial P(f[x1,,xn]) is computed using
- the monomial basis.ii. the Lagrange basis.
iii. the Newton basis.
Use your program to interpolate the error function erf, which is defined by
and which can be evaluated using the Matlab function erf, at the points 1,1.2,1.4,,3 (or you can compute it in other way also). Plot the error between erf and the interpolating polynomial P(f[x1,,xn]) computed with each of your three programs at z = (0 : 0.01 : 4) (here, 0.01 is step size). Based on your results, would you recommend using polynomial interpolation to approximate erf at points outside [1 3]?
Plot the error between the interpolation polynomial computed using the monomial basis and the Newton basis and plot the error between the interpolation polynomial computed using the Lagrange basis and the Newton basis. Which method introduces the largest error in computing the interpolation polynomial.
END
Reviews
There are no reviews yet.