Question: Upload your code to a file named HW 4 _ Question 4 . py and use this code to solve the following: a ) Plot

Upload your code to a file named HW4_Question4.py and use this code to solve the following:
a) Plot the Lagrange polynomial interpolation for f(x)=x2, using the following
points. Plot both the polynomial and the actual graph of f(x) for 1000 values of
x between 0 and 6. Upload your plot and name it "HW4_Question4a_plot.png"
02=0
12=1
22~~1.4142135624
42=2
62~~2.449489742783
b) Plot the error in the polynomial approximation from part (a) and upload it to a
file named "HW4_Question4b_plot.png"
 Upload your code to a file named HW4_Question4.py and use this

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!