Newbie - integrate piecwise function



Macsyma's integrate facility integrates explicit algebraic expressions,
not PROGRAMS.
It is possible perhaps to integrate expressions  with delta functions,
but generally not a good idea to expect the integration program
to "understand" what amounts to arbitrary calculation.  Would you
expect to integrate..

f(x):= if {Goldbach's conjecture is true} then x else 0  ?

RJf


Pieter Thysebaert wrote:

>Hi, I'm a new Maxima user (5.9.0 on Debian GNU/Linux).
>
>After reading through the docs, I'm still puzzled by the following:
>
>if I define f(x) as follows 
>
>f(x) := IF x < 0 THEN 0 ELSE 1;
>
>then 
>
>integrate(f(x), x ,1,2);
>
>gives the error 
>
>MACSYMA was unable to evaluate the predicate:
>x < 0
>#0: f(x=x)
> -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);)
>
>
>Is there a "proper" way to integrate piecewise functions in Maxima?
>
>
>Pieter
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>  
>