# Fit this equation code into column width

Is there any way I can fit this equation into column width?

\label{eq19} \begin{aligned} \frac{\partial P_k}{\partial V_{r_o}} = \begin{cases} & 2V_{r_k}G_{kk}(T) + \sum^{n}_{i=1} (G_{ki}(T)V_{r_i}-B_{ki}(T)V_{m_i}) \\ & \sum_{o=1}^{n} (B_{ko}(T)V_{r_o}+G_{ko}(T)V_{m_o}) \end{cases} \end{aligned}


Because I am working on IEEEtrans style, every page is two columns and I want to fit it in single column width.

Thanks.

Update

This is what I am trying to get

$$\label{eq19} \frac{\partial P_k}{\partial V_{r_o}} = \begin{dcases} 2V_{r_k}G_{kk}(T) + \sum^{n}_{i=1} (G_{ki}(T)V_{r_i}-B_{ki}(T)V_{m_i}) \textnormal{for o=k}\\ \sum_{o=1}^{n} (B_{ko}(T)V_{r_o}+G_{ko}(T)V_{m_o}) \textnormal{for o\neq k} \end{dcases}$$


But the conditions need to be aligned and the entire equation, I was hoping, could be possibly fit in the column.

Update

This is where I am so far

$$\label{eq19} \frac{\partial P_k}{\partial V_{r_o}} = \begin{dcases} 2V_{r_k}G_{kk}(T) + \sum^{n}_{i=1} (G_{ki}(T)V_{r_i}-B_{ki} (T)V_{m_i})~&\textnormal{for o=k} \\ (V_{r_k}G_{ko}(T)+V_{m_k}B_{ko}(T))~&\textnormal{for o\neq k} \end{dcases}$$

\frac{\partial P_k}{\partial V_{r_o}} = \left\lbrace\begin{aligned} &2V_{r_k}G_{kk}(T) + \sum^{n}_{i=1}(G_{ki}(T)V_{r_i}-B_{ki}(T)V_{m_i})~&&\textnormal{for o=k} \\ &\sum_{o=1}^{n} (B_{ko}(T)V_{r_o}+G_{ko}(T)V_{m_o})~&&\textnormal{for o\neq k} \end{aligned}\right.


Anyway now to fit them into the column width without multiline or splitting?

• Welcome to TeX.SE!Please, help us to help you! Extend your code snipped to complete small document with \documentclass{...} on the begin, minimal necessary preamble , code of your equation and ending with end{document} Commented Mar 20, 2017 at 8:12
• I am sorry, my bad. New and didn't think through properly. Excuse my mistakes please Commented Mar 20, 2017 at 21:30

Since you still not provide a Minimal Working Example (MWE) which we can test, is difficult to help you. In your code and mentioned document class, which you should use, I found more issues:

• IEEEtrans is corrupted with message of the person who claim that he improved it. So, if you receive any result, than you didn't use it. To resolve this, please (I ask you again) complete your code snipped, that we can see, what is really going on in your document.
• From LaTeX aspect, if cases is real necessary, the use of aligned environment is surplus.
• From math aspect the use of cases is not complete: in it I miss condition when one of equations is valid.

To solve your basic problem, you need to break first equation in cases into two lines, for example as follows:

$$\label{eq19} \frac{\partial P_k}{\partial V_{r_o}} = \begin{dcases} \begin{multlined}[0.5\linewidth] 2V_{r_k}G_{kk}(T)\\ + \sum^{n}_{i=1} (G_{ki}(T)V_{r_i}-B_{ki}(T)V_{m_i}) \end{multlined} \\ \sum_{o=1}^{n} (B_{ko}(T)V_{r_o}+G_{ko}(T)V_{m_o}) \end{dcases}$$


which in my math testbed using \documentclass{IEEEtran} gives:

Considering David Carlisle assumption in his answer, you can rewrite your equation into following form:

by:

\documentclass{ieeetran}
\usepackage{mathtools}

\usepackage{lipsum}

\begin{document}
\lipsum*[1]
\begin{multline}\label{eq19}
\frac{\partial P_k}{\partial V_{r_o}} =
2V_{r_k}G_{kk}(T) + \\
\sum^{n}_{i=1} (G_{ki}(T)V_{r_i}-B_{ki}(T)V_{m_i}) + \\
\sum_{o=1}^{n} (B_{ko}(T)V_{r_o}+G_{ko}(T)V_{m_o})
\end{multline}
\lipsum[2-9]
\end{document}


Edit:

After end it seems, that your equation will have some condition. For it writing in equation you need space, so the your problem can become more acute: for their writing is only for four letter space left! As possible solution you can write:

\documentclass{ieeetran}
\usepackage{mathtools}
\usepackage[T1]{fontenc}

\usepackage{lipsum}% for dummy text

\begin{document}
\lipsum*[1]
$$\label{eq19} \frac{\partial P_k}{\partial V_{r_o}} = \begin{dcases} \begin{multlined} 2V_{r_k}G_{kk}(T)\\ + \sum^{n}_{i=1} (G_{ki}(T)V_{r_i}-B_{ki}(T)V_{m_i}) \end{multlined} & * \\ \sum_{o=1}^{n} (B_{ko}(T)V_{r_o}+G_{ko}(T)V_{m_o}) & ** \end{dcases}$$
where are * <condition 1> and **  <condition 2> respectively.

\lipsum[2-7]
\end{document}


• I didn't write the conditions as I thought I can just add them as \text{} after the equations.. Commented Mar 20, 2017 at 21:09
• I've deleted mine,:-) Commented Mar 20, 2017 at 21:19
• If I use David's code, may I know how to use \left{ \right} in under equation? The third brackets are not working under equation Commented Mar 20, 2017 at 21:29
• @user401393, condition are essential part of cases as typographic (concerned in this site) as well from math point of view. Because of them the environment cases is designed! See edit of the my answer. Commented Mar 21, 2017 at 5:58

How about dispensing with the dcases machinery entirely and using a simple array environment instead?

\documentclass[twocolumn]{IEEEtran}
\usepackage{array,amsmath}
\begin{document}
$$\label{eq19} \frac{\partial P_k}{\partial V_{r_o}} = \left\{\begin{array}{@{\,}>{\displaystyle}l@{}} 2V_{r_k}G_{kk}(T) + \sum^{n}_{i=1} \bigl(G_{ki}(T)V_{r_i}\\[2.75ex] \multicolumn{1}{r@{}}{{}-B_{ki}(T)V_{m_i}\bigr) \quad\text{for o=k}} \\[1ex] \sum_{o=1}^{n} \bigl(B_{ko}(T)V_{r_o}+G_{ko}(T)V_{m_o}\bigr) \quad\text{for o\neq k} \end{array}\right.$$
\end{document}

• can the two "for"s be aligned? Commented Mar 20, 2017 at 21:49
• @user401393 - I've updated the answer to align the two for statements.
– Mico
Commented Mar 20, 2017 at 22:15
• Thanks. So basically this cannot be fit in a single column? Maybe resizing the top equation? Commented Mar 20, 2017 at 23:09
• @user401393 -- I would strongly advise against shrinking the size of the top equation. It'll look kludgy and amateurish, and the material will be very hard to read. Do you want to go there?
– Mico
Commented Mar 21, 2017 at 0:09
• @user401393 - Realistically, the only whitespace to squeeze is what's around the +, -, and = symbols, and there just aren't enough of them to recover enough whitespace.
– Mico
Commented Mar 21, 2017 at 0:14