[Tex/LaTex] Reduce space between condition and statement in Latex case equation

aligncasesequations

I will like to reduce the space between the statement and the condition (the blue arrow length) in the latex case equation shown in the attached figure. My aim is to make the condition move a bit to the left to accommodate the equation number which was obscured by the length of the equation. I will want to also maintain the vertical alignment between the "if"s after space reduction(note, I am working on two-column IEEEtrans template)

\begin{numcases}{G(t,i) =}
    0, & $\text{if } t = 1$; \\
    \pi_2 (O(t)), & $\text{if }G(t-1,i) \leq0$;\\
    G(t-1,i) + \pi_{2} (O(t)), & $\text{otherwise}$.
\end{numcases}

enter image description here

Best Answer

You can, but you won't save much space. Here is an example with \mathrlap from mathtools (needless to load amsmath). I also simplified your code, and added another solution, which looks better, in my opinion:

\documentclass[12pt,a4paper]{article}
\usepackage{mathtools, cases}

\begin{document}

\begin{numcases}{G(t,i) =}
  0, & if $ t = 1$; \\
  \pi₂ (O(t)), & if $ G(t-1,i) \leq0$;\\
  G(t-1,i) + \pi_{2} (O\mathrlap{(t))}, & otherwise.
\end{numcases}

\begin{numcases}{G(t,i) =}
  0, & $\text{if } t = 1$; \\
  \pi₂ (O(t)), & $\text{if }G(t-1,i) \leq0$;\\
  G(t-1,i) + \mathrlap{\pi_{2} (O(t)),\quad \text{otherwise}}.
\end{numcases}

\end{document} 

enter image description here

Related Question