Why does \\ not return a new line in an equation?
Both equation
and equation*
do not allow multi lined expressions. Use aligned
from amsmath
, inside equation*
to break in to many lines. If alignment is not needed, you can use gathered
(instead of aligned
) as suggested by Mico.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}\label{eq:pareto mle2}
\begin{aligned}
A_0 = \frac{1}{(\alpha+t_x)^{r+s+x}}{}_2F_1\left(r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + t_x} \right ) \\
- \frac{1}{(\alpha+T)^{r+s+x}}{}_2F_1\left(r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + T} \right ),
\end{aligned}
\end{equation*}
\end{document}
Or use multlined
from mathtools
:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation*}\label{eq:pareto mle2}
\begin{multlined}
A_0 = \frac{1}{(\alpha+t_x)^{r+s+x}}{}_2F_1\left(r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + t_x} \right ) \\
- \frac{1}{(\alpha+T)^{r+s+x}}{}_2F_1\left(r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + T} \right ),
\end{multlined}
\end{equation*}
\end{document}
The amsmath
package -- which you appear to be loading already as your example code uses an environment called equation*
-- provides quite a few environments to typeset equations that need to be split across two or more lines. The align*
environment may be particularly suitable to the case at hand; note the use of &
to state the alignment points.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}\label{eq:pareto mle2}
A_0 &= \frac{1}{(\alpha+t_x)^{r+s+x}}{}_2 F_1\left( r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + t_x} \right)\\
&\quad - \frac{1}{(\alpha+T)^{r+s+x}}{}_2 F_1\left( r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + T} \right),
\end{align*}
\end{document}
Addendum: Note the close similarity of the outputs produced by the single align*
environment in this answer and by the nested pair of equation*
/multlined
environments in @HarishKumar's answer.
There is an easy way to make \\
works in equation (change line):
\begin{equation}
a = b
\end{equation}
Change it to
\begin{equation}
\begin{array}{l}
a = \\
b
\end{array}
\end{equation}