# Help with aligning equations

Can anyone, please, help me with a code to align the equations the same as the picture attached ?

I have tried to insert a big bracket to cover the two equations on the left side image but i do not know why my bracket cover just one equation.

Sincerely regards, Sérgio

• Could you include the code of your equations? Then it's easier to help you. – Karlo Jul 28 '16 at 16:19
• Did you want to simply reproduce the equations in the image? If so, then using the cases environment within an equation environment will give you the big brace on the left. If not, please be more specific on how you want to align things. – Herr K. Jul 28 '16 at 16:25

Here is a simple way to achieve this:

\documentclass{article}

\usepackage{amsmath,amstext}
\usepackage{newtxmath}
\begin{document}

$$\begin{cases} \displaystyle \nu(z_0)+\frac{g}{f}\frac{\partial\,\eta_s}{\partial\,x} =\frac{g}{f}\frac{\partial\,\eta}{\partial\,x}\\[15pt] \displaystyle\text{with }\nu(z_0) = \frac{1}{f\rho_0}\frac{\partial\,P_{z0}}{\partial\,x} \end{cases} \Rightarrow \eta = \eta_s+ \frac{P_{z0}}{\rho_0g}$$

\end{document}


Output:

Using amsmath

\documentclass{article}
\usepackage{amsmath}

\begin{document}
If you want it center-aligned inside the braces, use \texttt{gathered}
\left\{ \begin{gathered} v(z_0) + \frac{g}{f} \frac{\partial\eta_s}{\partial x} = \frac{g}{f} \frac{\partial \eta}{\partial x} \\ \text{with } v(z_0) = \frac{1}{f\rho_0} \frac{\partial P_{z0}}{\partial x} \text{ (junk to show alignment)} \end{gathered} \right. \implies \eta = \eta_s + \frac{P_{z0}}{\rho_0 g}

If you want it either left-aligned, it is slightly simpler:
\begin{cases} v(z_0) + \frac{g}{f} \frac{\partial\eta_s}{\partial x} = \frac{g}{f} \frac{\partial \eta}{\partial x} \\ \text{with } v(z_0) = \frac{1}{f\rho_0} \frac{\partial P_{z0}}{\partial x} \text{ (junk to show alignment)} \end{cases} \implies \eta = \eta_s + \frac{P_{z0}}{\rho_0 g}

If for some reason you want it right aligned, you can use \texttt{aligned}

\left\{ \begin{aligned} v(z_0) + \frac{g}{f} \frac{\partial\eta_s}{\partial x} = \frac{g}{f} \frac{\partial \eta}{\partial x} \\ \text{with } v(z_0) = \frac{1}{f\rho_0} \frac{\partial P_{z0}}{\partial x} \text{ (junk to show alignment)} \end{aligned} \right. \implies \eta = \eta_s + \frac{P_{z0}}{\rho_0 g}

\end{document}


• I'd go with cases for the second example (and remove the third). – egreg Jul 28 '16 at 16:56
• @egreg If the OP does want center or right alignment, I don't know how you can do it with cases. (The image the OP includes happened to have the two lines practically exactly the same length, so I don't know what the alignment needs are.) – Willie Wong Jul 28 '16 at 16:57
• @egreg edited. Too lazy to re-build the image file. (Also, I guess I am a bit silly in that I always find it uncomfortable to use cases when the lines are not really different "cases".) – Willie Wong Jul 28 '16 at 17:01

I would do it this way, using the dcases and rcases environment from mathtools. Also, the esdiff package simplifies typing (partial) derivatives.

\documentclass{article}

\usepackage{mathtools}
\usepackage{fourier, erewhon}
\usepackage{esdiff}

\begin{document}

$$\begin{rcases}\begin{dcases} ν(z₀)+\frac{g}{f}\diffp{\eta_s}{x} =\frac{g}{f}\diffp{η}{x}\\[0.5ex] \text{with }ν(z₀) = \frac{1}{f\rho₀}\diffp{P_{z0}}{x} \end{dcases}\end{rcases} ⇒ η= \eta_s+ \frac{P_{z0}}{\rho₀g}$$

\end{document}