Appearance
How to Input Piecewise Functions
Written Tutorial
Enter Math Mode
- If you want to type a math formula, enter Math Mode first.
- For inline math, type
$. - For a display equation on its own line, use
Alt/Option+$.
Insert a Piecewise Function
- In Math Mode, use the Toolbar:
Insert->Table->Choice. - Or press
\to enter command mode, typechoice, and pressEnter.
Expand the Piecewise Structure
- Place the cursor inside the piecewise function.
- Use
Alt/Option+ the arrow keys to expand it.
Enter Each Case
- A common layout is to type the expression on the left and the condition on the right.
- For example, type
x^2on the left andx >= 0on the right. - You can also keep using LEGO symbols, Tab cycling, or command mode for additional math symbols.
Numbering and Referencing
- Piecewise functions can be numbered as a whole formula or line by line.
- If you select the whole piecewise function and click
123on the focus toolbar, the whole multi-line formula is typically numbered. - For more about the
123button, the\eq-numbercommand, and references, see Quick Formula Editing.
Optional Reading: How to Write a Piecewise Function in LaTeX
In , the most common way to typeset a piecewise function is the cases environment. For example:
latex
f(x) =
\begin{cases}
x^2, & x \ge 0 \\
-x, & x < 0
\end{cases}This renders as:
If you already have existing code, you can also convert it directly in Liii STEM with Magic Paste.