Re: [sage-support] Derivative of functions ...

2018-10-31 Thread Dima Pasechnik
On Wed, Oct 31, 2018 at 9:11 AM Francesco wrote: > > Hello; I have installed sage 8.4 and I have problem with the derivatives ... > I have defined a function in sage of this type: > > x=var('x') > def funz(x): >if x >= 0: > return x^2 >else: > return x^3 > > but, when I try

[sage-support] Derivative of functions ...

2018-10-31 Thread Francesco
Hello; I have installed sage 8.4 and I have problem with the derivatives ... I have defined a function in sage of this type: x=var('x') def funz(x): if x >= 0: return x^2 else: return x^3 but, when I try to calculate diff(funz(x),x) I obtain only 3x^2 and this is wrong