Question: Use a given function f ( x ) = 2 7 0 + 1 4 1 x - 1 5 4 x 2 - 1

Use a given function f(x)=270+141x-154x2-12x3+12x4-x5 to generate a set of N=10 of equidistant
interpolation nodes f(xi)=yi,i=1,dots,N in the range -4,0.
Case 1: Construct at interpolation nodes (xi,yi) of the Lagrange interpolation polynomial P(x) and
compute values of P(x) at points placed 6 times denser than the selected set of the interpolation nodes.
Show the continuous function f(x), interpolation nodes (xi,yi) and Lagrange interpolation polynomials
P(x) in one plot (Figure 1).
Case 2: Repeat the same task for Chebyshev distribution of N interpolation nodes and show the result
in Figure 2.
Estimate the mean accuracy 1n-1j=1n-1|f(xj)-yj| and maximum interpolation error max |f(xj)-yj|j=1n-1 in each
case. Print four values in the file 'results.txt' with corresponding labels.
Create a pdf file Name_task1_nrN.pdf with the text of your code, Figure 1, Figure 2 and four values
of the accuracy.
 Use a given function f(x)=270+141x-154x2-12x3+12x4-x5 to generate a set of N=10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!