QK15W applies a 15 point Gauss-Kronrod rule for a weighted integrand.
Discussion:
This routine approximates i = integral of fw over (a,b), with error estimate, and j = integral of abs(fw) over (a,b)
Author:
Robert Piessens, Elise de Doncker-Kapenger, Christian Ueberhuber, David Kahaner
Reference:
Robert Piessens, Elise de Doncker-Kapenger, Christian Ueberhuber, David Kahaner, QUADPACK, a Subroutine Package for Automatic Integration, Springer Verlag, 1983
Parameters:
Input, external real F, the name of the function routine, of the form function f ( x ) real f real x which evaluates the integrand function.
w - real
function subprogram defining the integrand
weight function w(x). the actual name for w
needs to be declared e x t e r n a l in the
calling program.
?, real P1, P2, P3, P4, parameters in the weight function
Input, integer KP, key for indicating the type of weight function
Input, real A, B, the limits of integration.
Output, real RESULT, the estimated value of the integral. RESULT is computed by applying the 15-point Kronrod rule (RESK) obtained by optimal addition of abscissae to the 7-point Gauss rule (RESG).
Output, real ABSERR, an estimate of | I - RESULT |.
Output, real RESABS, approximation to the integral of the absolute value of F.
Output, real RESASC, approximation to the integral | F-I/(B-A) | over [A,B].
Local Parameters:
centr - mid point of the interval
hlgth - half-length of the interval
absc* - abscissa
fval* - function value
resg - result of the 7-point Gauss formula
resk - result of the 15-point Kronrod formula
reskh - approximation to the mean value of f*w over (a,b),
i.e. to i/(b-a)
Type | Intent | Optional | Attributes | Name | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
procedure(scalar_func) | :: | f | |||||||||||||||||||||||||||||||||||||||||||||||||||||
public function w(absc_, p1_, p2_, p3_, p4_, kp_)Arguments
Return Value real |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | p1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | p2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | p3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | p4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
integer | :: | kp | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | a | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | b | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | result | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | abserr | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | resabs | |||||||||||||||||||||||||||||||||||||||||||||||||||||
real | :: | resasc |