QawoIntegration Type

QAWO adaptive integration for oscillatory functions

The QAWO algorithm is designed for integrands with an oscillatory factor, sin(wx) or cos(wx). In order to work efficiently the algorithm requires a table of Chebyshev moments which must be pre-computed with calls to the functions below. This function uses an adaptive algorithm to compute the integral of f over (a, b) with the weight function sin(wx) or cos(wx) defined by the table wf:

                       b                                   b
            I = Integral dx f(x) sin(wt)   or   I = Integral dx f(x) cos(wx)
                       a                                   a
The results are extrapolated using the epsilon-algorithm to accelerate the convergence of the integral. The function returns the final approximation from the extrapolation, result, and an estimate of the absolute error, abserr. The subintervals and their results are stored in the memory provided by workspace. The maximum number of subintervals is given by limit, which may not exceed the allocated size of the workspace. Those subintervals with "large" widths d where dw > 4 are computed using a 25-point Clenshaw-Curtis integration rule, which handles the oscillatory behavior. Subintervals with a "small" widths where dw < 4 are computed using a 15-point Gauss-Kronrod integration.

Ref.: Gnu Scientific library reference manual ()

Constructors

Constructor Description

QawoIntegration()

Full Usage: QawoIntegration()

Creates an instance of this integration class with a default integration rule and default debug flag setting.

QawoIntegration(debug)

Full Usage: QawoIntegration(debug)

Parameters:
    debug : bool - Setting of the debug flag for this instance. If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

Creates an instance of this integration class with specified integration rule and specified debug flag setting.

debug : bool

Setting of the debug flag for this instance. If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

Instance members

Instance member Description

this.Integrate

Full Usage: this.Integrate

Parameters:
    f : Func<float, float>
    a : float
    b : float
    oscTerm : OscillatoryTerm
    omega : float
    epsabs : float
    epsrel : float
    limit : int
    result : byref<float>
    abserr : byref<float>

Returns: GSL_ERROR

f : Func<float, float>
a : float
b : float
oscTerm : OscillatoryTerm
omega : float
epsabs : float
epsrel : float
limit : int
result : byref<float>
abserr : byref<float>
Returns: GSL_ERROR

this.Integrate

Full Usage: this.Integrate

Parameters:
    f : Func<float, float>
    a : float
    b : float
    oscTerm : OscillatoryTerm
    omega : float
    epsabs : float
    epsrel : float
    limit : int
    debug : bool
    result : byref<float>
    abserr : byref<float>

Returns: GSL_ERROR

f : Func<float, float>
a : float
b : float
oscTerm : OscillatoryTerm
omega : float
epsabs : float
epsrel : float
limit : int
debug : bool
result : byref<float>
abserr : byref<float>
Returns: GSL_ERROR

Static members

Static member Description

QawoIntegration.Integration(f, a, b, oscTerm, omega, epsabs, epsrel, limit, result, abserr, tempStorage)

Full Usage: QawoIntegration.Integration(f, a, b, oscTerm, omega, epsabs, epsrel, limit, result, abserr, tempStorage)

Parameters:
    f : Func<float, float>
    a : float
    b : float
    oscTerm : OscillatoryTerm
    omega : float
    epsabs : float
    epsrel : float
    limit : int
    result : byref<float>
    abserr : byref<float>
    tempStorage : byref<obj>

Returns: GSL_ERROR

f : Func<float, float>
a : float
b : float
oscTerm : OscillatoryTerm
omega : float
epsabs : float
epsrel : float
limit : int
result : byref<float>
abserr : byref<float>
tempStorage : byref<obj>
Returns: GSL_ERROR