Question: use from scipy.interpolate import lagrangeNeeds to be written in Python 1. For the given function f(.'E) = sin(7r;r:), let 1:0 : 1, 2:1 = 1.25,
use from scipy.interpolate import lagrangeNeeds to be written in Python

1. For the given function f(.'E) = sin(7r;r:), let 1:0 : 1, 2:1 = 1.25, 1:2 = 1.6 and 3:3 = 1.8. (a) (CODING 3 PTS.) Suppose we wish to approximate f (1.4). We will construct 4 different interpolating polynomials. Let 1313(3) be the interpolating line for f (.L') on $1 and 3:2. Let P031393) be the interpolating quadratic on 270, :31 and 5132. Let P1$213(:r) be the interpolating quadratic on 3:1, (172, and 1:3. Lastly, let P0'1,3,3(;c) be the interpolating cubic through all nodes :30, 2:1, 2:2 and 333. (b) (CODING 1 PT.) Compute the absolute error for each polynomial, i.e. | f (1.4) Pi,...,k(1-4)|- Which polynomial is better based on absolute error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
