The problem : Find $c$ in the following cubic spline.
$S \scriptstyle{1}$$(x)$ = $\large4 - \large\frac{11}{4}x + \large\frac{3}{4}x^3$, on $[0,1]$
$S \scriptstyle{2}$$(x)$ = $\large2 - \frac{1}{2}(x-1) + c(x-1)^2 -\frac{3}{4}(x-1)^3$, on $[1,2]$
My attempt:
1.) Checking that end points of the interval $[0,1]$;
$S \scriptstyle {1}$$(1)$ = $2 = S \scriptstyle{2} $$(1)$
2.)Checking the first derivative:
$S' \scriptstyle {1} $$(x)$ = $ -\frac{11}{4} + \frac{9}{4}x^2$;
$S' \scriptstyle {2} $$(x)$ = $ -\frac{1}{2} + 2cx - \frac{9}{4}(x-1)^2$
$S' \scriptstyle {1}$ $(1)$ = $ -\frac{1}{2} $ , $S' \scriptstyle {2} $ $(1)$ = $ -\frac{1}{2} + 2c$
At this point, it seems intuitive that $c = 0$, but the correct answer is $\frac{9}{4}$.
My textbook provides only an example on the topic but I get lost in the notation and get $c = 0$ for this problem and all the following problems of the same form. I'd appreciate a generalized algorithm or literature more than an answer, but anything is welcome.
A cubic spline matches second derivatives as well. So we get, at $x=1$ $$ \frac{3}{4} 6x = 2c $$ from which $c = \frac{9}{4}$.
The best explanation of cubic splines in my opinion is in Numerical Recipes, pages 120-124 or so.