# How to write the equations with conditions in two lines?

I want to write the boundary condition in the following form. Need your help to write the below equations in two lines

• Micky, it would be really cool if you could improve your questions by at least typing in the equations as code and don't leave all that to the answerers. Dec 26, 2015 at 8:41

You really want to use alignat or alignedat (the difference being that the former types two equations, the latter one equation on two lines)

\documentclass{amsart}
\begin{document}
\begin{alignat}{8}
\end{alignat}

\begin{alignedat}{8} \nu &= V_w &&= cz/l, & \qquad u&= U_0, &\qquad \text{at\quad} r &=R, \\ \nu &\rightarrow V_e &&= az/l, &\qquad T &\rightarrow T_{\infty},&\qquad \text{as\quad} r &\rightarrow \infty, \end{alignedat}

\begin{equation*}\begin{alignedat}{8} \nu &= V_w &&= cz/l, & \qquad u&= U_0, &\qquad \text{at\quad} r &=R, \\ \nu &\rightarrow V_e &&= az/l, &\qquad T &\rightarrow T_{\infty},&\qquad \text{as\quad} r &\rightarrow \infty, \end{alignedat}\end{equation*}

\end{document}


both environments are found in amsmath , which is loaded by amsart in my mwe

Use the amsmath package by using \usepackage{amsmath} in the preamble of your document and try this,

\begin{aligned} & \nu = V_w = cz/l, && u= U_0, & \text{at} && r &=R, \\ & \nu \to V_e = az/l, && T \rightarrow T_{\infty}, & \text{as} && r &\to \infty, \end{aligned}


With this code you will get the single equation no. The output is here,

Try to avoid the following code with tabular environment. See the comments of @Johannes_B.

\begin{tabular}{lll}
$\nu = V_w = cz/l,$ &  $u= U_0,$ & at $r =R,$ \\
$\nu \rightarrow V_e = az/l,$ & $T \rightarrow T_{\infty}$& as $r \rightarrow \infty,$
\end{tabular}


Here is my output,

• Are you really suggesting to use eqnarray? What about align? Dec 26, 2015 at 8:41
• Tabular or eqnarray? There are many better solutions. And spacing of the type \hspace{4.2mm} should be avoided. Dec 26, 2015 at 8:43
• @Johannes_B and @Kola, I agree that using \hspace is not a good thing, so I edited the answer. But I don't know why it is bad to use tabular environment. Could you please tell me.
– ddas
Dec 26, 2015 at 8:55
• This is obviously a displayed equatin, but you are in text mode within the tabular. This is more obvious when introucing integrals or sums. Dec 26, 2015 at 8:57
• @ddas I need the two equations with the single equation number Dec 26, 2015 at 9:08