Can anyone explain the following? The ﬁrst result is ﬁne, but the second is blatantly wrong (the only diﬀerence is that the second function has "sin(x)/x" instead of "sin(x)" for x¿0):
It is corrected with Maple 6. (U. Klein)
The bug appears to be in `convert/piecewise`. The procedure `diff/piecewise` converts the expression to Heaviside before it (correctly) diﬀerentiates the expression.
The result is then converted to piecewise, the result of which is wrong (in your last example).
Here is an imitation of what is going on: