Let $S = \{s \in S: s'(a) = s'(b) = 0 \}$ be the spline space that holds all cubic splines with derivate at startpoint (a) and endpoint (b) =0. I want to find a basis for this vector space. I looked at bsplines, but I think that is the wrong approach
2 Answers
Let's just solve the problem first for $a = 0$ and $b = 1$. Then I'll write the generic spline as \begin{align} s(t) &= at^3 + bt^2(t-1) + ct(t-1)^2 + d (t-1)^3 & \text{ so that} \\ s'(t) &= 3at^2 + 2bt(t-1) + bt^2 + c(t-1)^2 + 2ct(t-1) + 3d (t-1)^2 \\ s'(t) &= (3a+b) t^2 + 2(b+c) t(t-1) + (3d+c) (t-1)^2 \\ \end{align} [OMG...I'm sorry. The "a" and "b" here have nothing to do with the "a" and "b" in the problem as stated; they're just two coefficients of an unknown polynomial.]
Now saying that $s'(0) = 0$ is the same as saying that \begin{align} 3d + c = 0 \end{align} And saying that $s'(1) = 0$ is the same as saying that \begin{align} 3a + b &= 0 \\ \end{align} So we have two equations in the four unknowns $a,b,c,d$. Let's find two independent solutions. We can do this by picking $a = 1, d = 0$, yielding $(a,b,c,d) = (1, -3, 0, 0)$, and $a = 0, d=1$, yielding $(a,b,c,d) = (0,0,1, -3)$, or writing out the polynomials, $$ b_1(t) = t^3 -3t^2(t-1) \\ b_2(t) = -3t(t-1)^2 + (t-1)^3 $$
Those have the property we want ... but only on an interval between $0$ and $1$. If we write $$ c_1(t) = b_1\left(\frac{t-a}{b-a}\right) \\ c_2(t) = b_2\left(\frac{t-a}{b-a}\right) $$ where now "a" and "b" are the interval endpoints from your origonal problem, you can check that $c_1$ and $c_2$ are in fact polynomials with the desired properties, and any linear combination of them will have the property that $s'(a) = s'(b) = 0$ (and indeed, that all such cubics are covered by linear combinations of $c_1$ and $c_2$).
If you want to do quartic, or quintic, or higher order splines, I think you can mimic the approach I've taken here, which is more or less "use the Bézier (or is it Bernstein?) basis and follow your nose."
It sounds like you might be interested in cubic polynomials, rather than cubic splines. If so, read on.
I’ll talk about the interval $[0,1]$; rescaling to an arbitrary interval $[a,b]$ is straightforward.
A useful basis for cubic polynomials is the Hermite basis. The four basis functions are: $$ 𝜙_0(𝑢) = 2𝑢^3 −3𝑢^2 +1 \quad ; \quad 𝜙_1(𝑢) = 3𝑢^2 −2𝑢^3 \\ 𝜓_0(𝑢) = 𝑢−2𝑢^2 +𝑢^3 \quad ; \quad 𝜓_1(𝑢) = 𝑢^3 −𝑢^2 $$ Then, given two values $p_0$ and $p_1$ and two derivatives $d_0$ and $d_1$, we construct the curve $$ f(u) = \phi_0(u)p_0 + \phi_1(u)p_1 + \psi_0(u)d_0 + \psi_1(u)d_1 $$ It is easy to check that $$ f(0) = p_0 \quad ; \quad f(1) = p_1 \\ f’(0) = d_0 \quad ; \quad f’(1) = d_1 \\ $$ So, any curve of the form $$ f(u) = \phi_0(u)p_0 + \phi_1(u)p_1 $$ Satisfies your requirements. The two functions $\phi_0$ and $\phi_1$ are the basis functions you want.