Cases with long math equation

with \mfrac from nccmath and multlined from the mathtools package:

enter image description here

\usepackage{mathtools, nccmath}

%---------------- show page layout. don't use in a real document!


V_{ijk} = \begin{cases} 
  \mfrac{y_u+y_l}{2} - \mfrac{x_u+x_l}{2},  &\text{if }x_u < y_l    \\[3ex]
    \mfrac{1}{C} \bigg[\mfrac{x_u^3-y_l^3}{6}+\mfrac{y_l^2+x_u^2}{2}x_l
      + (x_u-y_l)\mfrac{x_l^2}{2}\\[-2ex]
      + \mfrac{y_u^2-x_u^2}{2}(x_u-x_l) - (y_u-x_u)\mfrac{x_u^2-x_l^2}{2} \biggr]
    & \text{if }x_u\in [y_l,y_u ]
    \mfrac{1}{x_u-x_l}\biggl[\mfrac{(y_u+y_l)^2}{6} - \mfrac{y_u+y_l}{2} x_l
    + \mfrac{x_l^2}{2}\biggr],& \text{otherwise}

I'm pretty sure it is a duplicate. But it is also easy to solve using aligned




  V_{ijk}& = \begin{cases} \dfrac{y_u+y_l}2 - \dfrac{x_u+x_l}2,&
    \text{if }x_u < y_l
      &\dfrac1C \bigg[\dfrac{x_u^3-y_l^3}{6}+\dfrac{y_l^2+x_u^2}{2}x_l
      + (x_u-y_l)\dfrac{x_l^2}{2}
      &+ \dfrac{y_u^2-x_u^2}{2}(x_u-x_l) -
      (y_u-x_u)\dfrac{x_u^2-x_l^2}{2} \bigg]
    & \text{if }x_u\in\left[y_l,y_u\right]
    \dfrac1{x_u-x_l}\bigg[\dfrac{(y_u+y_l)^2}6 - \dfrac{y_u+y_l}2 x_l
    + \dfrac{x_l^2}2\bigg],& \text{otherwise}

Here's a solution that employs a dcases* environment instead of the cases environment. The d in dcases denotes "display style"; this means, among other things, that one can write \frac instead of \dfrac in order to get "large" fraction terms.

enter image description here

Note that I've removed unnecessary \left and \right directives.

\usepackage{mathtools} % for 'dcases*' environment

V_{ijk} = 
\frac{y_u+y_l}{2} - \frac{x_u+x_l}{2}\,,
   &if $x_u < y_l$\\[1ex]
&\frac{1}{C} \biggl[
   + (x_u-y_l)\frac{x_l^2}{2}\\
&\quad + \frac{y_u^2-x_u^2}{2}(x_u-x_l) 
   - (y_u-x_u)\frac{x_u^2-x_l^2}{2} \,\biggr]\,,
   &if $x_u\in[y_l,y_u]$ \\[1ex]
\frac{1}{x_u-x_l} \biggl[ 
   - \frac{y_u+y_l}{2} x_l 
   + \frac{x_l^2}{2} \,\biggr]\,,
   & otherwise