# Math Help - Clamped Cubic Spline

1. ## Clamped Cubic Spline

A clamped cubic spline s for a function f is defined by

$s(x)=\begin{cases} s_{0}(x) = 1 + Bx + 2x^2 - 2x^3 & \text{if } 0 \le x < 1 \\ s_{1}(x) = 1 + b(x - 1) - 4(x - 1)^2 + 7(x - 1)^3 & \text{if } 1 \le x \le 2 \end{cases}$

Find f'(0) and f'(2)

So $s'_{0}(1) = s'_{1}(1)$ and I get b = -2. Substitute it into the second derivative and I get f'(2) = 11. $s'_{0} = 4x - 6x^2$ so f'(0) = 0. But how do I find what B is?

2. Originally Posted by Makall
A clamped cubic spline s for a function f is defined by

$s(x)=\begin{cases} s_{0}(x) = 1 + Bx + 2x^2 - 2x^3 & \text{if } 0 \le x < 1 \\ s_{1}(x) = 1 + b(x - 1) - 4(x - 1)^2 + 7(x - 1)^3 & \text{if } 1 \le x \le 2 \end{cases}$

Find f'(0) and f'(2)

So $s'_{0}(1) = s'_{1}(1)$ and I get b = -2.
How? $s'_0(1)= s'_1(1)$ is B- 2= b.

Of course, the function must also be continuous at x= 1 so you must have 1+ B= 1 so that B= 0 and then b= -2.

Substitute it into the second derivative and I get f'(2) = 11. $s'_{0} = 4x - 6x^2$ so f'(0) = 0. But how do I find what B is?