Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  IDL Reference  >  Advanced Math and Stats  >  IMSL_INTFCN Functions Over an Infinite or Semi-infinite Interval

IMSL_INTFCN Functions Over an Infinite or Semi-infinite Interval

IMSL_INTFCN: Functions Over an Infinite or Semi-infinite Interval

This version of the IMSL_INTFCN function integrates functions over an infinite or semi-infinite interval.


Note
One of the INF_INF, INF_BOUND, or BOUND_INF keywords must be supplied to use this integration method.

Syntax


Result = IMSL_INTFCN(f, /INF_INF )

or

Result = IMSL_INTFCN(f, Bound, /INF_BOUND | /BOUND_INF )

Return Value


The value of:

is returned, where a and b are appropriate integration limits. If no value can be computed, the floating-point value NaN (Not a Number) is returned.

Arguments


f

A scalar string specifying the name of a user-supplied function to be integrated. The function f accepts one scalar parameter and returns a single scalar of the same type.

Bound

A scalar value specifying the finite limit of integration. If either of the keywords INF_BOUND or BOUND_INF are specified, this argument is required.

Keywords


In addition to the global IMSL_INTFCN keywords listed in the main section under Keywords, exactly one of the following keywords may be specified:

INF_INF

Set this keyword to integrate f over the range ( –infinity, infinity).

INF_BOUND

Set this keyword to integrate f over the range ( –infinity,bound ).

BOUND_INF

Set this keyword to integrate f over the range ( bound, infinity).

Discussion


This method is a special-purpose integrator that uses a globally adaptive scheme to reduce the absolute error. It initially transforms an infinite or semi-infinite interval into the finite interval [0, 1]. It then uses the same strategy that is used when integrating functions with singularity points given (see IMSL_INTFCN: Functions with Singular Points Given). This method is based on the subroutine QAGI by Piessens et al. (1983).

If this method is used, the function should be coded to protect endpoint singularities if they exist.

Example


The value of:

is computed.

.RUN  
; Define the function to be integrated.
FUNCTION f, x
   RETURN, ALOG(x)/(1 + (10 * x)^2)
END

ans = IMSL_INTFCN(';f', 0, /Bound_Inf)
; Call IMSL_INTFCN with keyword Bound_Inf set. Notice that
; only lower limit of integration is given.
PM, ';Computed Answer:', ans
; Output the results.
Computed Answer:
       -0.361689
exact = -!Pi * ALOG(10)/20
PM, ';Exact - Computed:', exact - ans
Exact - Computed:
        5.96046e-08

Errors


See Errors.



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us