TeX - LaTeX Asked by Amos Egel on April 1, 2021
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?
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}
Correct answer by leandriis on April 1, 2021
Another easy solution with empheq
enables two equation numbers:
documentclass{article}
usepackage{empheq}
begin{document}
begin{spreadlines}{1.5ex}
begin{empheq}[right=empheqrbracetext{ 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}
Answered by Bernard on April 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP