1
$\begingroup$

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}$

| cite | improve this question | | | | |
$\endgroup$
2
$\begingroup$

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.

| cite | improve this answer | | | | |
$\endgroup$
  • $\begingroup$ Why at 1, and not at -1? $\endgroup$ – Killercamin Feb 1 '19 at 16:17
  • $\begingroup$ Because $1$ is the point at which $s_1$ and $s_2$ join. $\endgroup$ – mathcounterexamples.net Feb 1 '19 at 16:19
  • $\begingroup$ Oh I see, let me work it out and can I update the question just so that you can verify? If you have the time of course. $\endgroup$ – Killercamin Feb 1 '19 at 16:20
  • $\begingroup$ @Killercamin I'll let you solve the system with $4$ unknowns... I'm not good at computing! $\endgroup$ – mathcounterexamples.net Feb 1 '19 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.