# Gather multiple equations with curly bracket

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:

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:

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?

• You might be interested in rcases from mathtools. – leandriis Dec 18 '20 at 14:37

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\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{document}


• Exactly what I needed, thanks. – Amos Egel Dec 18 '20 at 14:49

Another easy solution with empheq enables two equation numbers:

\documentclass{article}
\usepackage{empheq}

\begin{document}