Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given data ( x 1 , y 1 ) , ( x 2 , y 2 ) , cdots, ( x n , y n

Given data
(x1,y1),(x2,y2),cdots,(xn,yn)
we know that it is always possible to find the unique (at most)n-1 degree polynomial
P(x) that interpolates the data, i.e.,P(xi)=yi,i=1,2,dots,n.
In class we learned that by assuming P has the form
P(x)=a0+a1x+a2x2+cdots+an-1xn-1
we can solve a system of equations for the unknowns a0,a1,dots,an-1 that is of the form
VA=Y. Here V is a Vandermonde matrix that depends on x1,x2dots,xn, and Y is
the vector with components y1,y2dots,yn.
In the method of divided differences we assume that P has the form
P(x)=a0+a1(x-x1)+a2(x-x1)(x-x2)+cdots+an-1(x-x1)(x-x2)cdots(x-xn-1).
We are justified in doing this by the result of problem (3).
In this case we solve a system of equations for the unknowns a0,a1,dots,an-1 that is of
the form DA=Y,D is a matrix that depends on x1,x2dots,xn, and Y is the vector
with components y1,y2dots,yn.
(a) Write a MATLAB function that generates this matrix D. Your function has as
input x=(x1,x2dots,xn) and has as output the nn matrix D. Let the prototype
be D= dividedDifference (x).
(b) Write a MATLAB function which finds the polynomial interpolating the given
data. Use your function from part (4a) to help you. Your function will have
input x and Y, the xj and yj variables respectively, and will output the coeffi-
cients, P=(a0,a1,dots,an-1), of the desired polynomial. The prototype is P=
divDiffPoly (x,Y).
(c) Show that the nn matrix D has rank n.
image text in transcribed

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

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions