On Friday, November 2, 2018 at 5:44:34 PM UTC-7, Emmanuel Charpentier wrote:
>
> One way to define (something almost the same as) what you want is :
> sage: f=piecewise([((-oo,0),x^3),((0,oo),x^2)],var=x)
> sage: f
> piecewise(x|-->x^3 on (-oo, 0), x|-->x^2 on (0, +oo); x)
> [...] Except for the po
One way to define (something almost the same as) what you want is :
sage: f=piecewise([((-oo,0),x^3),((0,oo),x^2)],var=x)
sage: f
piecewise(x|-->x^3 on (-oo, 0), x|-->x^2 on (0, +oo); x)
An indeed; you can do
sage: plot(f(x),(x,-1,1), figsize=3)
which seems correct. Except for the point 0, for wh
Il giorno mercoledì 31 ottobre 2018 10:11:34 UTC+1, Francesco ha scritto:
>
> 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:
> retu