WLJS LogoWLJS Notebook

PiecewiseExpand

PiecewiseExpand[expr] expands nested piecewise functions in expr to give a single piecewise function.

  • PiecewiseExpand[expr, assum] expands piecewise functions using assumptions.
  • PiecewiseExpand[expr, assum, dom] does the expansion over the domain dom.

Examples

Expand Abs:

PiecewiseExpand[Abs[x]]
(* Piecewise[{{-x, x < 0}}, x] *)

With assumptions:

PiecewiseExpand[Abs[x], x > 0]
(* x *)

Nested piecewise:

PiecewiseExpand[Max[x, Min[y, z]]]

Please visit the official Wolfram Language Reference for more details.

On this page