Next: Functions and Variables for abs_integrate, Previous: abs_integrate, Nach oben: abs_integrate [Inhalt][Index]
The package abs_integrate extends Maxima’s integration code to
some integrands that involve the absolute value, max, min, signum, or
unit step functions. For integrands of the form p(x) |q(x)|,
where p is a polynomial and q is a polynomial that
factor is able to factor into a product of linear or constant
terms, the abs_integrate package determines an antiderivative
that is continuous on the entire real line. Additionally, for an
integrand that involves one or more parameters, the function
conditional_integrate tries to determine an antiderivative that
is valid for all parameter values.
Examples:
To use the abs_integrate package, you’ll first need to load it:
(%i1) load("abs_integrate.mac")$
(%i2) integrate(abs(x),x);
x abs(x)
(%o2) --------
2
To convert (%o2) into an expression involving the absolute value function,
apply signum_to_abs; thus
(%i3) signum_to_abs(%);
x abs(x)
(%o3) --------
2
When the integrand has the form p(x) |x - c1| |x - c2| ... |x - cn|,
where p(x) is a polynomial and c1, c2, ..., cn are constants,
the abs_integrate package returns an antiderivative that is valid on the
entire real line; thus without making assumptions on a and b;
for example
(%i4) factor(convert_to_signum(integrate(abs((x-a)*(x-b)),x,a,b)));
3 2
(b - a) signum (b - a)
(%o4) -----------------------
6
Additionally, abs_integrate is able to find antiderivatives of some
integrands involving max, min, signum, and
unit_step, examples:
(%i5) integrate(max(x,x^2),x);
3 2 3 2
2 x - 3 x 1 1 x x
(%o5) ((----------- + --) signum(x - 1) + --) signum(x) + -- + --
12 12 12 6 4
(%i6) integrate(signum(x) - signum(1-x),x);
(%o6) abs(x) + abs(x - 1)
A plot indicates that indeed (%o5) and (%o6) are continuous at zero and at one.
For definite integrals with numerical integration limits (including
both minus and plus infinity), the abs_integrate package
converts the integrand to signum form and then it tries to subdivide
the integration region so that the integrand simplifies to a
non-signum expression on each subinterval; for example
(%i1) load("abs_integrate")$
(%i2) integrate(1 / (1 + abs(x-5)),x,-5,6);
(%o2) log(11) + log(2)
Finally, abs_integrate is able to determine antiderivatives of
some functions of the form F(x, |x - a|); examples
(%i3) integrate(1/(1 + abs(x)),x);
signum(x) (log(x + 1) + log(1 - x))
(%o3) -----------------------------------
2
log(x + 1) - log(1 - x)
+ -----------------------
2
(%i4) integrate(cos(x + abs(x)),x);
(signum(x) + 1) sin(2 x) - 2 x signum(x) + 2 x
(%o4) ----------------------------------------------
4
Barton Willis (Professor of Mathematics, University of Nebraska at
Kearney) wrote the abs_integrate package and its English
language user documentation. This documentation also describes the
partition package for integration. Richard Fateman wrote
partition. Additional documentation for partition is
located at
http://www.cs.berkeley.edu/~fateman/papers/partition.pdf
Next: Functions and Variables for abs_integrate, Previous: abs_integrate, Nach oben: abs_integrate [Inhalt][Index]