Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please just need to do the c++ programming, thanks Polynomial Interpolation Given the data below, perform manual calculations (single precision) to: a) construct the Newton

image text in transcribed

please just need to do the c++ programming, thanks

Polynomial Interpolation Given the data below, perform manual calculations (single precision) to: a) construct the Newton divided-difference table and determine the coefficients. b) build the Newton's interpolation polynomial and find the function approximation at xnew=3.8 Given the data below, perform manual calculations (single precision) to a) determine the coefficients of Lagrange interpolating polynomial. b) build the Lagrange's interpolation polynomial and find the function approximation at =3.1 Write a C++ program that calculates the interpolated polynomial at a given point using Newton's divideddifferences method. procedure Coef(n,(xi),(yi),(ai)) integer i,j,n; real array (xi))0:n,(yi)0:n,(ai)0:n for i=0 to n do aiyi end for for j=1 to n do for i=n to j step 1 do ai(aiai1)/(xixij) end for end for end procedure Coef Newton form (divided differences) The pseudocode includes 2 separate functions: Coef, Eval Legend: - n is the number of points (x,f(x)) that are interpolated - xi is an array with the values of x - yi is an array with the values of f(x) - ai is an array for the calculated coefficients - t is the value at which the polynomial is evaluated xnew - For questions 1, and 2 perform hand calculations; record the answers in the shaded boxes of the provided Excel file (see example); scan the hand calculations; and Submit on Avenue the scanned hand calculations - For question 3 Create a C++ source file with a main program that initializes the n=4 (there are 5 points starting with 0 ) and xnew,, populates the known arrays x [5] and y[5], defines the array a[5], calls the separate function "Coef" and "Eval using the pseudocodes shown above, displays the polynomial coefficients a[i] passed back by "Coef", and displays the value of the polynomial P(xnew) returned by "Eval". Write the value of xnew and the corresponding value of the polynomial value P(xnew) in the shaded box of the provided Excel file Paste in the Excel file a picture of your C++ program output (console); without a picture proof, the answer to C++ question will not be credited Submit on Avenue the C++ source file .cpp (not the solution file .sIn!). - Submit on Avenue the Excel file with your answers (an example on how to fill it is provided)

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

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions

Question

=+5. Is the public perception about your organization correct?

Answered: 1 week ago

Question

What were your most important educational experiences?

Answered: 1 week ago

Question

Which personal relationships influenced you the most?

Answered: 1 week ago