Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Piecewise, Sage VS Mathematica

I´m transitioning from Mathematica to Sage. But I don´t know the way to write the piecewise function below in Sage:

f(x,a)= 0 ; x<=a

      (x-a)^2  ;  x>a

How can I do this?

Thanks