Get Math Help

GET TUTORING NEAR ME!

By submitting the following form, you agree to Club Z!'s Terms of Use and Privacy Policy

    Piecewise Function

    Usage

    Piecewise[{{val1, cond1}, {val2, cond2}, ...}] represents a piecewise function with values vali in the regions defined by the conditions condi. 
Piecewise[{{val1, cond1}, ...}, val] uses default value val if none of the condi apply. The default for val is 0.

    Basic examples

    Basic examples

    Notation

    piecewise

    Operator input form precedence

    piecewise e_1 invisible comma 1 | e_1 invisible comma 2
e_2 invisible comma 1 | e_2 invisible comma 2
... | | Piecewise[{{e_1 invisible comma 1, e_1 invisible comma 2}, {e_2 invisible comma 1, e_2 invisible comma 2}, ...}]
expr::string | MessageName[expr, "string"]
expr::string_1::string_2 | MessageName[expr, "string_1", "string_2"]
# | Slot[1]
## | SlotSequence[1]
#n | Slot[n]
##n | SlotSequence[n]
⋮
(grouped in order of decreasing precedence)

    Attributes

    HoldAll | Protected | ReadProtected

    Relationships with other entities

    PiecewiseExpand | $MaxPiecewiseCases | Boole | Max | Min | RealAbs | Abs | RealSign | Sign | Clip | Ramp | UnitStep | UnitBox | UnitTriangle | Floor | Ceiling | Round | IntegerPart | Mod | SquareWave | TriangleWave | BezierFunction | BSplineFunction | Which | If

    Relationships with other entities

    Typical ranks of usage in programs

    239th most common (1 in 7140 symbols)

    297th most common (1 in 7800 symbols)

    387th most common (1 in 5730 symbols)

    History

    introduced in Version 5.1 (October 2004)
last modified in Version 7 (November 2008)

    Timeline

    Timeline

    Find the right fit or it’s free.

    We guarantee you’ll find the right tutor, or we’ll cover the first hour of your lesson.