\begin{eqnarray}{\label{eq:9}}
l(p_{ij}^d,\lambda,\mu,\delta)=\left \{\frac{1}{\text{ln}2} \sum_{j=1}^{M}\sum_{i\in \mathcal{D}_j} \text{ln} \left (1+\frac{p_{ij}^dg_{jj}}{\sigma_N^2+p_ch_{ij}}\right )\right\}\nonumber\\- \sum_{j=1}^{M} \sum_{i\in \mathcal{D}_j}\lambda_{ij} \left(p_{ij}^d-\frac{p_{c}g_{iB}}{(2^{R_{min}}-1) h_{jB}} + \frac{\sigma_N^2}{h_{jB}}\right)\nonumber\\-\sum_{j=1}^{M}\mu_{j}\left(\sum_{i\in \mathcal{D}_j} p_{ij}^d- P_{dmax}^j\right)\nonumber\\+\sum_{j=1}^{M}\sum_{i\in \mathcal{D}_j}\delta_{ij}p_{ij}^d
\end{eqnarray}
- 51
- 2
3 Answers
In addition to not using the badly deprecated eqnarray environment, the following solution uses an align environment, uses \biggl and \biggr instead of \left and \right to size the large parentheses (resulting in both more consistent and more appropriate sizing), uses \ln instead of \text{ln} (for better spacing), and employs upright ("roman") lettering for "min" and "dmax". It also does away with the curly braces in the first row since they appear to be adding nothing but visual clutter.
With these adjustments, it's possible to make the equation occupy three rows rather than four.
\documentclass[twocolumn]{article}
\usepackage{amsmath} % for 'align' environment
\begin{document}
\begin{align}\label{eq:9}
l(&p_{ij}^d,\lambda,\mu,\delta)
=\frac{1}{\ln2} \sum_{j=1}^{M} \sum_{i\in\mathcal{D}_j}
\ln \biggl( 1+\frac{p_{ij}^d g^{}_{jj}}{\sigma_N^2+p_c h_{ij}} \biggr) \nonumber\\
&- \sum_{j=1}^{M} \sum_{i\in\mathcal{D}_j}\lambda_{ij}
\biggl( p_{ij}^d-\frac{p_{c}g_{iB}}{(2^{R_{\min}}-1) h_{jB}}
+ \frac{\sigma_N^2}{h_{jB}} \biggr)\nonumber\\
&-\sum_{j=1}^{M}\mu_{j} \biggl(\,\sum_{i\in\mathcal{D}_j} p_{ij}^d
- P_{\mathrm{dmax}}^j \!\biggr)%\nonumber\\
+\sum_{j=1}^{M}\sum_{i\in\mathcal{D}_j}\delta^{}_{ij}p_{ij}^d
\end{align}
\end{document}
- 506,678
-
It should be
l(p_{ij}^d,{}&\lambda,\mu,\delta)to get correct spacing after the first comma. Maybel(p_{ij}^d&,\lambda,\mu,\delta)or evenl(&p_{ij}^d,\lambda,\mu,\delta)– egreg Dec 26 '17 at 13:40 -
@egreg - Many thanks for these suggestions! I've implemented them; and I've taken the opportunity to tweak the subscript placements of
g_{jj}and\delta_{ij}in the first and third rows, resp. – Mico Dec 26 '17 at 13:59
Here a code for an equation fitting the column width, with some manual spacing adjustments:
\documentclass[ a4paper, twocolumn]{article}%
\usepackage[showframe]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{mathtools, nccmath}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{fleqn}
\begin{equation}
\label{eq:9}
\begin{aligned}[b]
& l(p_{ij}^d,\lambda,\mu,\delta )= \\
& \mkern-4mu -\!\biggl\{\frac{1}{\ln 2} \sum_{j=1}^{M}\sum_{i\in \mathcal{D}_j} \ln\biggl(1\!+\!\frac{p_{ij}^dg_{jj}}{\sigma_N^2+p_ch_{ij}}\biggr) \biggr\}
\\&\mkern-4mu -\!\sum_{j=1}^{M} \sum_{i\in\mathcal{D}_j}\mkern-5mu \mathrlap{\lambda_{ij}\biggl(p_{ij}^d\!-\!\frac{p_{c}g_{iB}}{(2^{R_{\min}}\!-\!1) h_{jB}}\!+\!\frac{\sigma_N^2}{h_{jB}}\!\biggr)}\\%
& \mkern-4mu -\!\sum_{j=1}^{M}\mu_{j}\biggl(\sum_{i\in \mathcal{D}_j}\! p_{ij}^d\!-\! P_{d\max}^j\!\biggr)\!+\!\sum_{j=1}^{M}\!\sum_{i\in \mathcal{D}_j}\!\delta_{ij}p_{ij}^d
\end{aligned}
\end{equation}
\end{fleqn}
\lipsum[2]
\end{document}
If you accept that part of the equation be medium size (~80% of \displaystyle), the \medmath command from nccmath allows for a simpler code, without manual adjustment:
\begin{fleqn}
\begin{equation}
\label{eq:9}
\begin{aligned}[b]
& l(p_{ij}^d,\lambda,\mu,\delta )= \\
& \medmath{\biggl\{\frac{1}{\ln 2} \sum_{j=1}^{M}\sum_{i \in \mathcal{D}_j} \ln\biggl (1+\frac{p_{ij}^dg_{jj}}{\sigma_N^2+p_ch_{ij}}\biggr ) \biggr\}} \\[-1ex]
&\medmath{-\sum_{j=1}^{M} \sum_{i \in \mathcal{D}_j}\lambda_{ij} \biggl(p_{ij}^d-\frac{p_{c}g_{iB}}{(2^{R_{\min}}\!-\!1) h_{jB}} + \frac{\sigma_N^2}{h_{jB}}\biggr)} \\[-1ex]%
&\medmath{-\sum_{j=1}^{M}\mu_{j}\biggl(\sum_{i \in \mathcal{D}_j} p_{ij}^d - P_{d\max}^j\biggr) +\sum_{j=1}^{M}\sum_{i \in \mathcal{D}_j}\delta_{ij}p_{ij}^d}
\end{aligned}
\end{equation}
\end{fleqn}
- 271,350
solution with use of \MoveEqLeft from mathtools:
\documentclass[twocolumn]{article}
\usepackage{mathtools} % for '\MoveEqLeft' com.
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{align}\label{eq:9}
\MoveEqLeft
l(p_{ij}^d,\lambda,\mu,\delta) \notag\\
& = \frac{1}{\ln 2} \sum_{j=1}^{M}\sum_{i\in\mathcal{D}_j}
\ln \biggl( 1+\frac{p_{ij}^d g_{jj}}{\sigma_N^2+p_c h_{ij}} \biggr) \notag\\
& - \sum_{j=1}^{M} \sum_{i\in\mathcal{D}_j}\lambda_{ij}
\biggl( p_{ij}^d-\frac{p_{c}g_{iB}}{(2^{R_{\min}}-1) h_{jB}}
+ \frac{\sigma_N^2}{h_{jB}} \biggr)\notag\\
& - \sum_{j=1}^{M}\mu_{j} \biggl(\,\sum_{i\in\mathcal{D}_j} p_{ij}^d
- P_{d\max}^j \biggr)\notag\\
& + \sum_{j=1}^{M}\sum_{i\in\mathcal{D}_j}\delta_{ij}p_{ij}^d
\end{align}
\lipsum[2]
\end{document}
addendum:
with use \medmath from nccmat package this formula can be fit in four rows:
\documentclass[twocolumn]{article}
\usepackage{mathtools} % for '\MoveEqLeft' command
\usepackage{nccmath} % for medium size of equation
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{equation}
\medmath{\begin{aligned}[b]\label{eq:9}
\MoveEqLeft
l(p_{ij}^d,\lambda,\mu,\delta) \\
& = \frac{1}{\ln 2} \sum_{j=1}^{M}\sum_{i\in\mathcal{D}_j}
\ln \biggl( 1+\frac{p_{ij}^d g_{jj}}{\sigma_N^2+p_c h_{ij}} \biggr) \\
& - \sum_{j=1}^{M} \sum_{i\in\mathcal{D}_j}\lambda_{ij}
\biggl( p_{ij}^d-\frac{p_{c}g_{iB}}{(2^{R_{\min}}-1) h_{jB}}
+ \frac{\sigma_N^2}{h_{jB}} \biggr) \\
& - \sum_{j=1}^{M}\mu_{j} \biggl(\,\sum_{i\in\mathcal{D}_j} p_{ij}^d
- P_{d\max}^j \biggr) + \sum_{j=1}^{M}\sum_{i\in\mathcal{D}_j}\delta_{ij}p_{ij}^d
\end{aligned}
}
\end{equation}
\lipsum[2]
\end{document}
- 296,517





eqnarrayanyway: it gives bad spacing and has been deprecated for more than 20 years. Try withalignfromamsmath, which furthermore has a simpler syntax. – Bernard Dec 26 '17 at 11:47\lnand\min. – Sigur Dec 26 '17 at 12:44