Determine the values of a,b,c, and d, so that the following function is a cubic spline

2.2k Views Asked by At

Determine the values of a,b,c, and d, so that the following function s(x) is a cubic spline satisfying $s''(3)=0$.

$s(x)= \Big\{^{x^3-4x^2+7 x \in [-1,1]}_{ax^3+bx^2+cx+d x \in [1,3]}$

To use the Natural/simple boundary conditions I know that it must satisfy:

$S''(x_o)=0$ and $S''(x_n)=0$ This is what I have:

$s_1(x)=x^3-4x^2+7 \rightarrow s_1'(x)=3x^2-8x \rightarrow s_1''(x)=6x-8$

and

$s_2(x)=ax^3+bx^2+cx+d \rightarrow s_2'(x)=3ax^2+2bx+c \rightarrow s_2''(x)=6ax+2b$

Now this step is where i'm stuck, any help would be appreciated. What would the next step be?

edit: With the help of mathcounterexamples.net, I was able to use Gauss-Jordan elimination to get the following values:

$a=\frac{1}{6}, b=\frac{-3}{2}, c= \frac{-5}{2}, d=\frac{47}{6}$

1

There are 1 best solutions below

4
On BEST ANSWER

You have

$$\begin{cases} s_1(1) &= 4\\ s_1^\prime(1) &= -5\\ s_1^{\prime \prime}(1) &= -2 \end{cases}$$

In order to have a spline, you need to have the same values for $s_2$ at $1$. Hence $$\begin{cases} s_2(1) &= a+b+c+d &=4\\ s_2^\prime(1) &= 3a+2b+c&= -5\\ s_2^{\prime \prime}(1) &= 6a +2b&= -2 \end{cases}$$

Now, let's use the last condition $s^{\prime \prime}(3)=0$ which imposes $18a+2b=0$.

You have 4 equations with 4 unknowns that you have to solve.