|
|
◆ WPchia()
| Function WPchia |
( |
A As |
Double, |
|
|
B As |
Double, |
|
|
N As |
Long, |
|
|
X As |
Variant, |
|
|
Y As |
Variant, |
|
|
D As |
Variant |
|
) |
| |
Piecewise Cubic Hermite Integrator, Arbitrary limits
- Purpose
- WPchia evaluates the definite integral of a piecewise cubic Hermite function over an arbitrary interval. The interpolant is defined by the coefficients computed by WPchse.
- Returns
- Computed approximate value of integral.
- Parameters
-
| [in] | A | Lower limit of integration. |
| [in] | B | Upper limit of integration.
Note - There is no requirement that [A, B] be contained in [X(0), X(N - 1)]. However, the resulting integral value will be highly suspect, if not. |
| [in] | N | Number of data points (which were used by Pchse to compute coefficients). (N >= 2) |
| [in] | X | (N) The data abscissas (which were used by Pchse to compute coefficients). |
| [in] | Y | (N) The data ordinates (which were used by Pchse to compute coefficients). |
| [in] | D | (N) An array of cubic spline coefficients computed by Pchse. |
- Reference
- SLATEC (PCHIP)
- Example
- Using the following table, compute S = integral of 1/(1 + x^2) dx [0, 4] (= atan(4)).
x 1/(1 + x^2)
----- -------------
-1 0.5
0 1
1 0.5
2 0.2
3 0.1
4 0.05882
5 0.03846
----- -------------
|