Question

Determine the values of a, b and c such that \text { I } S(x)=\left\{\begin{array}{c} a(x+1)-3(x+1)^{2}+(x+1)^{3}, \quad-1 \leq x \leq 0 \\ 1+b x+x^{3}, \quad 0 \leq x \leq 1

\\ 5+6(x-1)+c(x-1)^{2}-3(x-1)^{3}, \quad 1 \leq x \leq 2 \end{array}\right. is a cubic spline.

Fig: 1

Fig: 2

Fig: 3