Question: using python, ( b ) Evaluation As discussed in class, we can write the interpolating polynomial as: p n ( x ) = ( x

using python, (b) Evaluation
As discussed in class, we can write the interpolating polynomial as:
pn(x)=(x)j=0nwj*yj(x-xj).
where
(x)=(x-x0)(x-x1)cdots(x-xn)
=prodi=0n(x-xi)
pn(x)=j=0nwj*yj(x-xj)j=0nwj(x-xj).
where the term (x) has been eliminated.
You may use either formulation.
def EvalLagr(Z, X, Y, w):
"""
Evaluate the Lagrange Polynomial using the barycentric weights
Takes 4 input parameters
z array containing the points at which to evaluate the polynomial
x containing the nodal points
Y containing the function value at x
w barycentric weights
Returns the interpolating polynomial evaluated at the points Z.
#
#
#
return PnZ
 using python, (b) Evaluation As discussed in class, we can write

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!