MTP 290: COMPUTING LABORATORY
TOPIC: INTERPOLATION
(II-SEMESTER, 2024-2025)
1. Nested Evaluation Compare the direct polynomial evaluations and nested polynomial eval-
uation. See the number of floating operation and its effects on the computational time.
2. Monomial Interpolation Write a code to find an interpolating polynomial for given set of
data in the form (xi , f (xi )) for 0 ≤ i ≤ n. Test it for different function like sin, cos,rational
functions, hyperbolic functions etc. using different number of points. What do you observe ?
See the behaviour with respect to function, number of interpolating points.
3. Lagrange and Newton’s Interpolation Repeat the extercise above for Lagrange and New-
ton’s interpolation using the methods in the notes. Compare the results with the theortetical
error estimates as well (Use max norm ).
4. Runge-Example: Consider
1
f (x) = , −1 < x < 1
1 + 25x2
Use equisitance points to interpolate the function for various degrees. What do you observe
with increasing degree?
5. Chebyshev’s points: Repeat the Exercise 4 with Chebyshev’s points. See the difference in
the results. Discuss the benefits and disadvantages of the using Chebushev’s points.
6. Hermite Interpolation: Write a code to find an interpolating polynomial for given set of
data in the form (xi , f (xi ), f ′ (xi )) for 0 ≤ i ≤ n. Test it for different function like sin, cos,
rational functions, hyperbolic functions etc., using different number of points. What do you
observe ? See the behaviour with respect to function, number of interpolating points.
6. Piecewise Linear Interpolation: Write a code for Piecewise Linear Interpolationing polyno-
mial for given set of data in the form (xi , f (xi )) for 0 ≤ i ≤ n. Test it for different function like
sin, cos, rational functions, hyperbolic functions etc., using different number of points. What
do you observe ? See the behaviour with respect to function, number of interpolating points.
7. Piecewise cubic Hermite Spline: Write a code for Piecewise cubic Hermite interpolationing
polynomial for given set of data in the form (xi , f (xi ), f ′ (xi )) for 0 ≤ i ≤ n. Test it for differ-
ent function like sin, cos, rational functions, hyperbolic functions etc., using different number
of points. What do you observe ? See the behaviour with respect to function, number of
interpolating points.
8. C 2 -spline Repeat exercise 6 for C 2 -spline for using natural boundary conditions and clamped
boundary conditions.