Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: quad_qawc (<f(x)>, <x>, <c>, <a>, <b>, [<epsrel>, <epsabs>, <limit>])
Function: quad_qawc (<f>, <x>, <c>, <a>, <b>, [<epsrel>, <epsabs>, <limit>]) Computes the Cauchy principal value of f(x)/(x - c) over a finite interval. The strategy is globally adaptive, and modified Clenshaw-Curtis integration is used on the subranges which contain the point x = c.
quad_qawc computes the Cauchy principal value of
integrate (f(x)/(x - c), x, a, b)
using the Quadpack QAWC routine. The function to be integrated is <f(x)>/(<x> - <c>), with dependent variable <x>, and the function is to be integrated over the interval <a> to <b>.
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 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_qawc 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_qawc (2^(-5)*((x-1)^2+4^(-5))^(-1), x, 2, 0, 5,
epsrel=1d-7);
(%o1) [- 3.130120337415925, 1.306830140249558E-8, 495, 0]
(%i2) integrate (2^(-alpha)*(((x-1)^2 + 4^(-alpha))*(x-2))^(-1),
x, 0, 5);
Principal Value
alpha
alpha 9 4 9
4 log(------------- + -------------)
alpha alpha
64 4 + 4 64 4 + 4
(%o2) (-----------------------------------------
alpha
2 4 + 23 alpha 3 alpha ------- ------- 2 alpha/2 2 alpha/2 2 4 atan(4 4 ) 2 4 atan(4 ) alpha - --------------------------- - -------------------------)/2 alpha alpha 2 4 + 2 2 4 + 2
(%i3) ev (%, alpha=5, numer);
(%o3) - 3.130120337415917
(%o1) true (%i2)