Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help coding this in Python In Newton's form of the interpolation polynomial we need to mpute the coefficients, Cg = 01. Cl = flZg.

image text in transcribed

Need help coding this in Python

In Newton's form of the interpolation polynomial we need to mpute the coefficients, Cg = 01. Cl = flZg. 2:11. . . . .4 0.2.1. . . . . .nl. In the table of divided differences we proceed colu by colun and the needed coefficients are in the upperst di agonal. A simple 1D array, of size 1, can be used to store and compute these values. We just have to compute them from bottom to top to avoid losing values we have already computed. The following pseudocode does precisely this for 0,1... , c,- end for k.. .n for j = n, n-1 end The evaluation of the interpolation polynomial in Newton's form can be then done with the Horner-like schene seen in class: for j = n-1,n-2, . . . ,0 p=c, + (1-1))-p; end (a) Write computer codes to compute the coefficients co.,c and to evaluate the corresponding interpolation polynomial at an arbitrary point Test your codes and turn in a run of your test (b) Cotsiler the function f(z) = e-forz E [-1, 1] and the nodesz,--1 +, (2/10) 0,1,..,10. Use your code(s) in (a) to evaluate Pio(x) at the points ,-1+ 3(2/100), j = 0, l' . . . . 100 and plot the error f(z)-P10(z)

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

Students also viewed these Databases questions

Question

Would you advise David to accept the position? Why or why not?

Answered: 1 week ago

Question

What were the issues and solutions proposed by each team?

Answered: 1 week ago

Question

3. Who would the members be?

Answered: 1 week ago