write the previous conditions in matrix form (Ax=B). In order to solve the system two boundary conidtions are needed.</p>
<ul>
<li>Natural spline: S1''(x1)=2*c(1)=0 ; Sn''(xn)=2*c(n)=0 In matrix form:</li>
</ul>
<pre>
 |  1        0         0  ...    0         0           0     ||  c(1)  | |                        0                        |
 | h(0) 2[h(0)+h(1)] h(1) ...    0         0           0     ||  c(2)  | |      3/h(2)*[a(3)-a(2)]-3/h(1)*[a(2)-a(1)]      |
 | ...      ...       ... ...   ...       ..