# CS 770 Assignment #4 solution

\$24.99

Original Work ?

## Description

5/5 - (1 vote)

1. (a) Derive explicit formulas for natural cubic spline interpolation, i.e. give the linear system that needs to be solved to ﬁnd spline coeﬃcients. You can assume that points xi are equidistributed. (b) Implement the above algorithm. You can use the Matlab build-in linear solver or write your own. Submit the printout of your code.
2. Construct the intepolating polynomial passing through the points (-1,-5), (0,1), (1,1),(2,1) using the monomial, Lagrange and Newton bases.
3. (a) Consider linear interpolation of f(x) = x3 at x0 = 0 and x1 = 1. Find the value of ξ for the error function Enf(x) derived in class. (b) Repeat for f(x) = (2x−1)4. 4. Interpolate f(x) = sin(πx), f(x) = 1/(1 + 25×2), f(x) = |x| on [−1,1] with degree 10 polynomials using the equidistant and Chebyshev points, and with cubic splines with 11 nodes. Compare results and make a meaningful conclusion. Show your work.
5. (a) Show that
Z 1 0
1 1 + x2
= π
(b) Approximate the integral using the 6 point Gauss-Legendre quadrature and a composite trapezoidal rule with the same number of function evaluations. Compare results and make a meaningful conclusion. Show your work. Nodes and weights can be found in Abramowitz and Stegun: Handbook of Mathematical Functions (available online) or other electronic resorces. 6. Let Q(n) be the composite trapezoidal rule approximation toRb a f(x)dx with [a,b] divided into n subintervals. Show that for f(x) of suﬃcient smoothness Q(n)−Q(2n) Q(2n)−Q(4n) → 4, n →∞
7. Derive the composite Simpson’s Rule and ﬁnd the expression for its error