5
\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} 
  • 5
    Welcome to TeX SX! You shouldn't use eqnarray anyway: it gives bad spacing and has been deprecated for more than 20 years. Try with align from amsmath, which furthermore has a simpler syntax. – Bernard Dec 26 '17 at 11:47
  • Please, post a minimal code so we could reproduce your margins and column width to help with format. – Sigur Dec 26 '17 at 12:43
  • 2
    Also, you should use \ln and \min. – Sigur Dec 26 '17 at 12:44

3 Answers3

7

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.

enter image description here

\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}
Mico
  • 506,678
  • It should be l(p_{ij}^d,{}&\lambda,\mu,\delta) to get correct spacing after the first comma. Maybe l(p_{ij}^d&,\lambda,\mu,\delta) or even l(&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
5

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}​ 

enter image description here

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}

enter image description here

Bernard
  • 271,350
4

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}

enter image description here

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}

enter image description here

Zarko
  • 296,517