HW7_2 This problem uses an interpolating polynomial to estimate the area under a curve. Fit the interpolating polynomial to the following set of points. These points are the actual values of f(x) =...


HW7_2 This problem uses an interpolating polynomial to<br>estimate the area under a curve. Fit the interpolating<br>polynomial to the following set of points. These points are<br>the actual values of f(x) = sin (e* – 2)<br>0.4<br>0.8<br>1.2<br>1.6<br>y -0.8415 |-0.4866 0.2236 0.9687 0.1874<br>a) Plot the function f(x) and the interpolating polynomial, using different colors. Use polyfit and<br>polyval. Also include the data points using discrete point plotting.<br>b) We wish to estimate the area under the curve, but this function is difficult to integrate. Hence, instead<br>1.6<br>of finding ° sin(e* – 2) dx (which is the same as finding the area under the curve sin (e* – 2) ),<br>we will compute the area under the interpolating polynomial over the domain 0 <x< 1.6.<br>Polynomials are easy to integrate. So, after doing the integration by hand, use MATLAB to compute the<br>value of the exact integral. Print the result using fprintf.<br>c) Do you believe that this is a good estimate? Write in comments.<br>

Extracted text: HW7_2 This problem uses an interpolating polynomial to estimate the area under a curve. Fit the interpolating polynomial to the following set of points. These points are the actual values of f(x) = sin (e* – 2) 0.4 0.8 1.2 1.6 y -0.8415 |-0.4866 0.2236 0.9687 0.1874 a) Plot the function f(x) and the interpolating polynomial, using different colors. Use polyfit and polyval. Also include the data points using discrete point plotting. b) We wish to estimate the area under the curve, but this function is difficult to integrate. Hence, instead 1.6 of finding ° sin(e* – 2) dx (which is the same as finding the area under the curve sin (e* – 2) ), we will compute the area under the interpolating polynomial over the domain 0 <>< 1.6.="" polynomials="" are="" easy="" to="" integrate.="" so,="" after="" doing="" the="" integration="" by="" hand,="" use="" matlab="" to="" compute="" the="" value="" of="" the="" exact="" integral.="" print="" the="" result="" using="" fprintf.="" c)="" do="" you="" believe="" that="" this="" is="" a="" good="" estimate?="" write="" in="">

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here