1. Write a function lagrange_poly which computes the kth 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). 2. Write a function interpolating_poly which computes the Lagrange interpolating polynomial given by (3.2). It should take as arguments an array of points z and lists of data points and fk, and call the function lagrange_poly when necessary.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
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, (æk, fk) with k = 0,..., n, and defines Lagrange basis polynomials by
Lk(x) =
n
II
20
i=0
i#k
T-Ti
Thi
k = 0,..., n.
The Lagrange interpolating polynomial is then defined by
n
P(x) = Σ fkLk (x).
k=0
(3.1)
(3.2)
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.
CHAPTER 3. INTERPOLATION
1. Write a function lagrange_poly which computes the kth 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 L(x) according to (3.1).
2. 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 k
and fk, and call the function lagrange_poly when necessary.
Transcribed Image Text: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, (æk, fk) with k = 0,..., n, and defines Lagrange basis polynomials by Lk(x) = n II 20 i=0 i#k T-Ti Thi k = 0,..., n. The Lagrange interpolating polynomial is then defined by n P(x) = Σ fkLk (x). k=0 (3.1) (3.2) 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. CHAPTER 3. INTERPOLATION 1. Write a function lagrange_poly which computes the kth 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 L(x) according to (3.1). 2. 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 k and fk, and call the function lagrange_poly when necessary.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY