I have this cubic spline function:
s(x) = 4 + k1*x + 2x^2 - (1/6)*x^3 for x in [0,1]
s(x) = 1 - (4/3)*(x-1) + k2*(x-1)^2 - (1/6) * (x-1)^3 for x in [1,2]
s(x) = 1 + k3*(x-2) + (x-2)^2 - (1/6) * (x-2)^3 for x in [2,3]
I would like to implement a simple function, that giving this function, it determines the coefficients k1, k2 and k3, but I couldn't do that..
Has anyone an idea?