|
|
◆ qk41()
| void qk41 |
( |
double(*)(double) |
f, |
|
|
double |
a, |
|
|
double |
b, |
|
|
double * |
result, |
|
|
double * |
abserr, |
|
|
double * |
resabs, |
|
|
double * |
resasc |
|
) |
| |
Finite interval quadrature (41 point Gauss-Kronrod rule)
- Purpose
- This routine computes
I = integral of f over [a, b] with error estimate, and
J = integral of abs(f) over [a, b],
where f is a given function defined by a user supplied subroutine.
The integral will be evaluated with the 41 point Gauss-Kronrod rule.
- Parameters
-
| [in] | f | The user supplied subroutine which calculates the integrand function f(x) defined as follows. double f(double x)
{
return computed f(x) value
}
|
| [in] | a | Lower limit of integration. |
| [in] | b | Upper limit of integration. |
| [out] | result | Approximation to I = integral of f over [a, b]. |
| [out] | abserr | Estimate of the modulus of the absolute error, which should equal or exceed the true error. |
| [out] | resabs | Approximation to J = integral of abs(f) over [a, b]. |
| [out] | resasc | Approximation to the integral of abs(f - I/(b - a)) over [a, b]. |
- Reference
- SLATEC (QUADPACK)
|