What is the best choice ie minimizing the interpolation


You need help representing the function given by the Matlab code above on the interval [0,2] by a polynomial P(x). The specific form of f(x) is not given but you know how to evaluate this function at any given point x (by calling the Matlab function). The function evaulation is costly, so you can compute the values only at 6 points xi in the interval [0,2].

(a) What is the best choice (i.e. minimizing the interpolation error) of points x1,x2,x3,x4,x5,x6? Give the formula for xi and using Matlab produce a table with numerical values of xi and corresponding values f(xi)

(b) Use the interpolation points xi and the values f(xi) to construct the interpolating polynomial P(x). What is the degree p of this polynomial? Express this polynomial in the form P(x)= ao + a1x + ... + apx^p (i.e. find the values of the coefficients).

(c) Use the constructed interpolation polynomial to approximate the integral of f(x) from [0,2]. (perform explicit calculations for integral(P(x)dx) from [0,2], substitute numerical values computed for ak and then evaluate the integral).

Math 353 d) Type the code below into a MATLAB file funf.m (both functions funf and law are entered in the single file funf.m exactly as typed below.

Make sure that everything is entered exactly as displayed below. function y fun f (x) [0 10] zo ode 45 (01aw, [0 x+0.1] ,z0) y Z (end, 1) end function dz law (t ,z) dz zeros (2,1) dz (1) z (2) dz (2) 9.8 z (1)-2*z (2) end.

Then evaluate the finite difference formulas derived above at 1 and h 10 2. Report the results and compare the accuracy of the derived formulas.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What is the best choice ie minimizing the interpolation
Reference No:- TGS02872404

Expected delivery within 24 Hours