I want to write the boundary condition in the following form. Need your help to write the below equations in two lines
[Tex/LaTex] How to write the equations with conditions in two lines
equations
Related Solutions
I would't use center alignment for the three equations: either you align them at the equals sign or left align them because of the side conditions. I wouldn't put the conditions too far from the equations, either: the conditions are part of the equations, after all. A \quad
or \qquad
seems sufficient.
\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{section}
\begin{document}
\section{Outflow}
For the outflow boundary condition, the pressure is specified as a Dirichlet boundary
condition, assigned with free-stream pressure and the density $\rho$ and the velocity
$\vec{u}$ are specified as a Neumann boundary condition,
\begin{alignat}{2}
&p = p_\infty\qquad && \text{on $\Gamma_{\mathrm{out}}$} \\
&\frac{\partial\rho}{\partial\hat{n}} = 0 && \text{on $\Gamma_{\mathrm{out}}$} \\
&\frac{\partial \vec{u}}{\partial \hat{n}} = 0 && \text{on $\Gamma_{\mathrm{out}}$}
\end{alignat}
\end{document}
If you want alignment on the equals signs, just change the position of the first &
:
\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{section}
\begin{document}
\section{Outflow}
For the outflow boundary condition, the pressure is specified as a Dirichlet boundary
condition, assigned with free-stream pressure and the density $\rho$ and the velocity
$\vec{u}$ are specified as a Neumann boundary condition,
\begin{alignat}{2}
p &= p_\infty\qquad && \text{on $\Gamma_{\mathrm{out}}$} \\
\frac{\partial\rho}{\partial\hat{n}} &= 0 && \text{on $\Gamma_{\mathrm{out}}$} \\
\frac{\partial \vec{u}}{\partial \hat{n}} &= 0 && \text{on $\Gamma_{\mathrm{out}}$}
\end{alignat}
\end{document}
My personal preference goes to the first solution.
If you want to have some more alignment than you have right now I would recommend the following approach:
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{alignedat}{2}
\dot{R}&=\frac{66}{364}\,P_R+ \frac{\partial V}{\partial P_R} \qquad
&\dot{\theta}&=2P_{\theta}\Bigl(\frac{13}{168r^2}-\frac{33}{364R^2}\Bigr)+\frac{\partial V}{\partial P_{\theta}}\\
\dot{P_{\theta}}&=-\frac{\partial V}{\partial \theta}
&\dot{P_R}&=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R}
\end{alignedat}
\end{equation}
\end{document}
You may align to the very left or very right of every term by moving the & symbols there, of course.
Best Answer
You really want to use
alignat
oralignedat
(the difference being that the former types two equations, the latter one equation on two lines)both environments are found in
amsmath
, which is loaded byamsart
in my mwe