## Sunday, 29 September 2013

### Cubic spline interpolation: Periodic splines

If the unknown function is periodic, then the periodicity may be used to specify the boundary conditions. Before (in the case of the natural splines) we had $n+1$ value of x and y and as a result we obtained values of the cubic polynomial at $n$ intervals.

Now our function is periodic with period $p$, thus $S(x) = S(x+p)$. In practice, we have an additional data point $x_{n+1}$, such that
$$x_{n+1} = x_0 + p,$$
and
$$y_{n+1} = y_0.$$

The total number of data points is $n+2$ and the total number of segments (and cubic splines) between them is $n+1$.

## Thursday, 26 September 2013

### Cubic spline interpolation: Natural splines

Last year I published a post on the data interpolation and smoothing using the cubic splines using IDL. (Soon I'll do an update of that post as well.) Here I go a step back and show how the classical spline interpolation works. As before, the derivation follows the book of D.S.G.Pollock (highly recommended to any student interested in the analysis of time-series). I'll first go through some theory general for all the cubic splines, than through the derivation of the natural cubic splines and at the end I'll show some examples. In the next post I'll describe the solution of the clamped cubic splines and do the same examples using that variation of the method.