I'd like to fit the data in table as blow
x f(x)
3.0 2.5
4.5 1.0
7.0 2.5
9.0 0.5
when $x=5$, I want to find value of $f(x)$ by using Quadratic Spline.
this is my text book example. but there are some confused point which is I can't understand equation. question
How to set the equation?
- $20.25a_1 + 4.5b_1 + c_1 = 1.0$
- $20.25a_2 + 4.5b_2 + c_2 = 1.0$
- $49a_2 + 7b_2 + c_2 = 2.5$
- $49a_3 + 7b_3 + c_3 = 2.5$
I meant that my question is that why does equation to be
- $a_1 + b_1 + c_1$
- $a_2 + b_2 + c_2$
- $a_2 + b_2 + c_2$
- $a_3 + b_3 + c_3$
instead of
- $a_1 + b_1 + c_1$
- $a_2 + b_2 + c_2$
- $a_3 + b_3 + c_3$
- $a_4 + b_4 + c_4$
Also
- $9a_1 + 3b_1 + c_1 =2.5$
- $81a_3+9b_3+c3 = 0.5 $
?
update2
as you can see from the picture, there is one equation 18.33 But I'm not understand it. how to that condition can be represented to 18.33 equation ? would you please give any hint?
update3.
finally, I understand almost but except the matrix. In the text, they are use the matrix for find to each coefficients. So My question is how to set this matrix. I can't find quite a bit relationships.
Would you please give me any hint?
Your textbook basically is creating one quadratic spline in between each two points. So, let's define the quadratic splines as
$f_1(x)=a_1x^2+b_1x+c_1$ for $3 \le x \le 4.5$,
$f_2(x)=a_2x^2+b_2x+c_2$ for $4.5 \le x \le 7$ and
$f_3(x)=a_3x^2+b_3x+c_3$ for $7 \le x \le 9$,
then we can obtain 4 equations from the position continuity at $x=4.5$ and $x=7$:
$f_1(4.5)=1.0$,
$f_2(4.5)=1.0$,
$f_2(7)=2.5$,
$f_3(7)=2.5$.
This will result in the 4 equations in your original post. Since there are only 3 quadratic splines involved, there are no $a_4$, $b_4$ and $c_4$.
The other two equations $9a_1+3b_1+c1=2.5$ and $81a_3+9b_3+c_3=0.5$ come from $f_1(3)=2.5$ and $f_3(9)=0.5$.