Piecewise Functions
Explore functions with different rules by interval.
Explore the branches
Input
Active branch
Evaluated result
f(x)=\begin{cases}-x & x<0 \\ x & x\ge 0\end{cases}Typeset conditions with cases
The cases environment pairs each expression with its condition under one opening brace. Include equality in the appropriate condition so the definition covers its boundary. Choose from 13 examples, including pulses, step functions, and loss functions. JavaScript evaluates them; KaTeX renders the definition and result. See cases notation for the underlying TeX syntax.