convert/pwlist
convert a piecewise function to a list
Calling Sequence
Parameters
Description
Examples
convert(piecewise, pwlist, x)
piecewise
-
piecewise expression
pwlist
literal name
x
(optional) name; specify variable
A piecewise expression, such as f1cond1f2cond2...` `, is converted into an ordered list f1,t1,f2,t2,...,fn,tn,fn+1 which represents the piecewise-defined function:
fi⁢when⁢ti−1<x<ti,i=1,2,…,n+1.
Here, t0=−∞ and tn+1=∞ are implicit.
The variable x can be stated as an extra argument to the convert function. If x is not stated then the variable name is deduced if there is exactly one name appearing in the expression.
f≔piecewise⁡−1<xandx≤0,x3,0<xandx≤π2,sin⁡x,π2<x,1+cos⁡x:
convert⁡f,pwlist,x
0,−1,x3,0,sin⁡x,π2,1+cos⁡x
g≔piecewise⁡x<1,a−x,1≤x,ln⁡x:
convert⁡g,pwlist,x
a−x,1,ln⁡x
See Also
convert
convert/piecewise
Download Help Document