simplify/piecewise
simplify piecewise expressions
Calling Sequence
Parameters
Description
Examples
simplify(expr)
simplify(expr, piecewise)
`simplify/piecewise`(expr, var)
expr
-
any expression
piecewise
(optional) literal name; piecewise
var
variable
The simplify/piecewise command can simplify expressions with piecewise functions of one variable. If the expression contains more than one variable use the convert(expr, piecewise, var) calling sequence or the long form `simplify/piecewise`(expr, var).
A≔convert⁡abs⁡x,piecewise
A≔−xx<0x0≤x
simplify⁡A⁢A
x2
B≔piecewise⁡x2−4<0,−x,x⁢x
B≔−xx2<4x2otherwise
simplify⁡B−piecewise⁡3<x,0,1
x2−1x≤−2−x−1x<2x2−1x≤3x23<x
`simplify/piecewise`⁡piecewise⁡0<x,a,b2,x
bx≤0a0<x2
See Also
convert[piecewise]
Download Help Document