Find the natural cubic spline interpolant to f(x) = e^(x^3) at the nodes {xi} i=0 = {−2, 0, 2} . Calculate the value of the interpolant at x = 1. What is the error at this point?
Given function is : .
Here,
i.e.,
i.e.,
and,
i.e.,
i.e.,
and,
i.e.,
i.e.,
DIFFERENCE TABLE :
x | f(x) | ||
-2 | 0.000335462 | ||
0.999664538 | |||
0 | 1 | 2978.958322502 | |
2979.95798704 | |||
2 | 2980.95798704 |
From the Newton's backward formula we have,
where u = (x-xn)/h.
Here, x = 1, xn = 2, h = 2.
Then, u = (1-2)/2 ,i.e., u = -1/2 ,i.e., u = -0.5
Then we have,
i.e.,
i.e.,
i.e.,
Therefore, the value of the interpolant at x = 1 is 1118.60920375.
Now, putting x = 1 in the function we get,
i.e.,
i.e.,
i.e.,
Therefore, the error at this point is = (1118.60920375-2.718281828) = 1115.89092117.
Find the natural cubic spline interpolant to f(x) = e^(x^3) at the nodes {xi} i=0 = {−2, 0, 2} . ...
2. More on Cubic Splines Consider the data Xi : 1 2 3 4 Yi : 18 27 64 a. Construct the cubic interpolant, i.e., find the cubic polynomial p that satisfies p(xi) = Yi, i = 1,2,3,4 and draw its graph. b. Construct the interpolating natural cubic spline and draw its graph. c. Comment on your results.
6. Consider f(x)-sinx and evenly spaced nodes 0-0 < xīく… < Zn-2T. Let P(z) be the piecewise cubic interpolant given values and first derivatives of f at the nodes. (a) In the case n = 100, use calculus and the error formula 4! where 1 E [xi,Ti+1], to bound the absolute error lf(1)-P(1) (b) For arbitrary x E [0.2 , use error bounds to determine n ensuring that If(x)- P(x) s 10-10 6. Consider f(x)-sinx and evenly spaced nodes 0-0
2. Consider the cubic spline for a function f on [0, 2] defined by S(x) = { ={ (z. 2x3 + ax2 + rx +1 if 0 < x <1 (x - 1)3 + c(x - 1)2 + d(x - 1) + ß if 1 < x < 2 where r, c and d are constants. Find f'(0) and f'(2), if it is a clamped cubic spline.
0.19 0.. 1. (Natural Splines) Find the natural cubic spline S(x) satisfying S(0) = 0, S(1/2) = 1, S(1) = 0. Your answer will be 2 cubic polynomials, S.(x), S1(x). Verify that your answer satisfies all the necessary conditions (interpolation, continuity of 1st and 2nd derivatives, boundary conditions). We were unable to transcribe this image
beta is 1 2. ( 20p.) Consider the cubic spline for a function f on (0, 2) defined by 223 + ax2 + rx + 1 if 0 < x < 1 S(X) = (.x - 1)3 + c(x - 1)2 + d(x - 1) + B if i < x < 2 S(x) = { where r, c and d are constants. Find f'(0) and f'(2), if it is a clamped cubic spline.
Linear Algebra A natural cubic spline for a function f(x) is defined by ſax° +15x² – 21.75x +14.5 15x521 S(x) = ayx? + 3x² + 2.25x-1.5 25 x 3] Find the value of a1.
2. A natural cubic spline S is defined by S(z) = { $(") = 11 S. (C)=1+ B(-1) + D(x - 1)3 S (2)=1+b(-2) + 3(x - 2)2 + (x - 2) if 1 <3 <2 if 2 <3<3 Find B, D, b, and d. Hint: Recall that a natural cubic spline has S" equal to 0 at the endpoints.
Design a MATLAB code to construct a natural cubic spline P(x) that passes though the points (1, 1), (4, 1/4), (7, 1/7), (10, 1/10), (13, 1/13) and (16, 1/16). (a) Use the constructed cubic spline to interpolate x = 3; (b) Find the error e_1 = |1/3 - P(3)|;
Homework Problem Set 16 x-1)3 for 0 sx$1 a cubic spline? 1. Is the function s (x) = {2(-1)3 for 1 < x 2 -5 +8x-6x2 2x3 for1 sx s 2 Is the function s(x)-[ natural? Let x for j 1,2,3,4 by a calculation on paper 3 a cubic spline? Is it [1,0,1,0]. Determine the natural spline s with s(y)-yi 2. 18x2-2x3 for 2
QUESTION 4 (a) A natural cubic spline that fits the data given by f(3.0) = -5.6790, F (3.1) = -3.6674, f(3.2) = -2.2178 is to be constructed. Write down explicitly the system of equations that need to be used to construct the required natural cubic spline. (b) Consider the nonlinear system x2 + y = 9, 22 + y2 = 25, x, y > 0. Perform one iteration of Newton's method to approximate the solution, starting with (2, 4) as...