Newbie - integrate piecewise function



I am sure that my question will only serve to show my ignorance
about computer algebra, but nevertheless here it goes

On Fri, Oct 22, 2004 at 08:02:16AM -0700, Richard Fateman wrote:

> .... 
> By contrast, what
> integration means in Macsym/Maxima and other computer algebra
> systems, is mostly what is done
> by their integration programs, but the indefinite integration
> procedures mostly aim at ANTIDIFFERENTIATION.  That is what
> the Risch "algorithm" does.  This works on certain classes
> of algebraic expressions. It does not work (except by making
> special hacks) on arbitrary functions, including those that are
> piecewise defined.  The builder of a CAS may add such hacks
> on the grounds that "the custosmer is always right" and put
> it in to the integration program. But don't expect it to work
> on every input you can create.
> 
> ...

Why not? can't one define these "hacks" one level of abstraction
up? I mean couldn't one extend these algorithms to work for the
class of piecewise defined functions whose "pieces" are algebraic
functions of that class (the class for which the Risch"algorithm" 
works)?

Hoping in your patience
Nikos