I'm trying to make an exercise but I don't know how to start. Is there somebody that can give me a hint so that I can start with the exercise. The exercise is:
Consider the function $f(x) = \sin(x)$ on the interval $[0,\pi]$. Evaluate $f(x)$ in enough points to find an interpolating polynomial $p(x)$ and a natural cubic spline approximation $s(x)$ such that the error functions $|(f-p)(x)|$ and $|(f-s)(x)|$ satisfy
$|(f-p)(x)| \leq 0.005$ for $0 \leq x \leq \pi$
$|(f-s)(x)| \leq 0.005$ for $0 \leq x \leq \pi$
Give the number and the location of the data points for $p$ and $s$. This can be different for $p$ and $s$. Why is the second derivative of the spline function in begin and endpoint equal to zero a good choice?