Integrating abs(x)?



On Mon, Jul 14, 2008 at 6:06 AM, Alasdair McAndrew <amca01 at gmail.com> wrote:

> Is there a method of coercing Maxima to integrate abs(x); that is,
> producing an answer to integrate(abs(x),x,-1,1)?
>

The simplest way is probably to calculate integrate(abs(x),x,-1,0) +
integrate(abs(x),x,0,1).  Maxima should be able to do this automatically,
but it doesn't....

Unfortunately, this approach does not generalize to all discontinuous
functions.  Thus, though integrate(floor(x),x,0,1) correctly gives 0,
integrate(floor(x),x,1,2) gives a noun form.

                  -s