quad_qawc SciMax Toolbox quad_qawo

SciMax Toolbox >> quad_qawf

quad_qawf

Maxima Function

Calling Sequence

quad_qawf (f(x), x, a, omega, trig, epsabs, limit, maxp1, limlst)
quad_qawf(f,x,a,omega,trig,epsabs,limit,maxp1,limlst)

Description

Calculates a Fourier cosine or Fourier sine transform on a semi-infinite interval using the Quadpack QAWF function. The same approach as in quad_qawo is applied on successive finite intervals, and convergence acceleration by means of the Epsilon algorithm (Wynn, 1956) is applied to the series of the integral contributions.

quad_qawf computes the integral

integrate (f(x)*w(x), x, a, inf)

The weight function w is selected by trig:

cos

w(x) = cos (omega x)

sin

w(x) = sin (omega x)

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.

The optional arguments are:

epsabs

Desired absolute error of approximation. Default is 1d-10.

limit

Size of internal work array. (limit - limlst)/2 is the maximum number of subintervals to use. Default is 200.

maxp1

Maximum number of Chebyshev moments. Must be greater than 0. Default is 100.

limlst

Upper bound on the number of cycles. Must be greater than or equal to 3. Default is 10.

epsabs and limit are the desired relative error and the maximum number of subintervals, respectively. epsrel defaults to 1e-8 and limit is 200.

quad_qawf returns a list of four elements:

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;

6

if the input is invalid.

Examples:

(%i1) quad_qawf (exp(-x^2), x, 0, 1, 'cos);
(%o1)   [.6901942235215714, 2.84846300257552E-11, 215, 0]
(%i2) integrate (exp(-x^2)*cos(x), x, 0, inf);
                          - 1/4
                        %e      sqrt(%pi)
(%o2)                   -----------------
                                2
(%i3) ev (%, numer);
(%o3)                   .6901942235215714
quad_qawc SciMax Toolbox quad_qawo