Text in Math Displays

There will be times when you want to include Roman, i.e., non-italicized words amongst your mathematical symbols. The font isn't the only problem; spacing is different between letters in a word and variables in a formula. Use the command \mbox{your text here} to include short phrases in a formula. (If your phrase isn't short, then you should consider embedding your formula in a text paragraph instead of your text in a formula paragraph.)

$$
\int_0^{2\pi}\cos(mx)\,dx = 0 \hspace{1cm} 
\mbox{if and only if} \hspace{1cm} m\ne 0
$$

produces


\begin{displaymath}
\int_0^{2\pi}\cos(mx) dx = 0 \hspace{1cm} \mbox{if and only if} \hspace{1cm} m\ne 0
\end{displaymath}

Practice: Construct a document containing the following three expressions using \mbox:


\begin{displaymath}\sqrt{x^2+y^2} = 0 \hspace{1cm}\mbox{if and only if} \hspace{1cm} x = y = 0\end{displaymath}


\begin{displaymath}\frac{a}{b} > 0 \hspace{1cm} \mbox{implies that}\hspace{1cm}ab>0\end{displaymath}


\begin{displaymath}\sqrt{x} \hspace{1cm} \mbox{is only defined if}\hspace{1cm}x\ge 0\end{displaymath}



2002-02-28