Question: require Python to solve 1. Lagrange interpolation a. Write the following function so that it returns P() at a specified value of z, where P()




require Python to solve
1. Lagrange interpolation a. Write the following function so that it returns P() at a specified value of z, where P() is the interpolating polynomial for the points whose r and y values are given by the lists xdat and ydat, respectivey. For your function, implement the Lagrange construction of the interpolating polynomial. In def lagrange_interp(x, xdat,ydat): # x is a number # xdat is a list, [x1,x2, # ydat is a list ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
