Function: quad_qagi (<f(x)>, <x>, <a>, <b>, [<epsrel>, <epsabs>, <limit>])
Function: quad_qagi (<f>, <x>, <a>, <b>, [<epsrel>, <epsabs>, <limit>]) Integration of a general function over an infinite or semi-infinite interval. The interval is mapped onto a finite interval and then the same strategy as in
quad_qags is applied.
quad_qagi evaluates one of the following integrals
integrate (f(x), x, a, inf)
integrate (f(x), x, minf, a)
integrate (f(x), x, minf, inf)
using the Quadpack QAGI routine. The function to be integrated is <f(x)>, with dependent variable <x>, and the function is to be integrated over an infinite range.
The integrand may be specified as the name of a Maxima or Lisp function or operator, a Maxima lambda expression, or a general Maxima expression.
One of the limits of integration must be infinity. If not, then
quad_qagi will just return the noun form.
The keyword arguments are optional and may be specified in any order. They all take the form
key=val. The keyword arguments are:
<epsrel> Desired relative error of approximation. Default is 1d-8.
<epsabs> Desired absolute error of approximation. Default is 0.
<limit> Size of internal work array. <limit> is the maximum number of subintervals to use. Default is 200.
quad_qagi returns a list of four elements:
* an approximation to the integral,
* the estimated absolute error of the approximation,
* the number integrand evaluations,
* an error code.
The error code (fourth element of the return value) can have the values:
0 no problems were encountered;
1 too many sub-intervals were done;
2 excessive roundoff error is detected;
3 extremely bad integrand behavior occurs;
4 failed to converge
5 integral is probably divergent or slowly convergent
6 if the input is invalid.
(%i1) quad_qagi (x^2*exp(-4*x), x, 0, inf, epsrel=1d-8); (%o1) [0.03125, 2.95916102995002E-11, 105, 0] (%i2) integrate (x^2*exp(-4*x), x, 0, inf); 1 (%o2) -- 32
(%o1) true (%i2)