math-mode,equations,eqnarray – Fixing Floating Equation in Two Columns with Equation Array Package

eqnarrayequationsmath-mode

I'm sorry for such a basic question, however, I'm asking because I'm quite close to the deadline. So, my equations are floating on 2nd column based on the below MWE, I was trying to compress it somehow to manage them in a single column. Kindly help me to fix it Thank you in advance.

\documentclass[journal]{IEEEtran}
\usepackage{graphicx}      
\usepackage{nomencl}
\usepackage{cite}
\usepackage[cmex10]{amsmath}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage[acronym]{glossaries}
\IEEEoverridecommandlockouts           
\usepackage[ruled,longend,linesnumbered]{algorithm2e}
\SetArgSty{textup}
\SetKwBlock{Loop}{Loop}{end}
\usepackage{array}\usepackage{makecell}
\usepackage{multirow}
\usepackage{pbox}
\usepackage{amssymb}
\usepackage{stackengine}
\usepackage{float}
\begin{document}
\begin{eqnarray}
w_{t}^{j,buy} = \left\{
\begin{array}{l l}
w_{t}^{j,sel}u_{t}^{DS}+J_{t}^{by}(1-u_{t}^{DS}) &  \text{\emph{if} $0\leq u_{t}^{DS}\leq 1$}  \\
v_{t}^{sel} &  \text{\emph{otherwise}} 
\end{array} \right.
\end{eqnarray}

\begin{equation}
h_{t}^{j,by}=H_{t}^{j,sel} \Big( g_{t}^{M,L}-(g_{n,rr}^{j}+g_{t}^{j,s})\Big)\; if\; g_{t}^{M,L}>g_{n,rr}^{j}+g_{t}^{j,s}\label{Eq9}
\end{equation}
\begin{equation}
h_{t}^{j,sell}=H_{t}^{j,buy} \Big((g_{n,rr}^{j}+E_{t}^{h,y})-E_{y}^{M,L}\Big)\;\; if\; g_{n,rr}^{j}+g_{t}^{j,s}>g_{t}^{M,L}\label{Eq10}
\end{equation}



\end{document}

Best Answer

You should use cases for the first equation and you can exploit multilined for the other two (requires mathtools).

In the first equation I used a small trick: the spaces around binary operation symbols and relations are half their usual value.

\documentclass[journal]{IEEEtran}
\usepackage{amsmath,mathtools}
\usepackage{amssymb}

\usepackage[nopar]{lipsum} % for context

\IEEEoverridecommandlockouts           

\begin{document}

\lipsum[1][1-5]
\begin{equation}
\medmuskip=0.5\medmuskip
\thickmuskip=0.5\thickmuskip
w_{t}^{j,\mathrm{buy}} = 
\begin{cases}
w_{t}^{j,\mathrm{sell}}u_{t}^{DS}+J_{t}^{\mathrm{buy}}(1-u_{t}^{DS}) &
  \text{if $0\leq u_{t}^{DS}\leq 1$}  \\
v_{t}^{\mathrm{sell}} &
  \text{otherwise} 
\end{cases}
\end{equation}
\lipsum[2][1-3]
\begin{equation}\label{Eq9}
\begin{multlined}
h_{t}^{j,\mathrm{buy}}=H_{t}^{j,\mathrm{sell}} 
  \bigl(g_{t}^{M,L}-(g_{n,rr}^{j}+g_{t}^{j,s})\bigr)
\\
\text{if $g_{t}^{M,L}>g_{n,rr}^{j}+g_{t}^{j,s}$}
\end{multlined}
\end{equation}
\lipsum[3][1-3]
\begin{equation}\label{Eq10}
\begin{multlined}
h_{t}^{j,\mathrm{sell}}=H_{t}^{j,\mathrm{buy}}
  \bigl((g_{n,rr}^{j}+E_{t}^{h,y})-E_{y}^{M,L}\bigr)
\\
\text{if $g_{n,rr}^{j}+g_{t}^{j,s}>g_{t}^{M,L}$}
\end{multlined}
\end{equation}
\lipsum

\end{document}

enter image description here

Note that “buy” and “sell” should be upright. I also changed \Big to \bigl and \bigr.

Related Question