How to write this math term? with cases it isn't working

A combination of aligned and alignedat so all equals signs are aligned.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\pder}[2]{\frac{\partial #1}{\partial #2}}

\begin{document}

\[
\left.
\begin{aligned}
g_{ij}^l &= \pder{e}{w_{ij}^l} = \mathcal{A}(I_i^l)\delta_i^{l+1}
\\[2ex]
w_{ij}^l &= w_{ij}^l-rg_{ij}^l
\end{aligned}
\right\}
\qquad
\begin{alignedat}{2}
&\text{for} &\quad l &= 1,2,3,\dots, L,\\
&\text{for} &      i &= 0,1,2,\dots, N^{l+1},\\
&\text{for} &      j &= 1,2,3,\dots, N^{l+1}.
\end{alignedat}
\]
\end{document}

The bottom equality in the left part is suspicious, check it.

enter image description here


A combination of a drcases environment (provided by the mathtools package) and a plain tabular environment gets the job done:

enter image description here

\documentclass{article}
\usepackage{mathtools} % for 'drcases' environment
\begin{document}

\[
\begin{drcases}
g^l_{ij} = \frac{\partial e}{\partial w^l_{ij}} = \dots\\
w^l_{ij} = \dots
\end{drcases}
\qquad
\begin{tabular}{@{}l}
for $l=\dots$\\
for $i=\dots$\\
for $j=\dots$
\end{tabular}
\]
\end{document}

Similar to Mico's approach but with the equal sign aligned.

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}
   \left.\begin{aligned}
  g_{ij}^i &=\frac{\partial e}{\partial w_{ij}^I}=A(I_i)\delta^{\ell+1}_j\\
  w_{ij}^i &=w_{ij}^\ell-r\,g_{ij}^\ell\\  
  \end{aligned}\right\}\qquad
  \begin{array}{l}
  \text{for $\ell=1,2,3,\dots L$,}\\
  \text{for $i=0,1,2,\dots N^{\ell+1}$,}\\
  \text{for $j=1,2,3,\dots N^{\ell+1+2}$}
  \end{array}
\end{align*}
\end{document}

enter image description here

Tags:

Math Mode