Piecewise Functions — Cheat sheet

Choose “Save as PDF” in the print dialog.
On this page

Key method

To evaluate, first decide which condition the input satisfies, then use only that formula. At a boundary, inspect strict and non-strict inequality signs to determine endpoint inclusion.

Example

Let f(x)=x+2f(x)=x+2 for x<0x<0 and f(x)=x2f(x)=x^2 for x≥0x\ge0. Then f(−1)=1f(-1)=1, f(0)=0f(0)=0, and f(2)=4f(2)=4. The left branch approaches 22 near zero, while the value at zero is determined by the second branch. This is a jump, despite both formulas being individually continuous.

Avoid this mistake

Using both formulas at a boundary without checking the case conditions can assign two incompatible outputs.