Exercise set 4: Interpolation & Approximation

1.  Interpolate the values sin(((2π)/5)i) for i = 0, 1, ..., 5 by a polynomial of degree 5.

2. Sample 6 points on a curve (Subscript[c, 1])={(t^2)+3t,((3t)/((t^2)+1))} for t ∈ [-3, 0] and interpolate them by a polynomial curve of degree 5.

3. Find a cubic polynomial P such that P(0) = -1, P(1) = 1 and P’(0) = P’(1) = 0.

4. Consider the function f(x) = sin(x), x ∈ [0, 2π].
4.1 Chose a random point p ∈ (0, 2π).
4.2 Compute the (C^1) Hermite interpolation of f(x) at the subintervals [0, p] and [p, 2π].
4.3 Compute the interpolation error by sampling points on both f(x) and the resulting polynomials.

5. Consider a Bézier curve (Subscript[c, 2]) given by the following control points:
{0,0},{1,0}, {1,1},{0,1},{-1,1.3},{-1,2},{2,2},{3,0},{1,-1},{0,-1},{-1,-1}.
5.1 For N < 10 sample N+1 points on (Subscript[c, 2]) and compute the tangent vectors at these points.
5.2 Interpolate each of the segments by a Ferguson cubic.
5.3 Compute the interpolation error by sampling.
5.4 Compute the Hausdorff distance of the interpolation to (Subscript[c, 2]) by sampling. (I. e. sample M points on both curves and compute the Hausdorff distance of the two sampled sets.)

6.1 Use the least square approximation to approximate the curve (Subscript[c, 1]) (from exercise 2.) by a Bézier curve of degree 4. Plot both the curve and its approximation.
6.2 Use the least square approximation to approximate the curve (Subscript[c, 3])={(t^4)-t,-(t^3)+2(t^2)+3t} by a Bézier curve of degree 4. Plot both the curve and its approximation.