Question: piecewise and integers

Hi friends,

I have this piecewise function:

restart:assume(n,integer):h := piecewise(n::odd, n^2, n^3);

I can not get explicitly the derivative:

diff(h,n);

But, with

restart:h1 := piecewise(And(n::integer, n::odd), n^2, n^3);

I can get the derivative explicitly:

diff(h1,n);

Why ?

Thanks in advance

Please Wait...