Please answer question 8. Attached are question 1 andquestion 7. Question 7 is the previous problem.
1. Find the Lagrange interpolating polynomial through the points (0, 1), (2, 3), (3, 0).
7. (Coding) In this problem we will write code to create a program which takes as input 2 arrays of numbers, (x1,x2,...,xn) and (y₁, 92,..., yn), and outputs the equations of the natural cubic spline between these points. 1 (a) Create a function which takes as an input these two arrays and outputs the matrix and solution vector to find our vector c. (b) Use a (built-in) linear system of equations solver to find the vector c based on the outputs from (a). (c) Use your vector c as well as your points x and y to find b and d.
8. (Coding) Repeat question (1), but instead use cubic splines and your code from the previous problem.
Please answer question 8. Attached are question 1 and question 7. Question 7 is the previous problem.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am