Maxima Function
quad_qawo (f(x), x, a, b, omega, trig, epsabs, limit, maxp1, limlst)
quad_qawo(f,x,a,b,omega,trig,epsabs,limit,maxp1,limlst)
Integration of cos(omega x) f(x) or sin(omega x) f(x) over a finite interval,
where omega is a constant.
The rule evaluation component is based on the modified Clenshaw-Curtis technique.
quad_qawo
applies adaptive subdivision with extrapolation, similar to quad_qags
.
quad_qawo
computes the integral using the Quadpack QAWO
routine:
integrate (f(x)*w(x), x, a, b)
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:
Desired absolute error of approximation. Default is 1d-10.
Size of internal work array. (limit - limlst)/2 is the maximum number of subintervals to use. Default is 200.
Maximum number of Chebyshev moments. Must be greater than 0. Default is 100.
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_qawo
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;
6
if the input is invalid.
Examples:
(%i1) quad_qawo (x^(-1/2)*exp(-2^(-2)*x), x, 1d-8, 20*2^2, 1, cos); (%o1) [1.376043389877692, 4.72710759424899E-11, 765, 0] (%i2) rectform (integrate (x^(-1/2)*exp(-2^(-alpha)*x) * cos(x), x, 0, inf)); alpha/2 - 1/2 2 alpha sqrt(%pi) 2 sqrt(sqrt(2 + 1) + 1) (%o2) ----------------------------------------------------- 2 alpha sqrt(2 + 1) (%i3) ev (%, alpha=2, numer); (%o3) 1.376043390090716