1

I have

$f(x)=\begin{cases} a(x-2)^2 + b(x-1)^3 & x \in (-\infty,1] \\ c(x-2)^2 & x\in[1, 3] \\ d(x-2)^2 + e(x-3)^2 & x\in[3,\infty) \end{cases}$

and wish to find the parameters $a,b,c,d,e$ for which $f(x)$ is a cubic spline. After examining the $S_0,S_1,S_2$ conditions, I've found that $a = c$ and $c = d$, but no information on $e,b$.

I need to determine the values of $a,b,c,d,e$ so that the function interpolates $(0,26),(1,7),(4,25)$. However, won't I have to change the knots of $f(x)$? That is, change the bounds to $[0,1],[1,4],[4,\infty)$. If so, that would change the conditions on $a,b,c,d,e$ I found earlier...

How do I proceed?

Taln
  • 615
  • 4
  • 14

1 Answers1

1

Plug in all the values where $S_n(x)$ meet.

For instance. $S_1(1)=-a$ and $S_2(1)=-c$, so for this to be a cubic spline, it must hold that a=c. also you know that $S_1(1)=S_2(1)=7$ from the knots you gave. Apply a similar process to the rest of the problem and you will get your answer.

Zack R
  • 11
  • What about the data point $0$? Do we do $S(0){0} =S{1}(0) = ?$ ? – Taln Oct 20 '16 at 19:36
  • Once you determine a,b,c,d, and e, you will want to check if the spline works for the data. In particular you will want to use the appropriate spline to see if this interpolates the data given. when x=0 then x is in (-inf,1] so you will use that spline. – Zack R Oct 20 '16 at 19:46
  • So we know $a=c=7$. $S_{0}(0) = 7(2)^{4} + b(-1)^{3} = 26$ so $b=86$. Like that? – Taln Oct 20 '16 at 19:49
  • I would find all of the conditions for the parameters first and then find what they are for the data. – Zack R Oct 20 '16 at 19:51
  • Like I said though, I found that $a=c$ and $c=d$, but nothing for $e$ and $b$ – Taln Oct 20 '16 at 20:00
  • I think this one works as a spline $\forall b,e \in \Bbb R$, So you would find them in particular for this data set. – Zack R Oct 20 '16 at 20:17
  • So... I was right. For this data set $b = 86$. Then $S(4) = 7(2)^{2} + e = 25 \implies e = -3$. So $a=c=d=7$, $b=86$, and $e = -3$. – Taln Oct 20 '16 at 20:32