New piecewise package in development



"Okay, the bad news is that diff cannot be trusted.  The answer may look right to some users but it is not, especially
for complicated expressions.  The good news is that integrate works fine and I have discovered nothing at all wrong with
it."

For those interested the problem is that functions defined in terms of unit_step(x-a) only differentiate right when the 
result is a continuous function.  Like for example the result of integrating finite functions, these results are always 
continuous if the function is finite everywhere.  So diff(integrate(expr,x),x) generally works since the output from 
integrate is a continuous function in my testing.  Of course you can get errors if there are regions where the functions 
are infinite like 1/x*(unit_step(x+2) - unit_step(x-6)).  I think it is the users responsibility to know that this takes 
extra work when integrating it.  I still have to test this kind of function but I think it will also give wrong results, 
just not sure yet.

Rich