\begin{equation*}
|x|=
\begin{cases} x & \text{if $x≥0$,}
\\
-x &\text{if $x\le 0$.}
\end{cases}
\end{equation*}
Note that the part after the alignment symbol usual contains some text
and is best typeset using "\text{... }",
and enclosing any math material within the braces
in dollar signs.
A good way to get the punctuation right is to replace the display by a place holder, such as "[DISPLAY]" and punctuate accordingly. Thus, for example, if the sentence surrounding the display is "Since f is monotonic, we have [DISPLAY], where ...", then no punctuation symbol is needed before the display, but the display should be terminated by a comma, since the phrase introduced by "where" following the display calls for a comma. A comma before the display would be wrong in this case (as would any other punctuation sign, such as a colon), since it would interrupt the continuity of the sentence.
Here are additional hints for some special situations:
f(x) = \sqrt{1+x} \quad (x \ge -1)
f(x) = \sqrt{1+x}, \quad x \ge -1
f(x) \sim x^2 \quad (x\to\infty)
f(x) \sim x^2, \quad x\to\infty
It would be wrong to use both a comma and parentheses.
(Note that, depending on the context, a punctuation sign at the end of
the display may also be called for.)
%%%%% equation 3.1 %%%%%%%%%%%%%%before and/or after the display.
Last modified: Sat 08 Sep 2007 06:43:24 PM CDT A.J. Hildebrand