Given a truncated power basis function show that it represents a cubic spline for one knot Given the truncated power basis function
$$h_1(x)=1, h_2(x)=x, h_3(x)=x^2, h_4(x)=x^3, h_5(x)=(x-\epsilon)^3_+$$
Show that a function of the form $f(x)=\beta_0+\beta_1x+\beta_2x^2+\beta_3x^3+\beta(x-\epsilon)^3_+$ is a cubic regression spline by finding $f_1(x)=a_1+b_1x+c_1x^2+d_1x^3$ s.t $f(x)=f_1(x)$
There's quite a few things I'm confused about here. I was under the impression that a truncated power basis function is of the form: some polynomial function for a range and 0 otherwise. So I don't understand what the $h_i()$ functions above mean because they don't give a range and I don't know how to interpret $h_5(x)$. Also how does showing that you can represent $f(x)$ equal to $f_1(x)$ prove it's a cubic regression spline?
 A: What you've been asked to show is false as stated: $f$ is a cubic spline with break point $\epsilon$, and cannot necessarily be represented by a cubic polynomial $f_1$. To see this, note that $f_1$ is a cubic polynomial, so it must be a smooth function, i.e. it is continuous and has continuous derivatives of all orders, i.e. $f_1 \in \mathcal{C}^\infty$. However, because
\begin{align}
h_5 (x) & = (x - \epsilon)_+^3 = \begin{cases}
(x - \epsilon)^3 , \text{ if } x - \epsilon \ge 0 \\
0 , \text{ if } x - \epsilon < 0 \\
\end{cases} \\
h_5' (x) & = \begin{cases}
3 (x - \epsilon)^2 , \text{ if } x - \epsilon \ge 0 \\
0 , \text{ if } x - \epsilon < 0 \\
\end{cases}\\
h_5'' (x) & = \begin{cases}
6 (x - \epsilon) , \text{ if } x - \epsilon \ge 0 \\
0 , \text{ if } x - \epsilon < 0 \\
\end{cases}\\
h_5''' (x) & = \begin{cases}
6 , \text{ if } x - \epsilon > 0 \\
\text{undefined} , \text{ if } x = \epsilon \\
0 , \text{ if } x - \epsilon < 0 \\
\end{cases},
\end{align}
we have that $f$ is only a $\mathcal{C}^2$ function (if the coefficient $\beta \ne 0$) and can have a discontinuous third derivative, so $f$ is not a $\mathcal{C}^\infty$ function.
To clear up the confusion on terminology, a truncated polynomial in this context is any function of the form:
$$
g(x) = p(x) I_A (x)
$$
where $p(x)$ is a polynomial $I_A (x)$ is the indicator function of a set $A$, given by
$$I_A (x) = \begin{cases}
1 , & \text{ if } x \in A \\
0 , & \text{ if } x \notin A
\end{cases}.$$
This means that all polynomials are also truncated polynomials by taking the set $A = \mathbb{R} = (-\infty, \infty)$. So $h_1$, $h_2$, $h_3$, and $h_4$ are all truncated polynomials. And to reiterate the meaning of $h_5$,
$$
h_5 (x) = (x - \epsilon)_+^3 = \left(\max(0, x - \epsilon)\right)^3 = \begin{cases}
(x - \epsilon)^3 , \text{ if } x - \epsilon \ge 0 \\
0 , \text{ if } x - \epsilon < 0 \\
\end{cases}.
$$
What you actually want to prove is that the functions $h_i$ form a basis for all $\mathcal{C}^2$ piecewise-polynomial functions of degree 3 with a break point $\epsilon$. Let's call this space of functions $\mathcal{P}^2_3$. First, let's describe the functions in this space: each one is a piecewise-polynomial of degree 3 with break point $\epsilon$, which means that any $f \in \mathcal{P}_3^2$ can be written as
$$
f(x) = \begin{cases}
a_0x^3 + b_0x^2 + c_0x + d_0 , & \text{ if } x \le \epsilon \\
a_1x^3 + b_1x^2 + c_1x + d_1 , & \text{ if } x > \epsilon \\
\end{cases}.
$$
However, the constraint that this function be continuous and have continuous derivatives up to order two, i.e. that $f \in \mathcal{C}^2$, means that the coefficients have to satisfy the constraints:
\begin{align}
a_0\epsilon^3 + b_0\epsilon^2 + c_0\epsilon + d_0 & = a_1\epsilon^3 + b_1\epsilon^2 + c_1\epsilon + d_1 \\
3a_0\epsilon^2 + 2b_0\epsilon + c_0 & = 3a_1\epsilon^2 + 2b_1\epsilon + c_1 \\
6a_0\epsilon + 2b_0 & = 6a_1\epsilon + 2b_1 .
\end{align}
You have to show that every function in $\mathcal{P}^2_3$, i.e. all the piece-wise polynomials of degree 3 that satisfy these constraints, can be written as a unique linear combination of the functions $h_i$.
