3

I have two equations, both of which hold under the same condition (x<5):

\begin{align}
f(x) &= \sum_{n} a^i_j \Psi_n(x) &\text{for } x < 5
\\ g(x) &= \sum_{n} b^i_j \Phi_n(x) &\text{for } x < 5
\end{align} 

That code results in this output:

enter image description here

Now, what I would like to do is to gather both equations with a curly bracket and this way write the condition only once. I tried this:

\begin{align}
\left.
\begin{array}{rl}
f(x) &= \sum_{n} a^i_j \Psi_n(x)
\\ g(x) &= \sum_{n} b^i_j \Phi_n(x)
\end{array}
\right\} &\text{ for } x < 5
\end{align}

Which results in the following output:

enter image description here

However, this doesn't look good to me: The equations are now too close to each other and the alignment of the left hand side with the equation marks is not convincing.

Do you have a hint how I can resolve that issue?

1
  • You might be interested in rcases from mathtools.
    – leandriis
    Dec 18, 2020 at 14:37

2 Answers 2

3
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
  \begin{rcases}
    \begin{aligned}
      f(x) &= \sum_{n} a^i_j \Psi_n(x) \\
      g(x) &= \sum_{n} b^i_j \Phi_n(x)
    \end{aligned}
  \end{rcases} x < 5
\end{equation}
\end{document}

enter image description here

1
  • Exactly what I needed, thanks.
    – Amos Egel
    Dec 18, 2020 at 14:49
4

Another easy solution with empheq enables two equation numbers:

\documentclass{article}
\usepackage{empheq} 

\begin{document}

\begin{spreadlines}{1.5ex}
\begin{empheq}[right=\empheqrbrace\text{ for } x < 5]{align}
f(x) &= \sum_{n} a^i_j \Psi_n(x) \\
\ g(x) &= \sum_{n} b^i_j \Phi_n(x)
\end{empheq}
\end{spreadlines}

\end{document} 

enter image description here

3
  • New thought...nice suggestion....
    – MadyYuvi
    Dec 18, 2020 at 15:02
  • I like that this allows to align the equation mark signs (in case that the left hand sides have differend width).
    – Amos Egel
    Dec 18, 2020 at 16:06
  • This tension of amsmath (which comes with mathtools) is quite useful in a number of cases (no joke intended!).
    – Bernard
    Dec 18, 2020 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .