Natural linear spline function representation

229 Views Asked by At

Let $s: \mathbb{R} \to \mathbb{R}$ be a natural spline function of degree one (that is it is piecewise a polynomial of degree at most 1) and let $x_0 \leq x_1 \leq ...\leq x_n$. Show that $s$ can be uniquely represented as $$ s(x)=a + \sum_{j=0}^{n} c_j |x-x_j|$$ for some $a$ and $(c_j)_{j=0}^n$ which satisfy $\sum_{j=0}^{n} c_j = 0.$


my attempt:

I've tried to use the definition of the natural spline function which yielded that for $(-\infty,x_0)$ the function $s$ must be a constant (obviously, then $s(x)\equiv a$ ) and from continuity of $s$ in $x_0$ we have that $a=c_0x_1 +d$ so for $(-\infty,x_1)$ we have $s(x)=a + c_0(x-x_0)$ for $x\in[x_0,x_1]$ and $s(x)=a$ otherwise.

Could you please help me to finish this argument or give other, more simple if there is one?

1

There are 1 best solutions below

0
On BEST ANSWER

Clearly $s$ is continuous and linear for $x\in(x_i,x_{i+1})$.
The slope of $s$ in the $i$'th subinterval is equal to the $i$'th coordinate of: $$\begin{pmatrix} -1&-1&-1&\ldots&-1\\ 1&-1&-1&\ldots&-1\\ 1&1&-1&\ldots&-1\\ \vdots&\vdots&\vdots&\vdots&\vdots&\\ 1&\ldots&1&1&-1\\ 1&\ldots&1&1&1\end{pmatrix}\cdot\begin{pmatrix}c_0\\c_1\\\vdots\\c_n\end{pmatrix}$$

Discarding the first row results in a square matrix with full rank, so the slope of $s$ on all but the first subinterval can be chosen arbitrarily. On the first subinterval the slope is proportional to that on the last subinterval by a factor $-1$. Hence they will both be zero since $s$ must be constant. In particular $\sum_{j=0}^{n}c_j=0$ because of the last row.

That is a continuous degree $1$ spline can be written in the same form as $s$ if the slopes beyond the first and last knots are each other's negation.