# Inequalities, vertical spacing math

I have a couple of inequalities. And though I am happy with the result, I am not with the way I achieved it because I manually added some \vspace. How does one achieve this more elegantly?

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[onehalfspacing]{setspace}
\usepackage{amsmath}
\begin{document}

\section*{New }
\begin{center} $(1-p_{i}^{r})(1-p_{o}^{r})2 u(e_{o})+(p_{i}^{r} (1-p_{o}^{r}) + (1-p_{i}^{r})p_{o}^{r} )(2u(\frac{e_{i}+\Delta e_{i}+e_{o}}{2})-d)+p_{i}^{r}p_{o}^{r}2 (u(e_{i}+\Delta e_{i})-d)$ \end{center}
\vspace{-1.8cm}
\begin{center}
\begin{equation*} \geq   \end{equation*}
\end{center}\vspace{-0.7cm}

\begin{center} $(1-p_{i}^{n} )(1-p_{o}^{n} )2 u(e_{o})+(p_{i}^{n} (1-p_{o}^{n} ) + (1-p_{i}^{n} )p_{o}^{r} )(2u(\frac{e_{i}+e_{o}}{2})-d)+p_{i}^{n} p_{o}^{n} 2 (u(e_{i})-d)$, \end{center}
\section*{New }

\begin{center} $$U_{(j,\tilde{j})}^{r}=(1-p_{j}^{r})(1-p_{\tilde{j}}^{r})(1+\alpha)u(c_{o,o})+(1-p_{j}^{r})p_{\tilde{j}}^{r}(u(c_{o,i})+\alpha (u(c_{i,o})-d))$$\\
$$+p_{j}^{r}(1-p_{\tilde{j}}^{r})(u(c_{i,o})-d+\alpha u(c_{o,i}))+p_{j}^{r}p_{\tilde{j}}^{r}(1+\alpha)(u(c_{i,i})-d)$$
\end{center}

\vspace{-2.0cm}

\begin{center} \begin{equation*} \geq  \label{EQALT} \end{equation*} \end{center}\vspace{-0.9cm}

\begin{center} $$U_{(j,\tilde{j})}^{n}=u(c_{j,\tilde{j}})-{1}_{\{j=i\}}d +\alpha(u(c_{\tilde{j},j})-{1}_{\{\tilde{j}=i\}}d).$$\end{center}
\end{document}


This is a rather unusual way of writing an equation. The amsmath package provides a number of environments that is specifically designed to organize multi-line equations. In this case, the gather environment can be an option for you.

Here, I organized your first equation with gather:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[onehalfspacing]{setspace}
\usepackage{amsmath}
\begin{document}

\small\begin{gather*}
(1-p_{i}^{r})(1-p_{o}^{r})2 u(e_{o})+(p_{i}^{r} (1-p_{o}^{r}) + (1-p_{i}^{r})p_{o}^{r} )(2u(\tfrac{e_{i}+\Delta e_{i}+e_{o}}{2})-d)+p_{i}^{r}p_{o}^{r}2 (u(e_{i}+\Delta e_{i})-d) \\
\geq \\
(1-p_{i}^{n} )(1-p_{o}^{n} )2 u(e_{o})+(p_{i}^{n}  (1-p_{o}^{n} ) + (1-p_{i}^{n} )p_{o}^{r} )(2u(\tfrac{e_{i}+e_{o}}{2})-d)+p_{i}^{n} p_{o}^{n} 2 (u(e_{i})-d)
\end{gather*}

\end{document}


Some notes:

• I replaced \frac with \tfrac to have the same appearance as in your original example. You may want to use \frac again but that will require some adjustments with the braces.
• I used \small to have the full equation fit in one line (so that you see that gather actually centers the equations). Instead of a smaller font size you might add an additional line break or change the page margins. There are also other math environments you can use for very long equations.
• Perfect. The second one I did myself. – PeterStrawson Feb 9 '18 at 9:26

I'd avoid the ≥ symbol centered by itself; splitting those long terms seems necessary.

\documentclass{scrartcl}
\usepackage{amsmath,mathtools}

\begin{document}

\section*{New}
Some text for detaching the equation from the section title
$$\begin{multlined} \begin{multlined} \bigl(1-p_{i}^{r})(1-p_{o}^{r}) 2u(e_{o}\bigr) +\bigl(p_{i}^{r} (1-p_{o}^{r}) + (1-p_{i}^{r})p_{o}^{r}\bigr) \bigl(2u(\tfrac{e_{i}+\Delta e_{i}+e_{o}}{2})-d\bigr) \\ +p_{i}^{r}p_{o}^{r}2 (u(e_{i}+\Delta e_{i})-d) \end{multlined} \\[1ex] \begin{multlined} \geq (1-p_{i}^{n})(1-p_{o}^{n}) 2u(e_{o})+(p_{i}^{n} (1-p_{o}^{n}) + (1-p_{i}^{n})p_{o}^{r})\bigl(2u(\tfrac{e_{i}+e_{o}}{2})-d\bigr)\\ +p_{i}^{n} p_{o}^{n} 2 (u(e_{i})-d), \end{multlined} \end{multlined}$$

\end{document}


Are you sure about p_{o} and e_{o} or shouldn't they be p_{0} and e_{0}?