Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a) Compute by hand the Lagrangian cardinal functions for the points x0 = -1, x = 0, x2 = 1, x3 = 2. b)
a) Compute by hand the Lagrangian cardinal functions for the points x0 = -1, x = 0, x2 = 1, x3 = 2. b) Consider the function f(x) = 2x-4-x and interpolate it by a polynomial of minimal degree by hand using the results above. c) Implement a Python algorithm that performs the same task above for arbitrary func- tions and arbitrary interpolation points. The algorithm only returns the value of the interpolated function in an array of points which is given as input. What is the maximal error e(x) = f(x) - p(x)| on the intervals [1, 2] and [5, 5]? Plot f(x) and p(x) in the same plot, on the interval [-1, 2]. d) The sequence of Chebyshev nodes on the reference interval [-1, 1] is 2k +1 Zk = COS [1,1], k = 0, . . ., n 1 2 n and can be transported on a general interval [a, b] by a+b b - a xk = + Zk. 2 2 Find the Chebyshev nodes on the interval [1, 2] for n = 3. e) Interpolate f(x) numerically in the Chebyshev nodes for n = 3. What is the maximal error on the intervals [1, 2] and [5,5]? Plot f(x) and the interpolating polynomial in the same plot, on the interval [1, 2]. f) Plot the error as a function in x, for both the interpolation in a) and the interpolation in c), on the interval [-1, 2]. Plot both errors in the same plot.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started