Question: 3 . 2 . 2 . 1 Lagrange interpolation The principles of Lagrange interpolation were introduced in the lecture. Recall that this takes a set

3.2.2.1 Lagrange interpolation
The principles of Lagrange interpolation were introduced in the lecture. Recall that this takes a set of n+1 data points, (xk,fk) with k=0,dots,n, and defines Lagrange basis polynomials by
]=[0
The Lagrange interpolating polynomial is then defined by
P(x)=k=0nfkLk(x).
Note that, for convenience in Python, indices in equations (3.1) and (3.2) start at 0. There are n+1 interpolation points and P(x) is therefore of degree n.
20
CHAPTER 3. INTERPOLATION
Write a function lagrange_poly which computes the k th Lagrange basis polynomial. It should take as arguments an array of points x, the list of interpolation points xk, and an integer k, and return an array of numbers Lk(x) according to (3.1).
Write a function interpolating_poly which computes the Lagrange interpolating polynomial given by (3.2). It should take as arguments an array of points x and lists of data points xk and fk, and call the function lagrange_poly when necessary.
 3.2.2.1 Lagrange interpolation The principles of Lagrange interpolation were introduced in

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!