. Construct the Newton form of the interpolating polynomial of degree 8 for the
ID: 3726955 • Letter: #
Question
. Construct the Newton form of the interpolating polynomial of degree 8 for the function (x) using the data points at x - 8,6, 4,-2,0, 2,4, 6, 8. Part I. Use Maple to do the following task. 1. Create the nine data points 2. Create the divided difference table using the data set 3. Create the Newton form of the interpolating polynomial of degree 8, Pi(x) using the data set. 4. Evaluate fix), Ps(x), and I fx-Pr(x) for the 17 points at x =-8-7,6,5,4,3,-2,-1, 0, 1, 2, 3, 4, 5, 6,7,8 5. Plot fix) and Pio) Part II. Use Visual Studio 2015 to do the following task 1. Create a C++ console application project in Visual Studio 2015 and name your project YourLastName3. 2. Write a program that implements the Newton Interpolation discussed in class 3. Write a separate function for each of the following. You may define and call additional fiunctions. . Computation of divided differences .Evaluation of the interpolating polynomial Must use a nested form as discussed in class. 4. Your program must store divided differences in a single dimensional array 5. All floating point arithmetic will be double precision. 6. Program input: Sequence of x values of data points Sequence of x values to evaluate P(x) 7. Program output .Divided differences at each iteration . Table containing f(x), P(x), )-P( for the 17 data points.Explanation / Answer
Answer is given to the first question (Maple: try Student:-NumericalAnalysis package. )
L:=[ -8,-6,-4,-2,0,2,4,6,8]:
p:=Student:-NumericalAnalysis:-PolynomialInterpolation(
[seq([x,(1/(x^2+1)], x in L)],
method=newton):
interpol:=Student:-NumericalAnalysis:-Interpolant(p,independentvar=x);
plots:-dualaxisplot(plot([(1/(x^2+1),interpol],x=0..1),
plot([(1/(x^2+1)-interpol],x=0..1,legend=`abs. error`));
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.