I'm working with a long equation in case environment, the problem is that the equation overlaps the equation number... any ideas on how to solve that problem.

I've thought on aligning it all to the left, tried flushleft but i can't manage it to work.

  \begin{numcases}{\phi(x) =}
       -\frac{e^{-\frac{x}{k}}T_0\Big(-ke^{\frac{L}{2k}}-e^{\frac{x}{k}}(k+x)+ke^{\frac{2x}{k}}+e^{\frac{L+2x}{2k}}(k-x)\Big)}{2\Big(1+e^{\frac{L}{2k}}\Big)GJ_t}\text{,} &  $x \in [0,\frac{L}{2}],$   \\
       \frac{e^{-\frac{L+2x}{2k}}T_0\Big(-ke^{\frac{3L}{2k}}+ke^{\frac{2x}{k}}+e^{\frac{L+2x}{2k}}(k+L-x)+e^{\frac{L+x}{k}}(-k+L-x)\Big)}{2\Big(1+e^{\frac{L}{2k}}\Big)GJ_t}\text{,} &  $x \in [\frac{L}{2},L].$

Here is one possibility.


    \begin{empheq}[left={\phi(x) =\empheqlbrace}]{align}
       &-\frac{e^{-\frac{x}{k}}T_0(A)}{2\Big(1+e^{\frac{L}{2k}}\Big)GJ_t}\text{,} &  x \in \biggl[0,\frac{L}{2}\biggr],   \\
       &\frac{e^{-\frac{L+2x}{2k}}T_0(B)}{2\Big(1+e^{\frac{L}{2k}}\Big)GJ_t}\text{,} &  x \in \biggl[\frac{L}{2},L\biggr].
A &= -ke^{\frac{L}{2k}}-e^{\frac{x}{k}}(k+x)+ke^{\frac{2x}{k}}+e^{\frac{L+2x}{2k}}(k-x) \\
B &=  -ke^{\frac{3L}{2k}}+ke^{\frac{2x}{k}}+e^{\frac{L+2x}{2k}}(k+L-x)+e^{\frac{L+x}{k}}(-k+L-x)

enter image description here

  • that is a possibility but i was trying to avoid that – Sebas Apr 15 '15 at 15:38
  • @Sebas Why to avoid. This is the best possibility, keeping your readers in mind. :-) – user11232 Apr 15 '15 at 15:40
  • because I've another similar system and i would have to add four more equations A, B, C and D – Sebas Apr 15 '15 at 15:46

There's no hope of having those long formulas in one line.

  1. The denominator is the same, so you can move it in front of \phi(x)
  2. The denominators can be split across two or three lines
  3. numcases should not be used




  &-e^{-\frac{x}{k}}T_0\Bigl(-ke^{\frac{L}{2k}}-e^{\frac{x}{k}}(k+x) \\
  &  x \in \biggl[0,\frac{L}{2}\biggr],   \\[2ex]
  &e^{-\frac{L+2x}{2k}}T_0\Bigl(-ke^{\frac{3L}{2k}} \\
  &\qquad+ke^{\frac{2x}{k}}+e^{\frac{L+2x}{2k}}(k+L-x) \\
  &  x \in \biggl[\frac{L}{2},L\biggr].


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.