2

I am typesetting a memoir for a member of the Royal Society, who has provided me with a hand-written copy. All was going well until a slightly too long multiline equation:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{equation*}
u(x) = 
\begin{cases} 
1 - \frac{1}{2}\left(\frac{r}{a}\right)^{-\frac{1}{2}} \left\{ 1 + O(1 + \tan \vartheta) \right\} + O\left(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) \text{as } \vartheta \downarrow -\pi/4,\\
1 - \frac{1}{2\pi}\left(\frac{r}{a}\right)^{-\frac{1}{2}}\left(\log \frac{32}{1 - \tan\vartheta}\right) \left\{1 + O(1-\tan\vartheta)\right\} + O\left(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) \text{as } \vartheta \uparrow \pi/4,
\end{cases}
\end{equation*}
\end{document}

It does not seem appropriate to have it run on to an extra line, as we already have several lines of cases (in the real equation, there are actually two more cases than I have included above). I also tried taking out a bit of horizontal space using the \! command, but the result looked a little chaotic.

Does anyone have any other ideas? I am reluctant to fiddle around with the margins / document font size, as this part of the document needs to be joined on to a piece typed by someone else (I assume) using the default geometry.

2
  • One could surround the 3 \textstyle occurrences of+ and - signs with \! backspaces, to trim things up a bit. – Steven B. Segletes May 16 '16 at 16:56
  • as unpalatable as it may be, i'd be inclined to separate out the expressions beginning with "as" onto separate lines, seriously indented. yes, it would double the height of the display, but it wouldn't compromise the meaning. – barbara beeton May 16 '16 at 17:01
1

How about one of these solutions?

\documentclass{article}
\usepackage{mathtools}
\usepackage{showframe}

\begin{document}

\begin{align*}
    & u(x) = \\
    & \begin{cases}
  1 - \frac{1}{2}\left(\frac{r}{a}\right)^{-\frac{1}{2}} \left\{ 1 + O(1 + \tan ϑ) \right\} + O\left(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) \text{as } ϑ\downarrow -\pi/4,\\
  1 - \frac{1}{2π}\left(\frac{r}{a}\right)^{-\frac{1}{2}}\left(\log \frac{32}{1 - \tanϑ}\right) \left\{1 + O(1-\tanϑ)\right\} + O\left(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) \text{as } ϑ\uparrow \pi/4,
  \end{cases}
\end{align*}

\begin{gather*}
  \shortintertext{$ u(x) = $}
  \begin{cases}
    1 - \frac{1}{2}\left(\frac{r}{a}\right)^{-\frac{1}{2}} \left\{ 1 + O(1 + \tan ϑ) \right\} + O\left(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) \text{as } ϑ\downarrow -\pi/4, \\
    1 - \frac{1}{2π}\left(\frac{r}{a}\right)^{-\frac{1}{2}}\left(\log \frac{32}{1 - \tanϑ}\right) \left\{1 + O(1-\tanϑ)\right\} + O\left(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) \text{as } ϑ\uparrow \pi/4,
  \end{cases}
\end{gather*}

\end{document} 

enter image description here

0

I'd profit of the fact that the first line is much shorter than the second one:

\documentclass{article}
\usepackage{showframe} % just for the example
\usepackage{amsmath}

\begin{document}
\begin{equation*}
u(x) =
\begin{cases}
\begin{array}{@{}l@{}}
1 - \frac{1}{2}\left(\frac{r}{a}\right)^{-\frac{1}{2}} \{ 1 + O(1 + \tan \vartheta) \} +
  O\Bigl(\left(\frac{r}{a}\right)^{\frac{1}{2}}\Bigr) \qquad
\text{as } \vartheta \downarrow -\pi/4,\\[2ex]
1 - \frac{1}{2\pi}\left(\frac{r}{a}\right)^{-\frac{1}{2}}
      \left(\log \frac{32}{1 - \tan\vartheta}\right) \{1 + O(1-\tan\vartheta)\} +
  O\Bigl(\left(\frac{r}{a}\right)^{\frac{1}{2}}\Bigr) \qquad\\
\multicolumn{1}{r}{\text{as } \vartheta \uparrow \pi/4,}
\end{array}
\end{cases}
\end{equation*}
\end{document}

enter image description here

1
  • This would be I think a good solution if that were the extent of the equation, but unfortunately there are several more cases of similar length to the second one here, and I worry it may get a bit messy. But I will give it a go, and present it to him as an option! – Kino May 16 '16 at 23:19
0

I like the following solution:

enter image description here

\documentclass{article}
\usepackage{mathtools}
\usepackage{showframe}

\begin{document} 
    \begin{align*}
u(x) = 
    &   \begin{dcases}
1 - \frac{1}{2}\left(\frac{r}{a}\middle)^{-\frac{1}{2}} 
               \middle\{1 + O(1 + \tan ϑ) \middle\} + 
        O\middle(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) 
        &   \text{as } ϑ\downarrow -\pi/4,              \\
        \begin{multlined}[b][0.55\textwidth]
1 - \frac{1}{2π}\left(\frac{r}{a}\right)^{-\frac{1}{2}}
                \left(\log\frac{32}{1 - \tanϑ}\right)\cdot    \\ 
                \left\{1 + O(1-\tanϑ)\middle\} + 
        O\middle(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right) 
        \end{multlined}
        &   \text{as } ϑ\uparrow \pi/4,
        \end{dcases}\\
%
u(x) =
    &   \begin{dcases}
1 - \frac{1}{2}\left(\frac{r}{a}\middle)^{-\frac{1}{2}}
               \middle\{1 + O(1 + \tan ϑ) \middle\} +
        O\middle(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right)
        &   \text{as } ϑ\downarrow -\pi/4,              \\
        \begin{multlined}[b][0.55\textwidth]
1 - \frac{1}{2π}\left(\frac{r}{a}\right)^{-\frac{1}{2}}
                \left(\log\frac{32}{1 - \tanϑ}\right)\cdot    \\
                \left\{1 + O(1-\tanϑ)\middle\} +
        O\middle(\left(\frac{r}{a}\right)^{\frac{1}{2}}\right)
        \end{multlined}
        &   \text{as } ϑ\uparrow \pi/4,
        \end{dcases}
    \end{align*}
\end{document} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.