Dear all,
I am trying to define a piecewise function where the domains are parametrized by some variable:
import sage.all as sage
sage.var('x')
sage.var('x0')
sage.var('x1')
sage.assume( 0<x0)
sage.assume(x0<x1)
sage.assume(x1< 1)
sage.piecewise([((0,x0),0), ([x0,x1],1), ((x1,1),1)], var=x)
However, I cannot seem to get it to work:
TypeError: unable to simplify to a real interval approximation
Any idea how to make it work? Thanks!
Martin