# align three equations

What wrong with that?

\begin{eqnarray}
{v}_{sa}=m_{a}\frac{V_{d}}{2}cos(\omega_{1}t)\\
{v}_{sb}=m_{a}\frac{V_{d}}{2}cos(\omega_{1}t -\frac{2\pi}{3})\\
{v}_{sn}=m_{a}\frac{V_{d}}{2}cos(\omega_{1}t +\frac{2\pi}{3})\\
\label{current_rel1}
\end{eqnarray}


I want to get vsa ... vsb ... vsn:

 V_sa=...
V_sb=...
V_sn=...


Someone can help solving that?

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
– Troy
Dec 28, 2016 at 15:02
• Welcome to TeX SX! You have specified no alignment points. Anyway, eqnarray is deprecated and gives bad spacing. Replace it with the align environment, from amsmath. Dec 28, 2016 at 15:03
• Generally the advice is to use the align environment from amsmath rather than eqnarray (eqnarray vs align), in order to specify alignment points you need to place & at the alignment points, one & when using align and two when using eqnarray. See this answer for an example with align. Dec 28, 2016 at 15:05
• You should definitely replace cos with \cos. Also, I know of no advantage to having {v}_{sa} instead of just v_{sa} Dec 28, 2016 at 15:08
• great,That works. Dec 28, 2016 at 15:11

Maybe one of these is what you want?

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{aligned} v_{sa} & =m_{a}\frac{V_{d}}{2}\cos(\omega_{1}t) \\ v_{sb} & =m_{a}\frac{V_{d}}{2}\cos\Bigl(\omega_{1}t -\frac{2π}{3}\Bigr) \\ v_{sn} & =m_{a}\frac{V_{d}}{2}\cos\Bigl(\omega_{1}t +\frac{2π}{3}\Bigr) \label{current_rel1} \end{aligned}

\begin{align}
v_{sa} & =m_{a}\frac{V_{d}}{2}\cos(\omega_{1}t) \label{current_rel2} \\
v_{sb} & =m_{a}\frac{V_{d}}{2}\cos\Bigl(\omega_{1}t -\frac{2π}{3}\Bigr) \label{current_rel3} \\
v_{sn} & =m_{a}\frac{V_{d}}{2}\cos\Bigl(\omega_{1}t +\frac{2π}{3}\Bigr)
\label{current_rel4}
\end{align}

\begin{subequations}
\begin{align}
v_{sa} & =m_{a}\frac{V_{d}}{2}\cos(\omega_{1}t) \label{current_rel1a} \\
v_{sb} & =m_{a}\frac{V_{d}}{2}\cos\Bigl(\omega_{1}t -\frac{2π}{3}\Bigr) \label{current_rel1b} \\
v_{sn} & =m_{a}\frac{V_{d}}{2}\cos\Bigl(\omega_{1}t +\frac{2π}{3}\Bigr)
\label{current_rel1c}
\end{align}
\end{subequations}

\end{document}


• The original code has all three equations numbered. Can you add the alternative code for that? Dec 28, 2016 at 15:56
• @egreg: I'll add it, but there was only one label, from which I inferred it was meant as a whole. Dec 28, 2016 at 18:50

Some suggestions:

• Don't use the eqnarray environment: It's badly deprecated. Avoid eqnarray! Instead of eqnarray, use the align environment that's provided by the amsmath package. See the posting eqnarray vs align for more information on this subject.

• Don't forget to provide alignment points. (Your current code needs &=& instead of just =.) For the align environment, place & before = in order to achieve alignment on the = symbols.

• Write \cos instead of cos to get the term to behave like a math operator.

• Either create larger parentheses around the arguments of \cos or use smaller fractions.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
v_{sa}&=\tfrac{1}{2}m_{a}V_d\cos(\omega_{1}t)\\
v_{sb}&=\tfrac{1}{2}m_{a}V_d\cos(\omega_{1}t -\tfrac{2}{3}\pi)\\
v_{sn}&=\tfrac{1}{2}m_{a}V_d\cos(\omega_{1}t +\tfrac{2}{3}\pi) \label{current_rel1}
\end{align}
\end{document}