CE 335
Old exam questions (with solutions following) for Chapters 1318
1]
Given the points
x  0
1
2
4
y  0.8 1.5
2
0
(a) Find the value of the interpolating polynomial at x = 3. (Use either the Newton or the Lagrange
form to calculate this.)
(b) Find the value of the interpolating linear spline at x = 3.
(c) Write Matlab code for finding the value of an interpolating cubic spline at x = 3.
2]
Given
T = (1:12)';
C = [90.9 89.6 97.7 99.6 99.4 95.6 96.5 95.3 92.1 89.6 90.4 93.4]';
(a) Write a Matlab script to fit the data with a cubic spline; plot the spline curve, together with the
original points; and estimate T(7.7).
(b) What end conditions would the spline generated by your Matlab script have?
3]
Given the function values
f(0)= 0
f(2)= 3
f(4)= 6
f(6)= 10
f(8)= 17
(a) Estimate the integral of f from 0 to 8 using the composite trapezoid rule.
(b) Use Romberg integration to estimate the integral more accurately and also to estimate the error of
the numerical approximation.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentSolutions
1]
(a)
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 Lybas
 Polynomial interpolation, Spline interpolation, cubic spline

Click to edit the document details