Professional Documents
Culture Documents
Spline Function
Spline Function
using an even number of segments (at least four). I am using a set of line segments, and
each line segment will fit to the given data over a subinterval. This approximation is
continuous, but it has a first derivative with discontinuities at the interval ends, the
As I have to use at least four numbers of segments, I will have four segments, which are:
f1[X_]:=a1*(X^3)+b1*(X^2)+c1*X+d1;
f2[X_]:=a2*(X^3)+b2*(X^2)+c2*X+d2;
f3[X_]:=a3*(X^3)+b3*(X^2)+c3*X +d3;
f4[X_]:=a4*(X^3)+b4*(X^2)+c4*X+d4;
Together, the spline function and the original function look like the following:
At the above graph, the blue colored curve is p[x] = 1/ (1+x^2), and the red line is the
Let the spline function to be f(x). The maximum difference that happens between f(x) and
p(x) is, about, at the following interval: x = -2 to -3 and x = 2 to 3. There are differences
Now, we will evaluate the square of the both functions first derivative, which is:
∑( p(x)-f(x))^2 dx , from x = -3 to 3.
By seeing the graph and by see the difference, it can be said that there is much difference,
gap, between the two graphs, the spline one and the original one.
Work Cited