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≔convertabsx,piecewise
A≔−xx<0x0≤x
simplifyAA
x2
B≔piecewisex2−4<0,−x,xx
B≔−xx2<4x2otherwise
simplifyB−piecewise3<x,0,1
x2−1x≤−2−x−1x<2x2−1x≤3x23<x
`simplify/piecewise`piecewise0<x,a,b2,x
bx≤0a0<x2
See Also
convert[piecewise]
Download Help Document