Code : Tout sélectionner
f(x):=piecewise(x<1,undef,x<3,x,x<5,-x,undef);
f(x); // piecewise([undef])
Code : Tout sélectionner
g(x):=piecewise(x<1,-x,x<3,x-2,x<5,4-x,x-6);
solve(g(x)=0); // list[((1>x) and 0),((((expr("not(((1>x)))",0)) and (3>x))) and 2),((((expr("not(((1>x) or (3>x)))",0)) and (5>x))) and 4),((expr("not(((1>x) or (3>x) or (5>x)))",0)) and 6)]