WebCab XL Community Edition

Inter.CubicSpline2ndDiff Method 

Calculates the second derivatives of the cubic spline interpolation polynomial at the given functions tabulation points when the first derivative at the boundary (equivalently the end points) is given.

public double[] CubicSpline2ndDiff(
   double[] TabPtsInX,
   double[] FnValsTabPts,
   double DerInterAt0,
   double DerInterAtn_1
);

Parameters

TabPtsInX
An array of doubles which are the values at which the function is tabulated, i.e. functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i]).
FnValsTabPts
An array of doubles which are the values of the function evaluated at the interpolation points, i.e. functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i]).
DerInterAt0
The first derivative of the interpolation function at the point tabulationPointsInX[0].
DerInterAtn_1
The first derivative of the interpolation function at the point tabulatedPointInX[n-1].

Remarks

The values of the second derivatives can be used within CubicSplinePointwisePreEvaluation in order to evaluate the interpolation function at a given point.

Details

Given arrays tabulationPointsInX[0..n-1] and tabulationPointsInY[0..n-1] containing a tabulated function, i.e. tabulationPointsInY[i] = f(tabulationPointsInY[i]), with tabulationPointsInX[0] < tabulationPointsInX[1] < ... < tabulationPointsInX[n-1], and given values derivativeInterpolationAt0 and derivativeInterpolationAtn_1 for the first derivative of the interpolating function at the points tabulationPointsInX[0] and tabulationPointsInX[n-1], respectively. This method returns an array of length n, that contains the second derivatives of the interpolation function at the tabulation points tabulationPointsInX[i]. If derivativeInterpolationAt0 and/or derivativeInterpolationAtn_1 are equal to 1030 or larger, then the method sets the second derivative at the boundary to be zero.

Remarks of this methods application

Excel Remarks

The full name of this function inside Excel is Ipola_Inter_CubicSpline2ndDiff.

Exceptions

Exception TypeCondition
InterpolationExceptionThrown when the input values do not meet the requirements mentioned above.

See Also

Inter Class | Interpolation Namespace