[Tex/LaTex] Left aligning and breaking equations in cases environment

aligncasesequations

I have a equation that needs to be left aligned within the cases environment. Here's my code so far, which does not work:

\documentclass{article}

\usepackage{amsmath}

\newcommand{\diff}{\mathop{}\!d}
\begin{document}

\begin{equation}\label{eq:algin} 
\begin{aligned}
\begin{cases}
u_i^{k+1}(x)=\arg \min_{u} \Bigg\{
{}& \lambda\sum_{i=1}^{N}\int_{\Omega} r_i(x)u_i(x)\diff x 
+ \frac{\gamma}{2} \sum_{i=1}^{N}\int_{\Omega} \left( u_i(x)-m(x) \right)^2\diff x 
+ \frac{\mu}{2}\int_{\Omega} \left( u_i(x)-m(x) \right)^2\diff x
\Bigg\},
\\
f'(x_{0})=0 \text{ : } z=f(x_{0}) \text{ is de horizontale raaklijn.}
\\
\lim_{x\to x_{0}} f'(x)=\pm\infty \text{ : } x=x_{0} \text{ is de verticale raaklijn.}
\\
g(x_{0}){R}_{0} \text{ : } z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})
  \text{ is de raaklijn.}
\end{cases}
\end{aligned}
\end{equation}

\end{document} 

My wrong output is:
enter image description here

I'm trying to get output like this:

enter image description here

This is my expected result

enter image description here

Thanks egreg. I found that when equation is so long (we cut it before), the equation number will automatically locate in bottom. Could we can relocate it in middle?
Code

\documentclass{article}

\usepackage{amsmath,mathtools}

\newcommand{\diff}{\mathop{}\!d}
\DeclareMathOperator*{\argmin}{arg\,min}

\begin{document}

\begin{equation}
\begin{dcases}
u_i^{k+1}(x)
\!\begin{multlined}[t]
=\frac{-\lambda r_i(x)+\gamma \bigl( r_i(x)+b_i(x)\bigr)+\gamma \bigl( \alpha-\beta\bigr)}{\theta}\\
 -\frac{\sigma \bigl( -\lambda\int_{i=1}^N r_i(x) \diff x + \sigma\sum_{i=1}^N \bigl( r_i(x)-b_i(x)\bigr) +\gamma N \bigl( 1-r_i(x)\bigr)\bigr)}{\gamma\bigl( \sigma N -1\bigr)},
\end{multlined}
\\[1ex]
f'(x_{0})=0 : z=f(x_{0}) \text{ is de horizontale raaklijn.}
\\[1ex]
\lim_{x\to x_{0}} f'(x)=\pm\infty : x=x_{0} \text{ is de verticale raaklijn.}
\\[1ex]
g(x_{0}){R}_{0} : z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})
  \text{ is de raaklijn.}
\end{dcases}
\end{equation}
This is text
\end{document}

enter image description here

Best Answer

I'd suggest using mathtools and its dcases and multlined environments.

I propose two solutions; the first avoids an ambiguity in your formulas, where the same index is used both as a bound and a free variable; the second one is similar to yours.

I removed the unnecessary \left and \right; changed \Bigg into \biggl and \biggr; changed \text{ : } into simple colons; defined \argmin.

\documentclass{article}

\usepackage{amsmath,mathtools}

\newcommand{\diff}{\mathop{}\!d}
\DeclareMathOperator*{\argmin}{arg\,min}

\begin{document}

\begin{equation}
\begin{dcases}
u_j^{k+1}(x)=
  \!\begin{multlined}[t]
  \argmin_{u}
  \biggl\{
  \frac{\mu}{2}\int\limits_{\Omega} (u_j(x)-m(x))^2\diff x \\
  +\sum_{i=1}^{N}\biggl(
     \lambda\int\limits_{\Omega} r_i(x)u_i(x)\diff x 
     + \frac{\gamma}{2}\int\limits_{\Omega} (u_i(x)-m(x))^2\diff x
   \biggr)
  \biggr\},
  \end{multlined}
\\[1ex]
f'(x_{0})=0 : z=f(x_{0}) \text{ is de horizontale raaklijn.}
\\[1ex]
\lim_{x\to x_{0}} f'(x)=\pm\infty : x=x_{0} \text{ is de verticale raaklijn.}
\\[1ex]
g(x_{0}){R}_{0} : z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})
  \text{ is de raaklijn.}
\end{dcases}
\end{equation}

\begin{equation}
\begin{dcases}
\!\begin{aligned}[t]
u_j^{k+1}(x)&=
  \argmin_{u}
  \biggl\{
  \lambda\sum_{i=1}^{N}\int_{\Omega} r_i(x)u_i(x)\diff x \\
  &\quad+ \frac{\gamma}{2} \sum_{i=1}^{N}\int_{\Omega} (u_i(x)-m(x))^2\diff x 
  + \frac{\mu}{2}\int_{\Omega} (u_i(x)-m(x))^2\diff x
  \biggr\},
  \end{aligned}
\\[1ex]
f'(x_{0})=0 : z=f(x_{0}) \text{ is de horizontale raaklijn.}
\\[1ex]
\lim_{x\to x_{0}} f'(x)=\pm\infty : x=x_{0} \text{ is de verticale raaklijn.}
\\[1ex]
g(x_{0}){R}_{0} : z-f(x_{0})=f'(x_{0})\cdot(x-x_{0})
  \text{ is de raaklijn.}
\end{dcases}
\end{equation}

\end{document} 

enter image description here