Approximation: Smoothing natural spline

 

We consider the following:

 

 

where pk_1(x0) is a (k-1)th polynomial of x0. That is,

 

Here, c can be calculated from A*c=b by .

 

When it is natural spline,

 

where

 

and

 

When it is smoothing natural spline, A2 is only different. That is,

 

where its diagonal elements are  from i=1 to n respectively.

 

We set n x 1 vector of w and scalar g to smooth out.