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}
I'm trying to get output like this:
This is my expected result
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}
Best Answer
I'd suggest using
mathtools
and itsdcases
andmultlined
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
.