Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I 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)

image text in transcribed

I 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

Do I write the fractions like a/b for this problem?

Answered: 1 week ago