The following examples show the use of piecewise definitions with a
number of standard Mathematica functions. Note that they work
transparently throughout, not requiring the user to signal their
presence to Mathematica beyond initial definition in any of
the
operations performed.
Example: Symbolic Manipulation of Piecewise Functions
Throughout Mathematica, piecewise functions are now
automatically supported in symbolic operations. Mathematica
supports traditional 2D formatting of piecewise definitions, for both
output and input.
In[1]:=
Out[1]:=
Example: Piecewise Integrals
Piecewise functions work with domain specification in
Mathematica,
enabling close-form solutions to a broad range of problems.
In[2]:=
Out[2]:=

Example: Solving an Equation with Piecewise Elements
This differential equation involves two piecewise
functions, UnitStep and Max.
In[3]:=
Out[3]:=
Example: Expanding Piecewise Definitions
In[4]:=
Out[4]:=