[Tex/LaTex] Putting a tag in aligned environment

amsmathequationsnumbering

I want to set a counter in the following two lines (to the right)

\[
\left\{
\begin{aligned}
& u_t = H(x,t,Du)&\text{ in }& \mathbb{R}^n\times (0,T)  \\\\
& u(x,0)=u_0(x) & \text{ in } &\mathbb{R}^n
\end{aligned}
\right.
\]

the problem is that I cannot add a counter in aligned environment and I cannot use an equation environment inside mathmode.

Best Answer

A small simplification of the code with the overload option of empheq, and a variant if you want to emulate the numcases environment. Also it's pointless to load amsmath as empheq loads mathtools which loads it:

\documentclass{article}
\usepackage{amssymb}
\usepackage[overload]{empheq}

\begin{document}

\begin{alignat}{2}[left=\empheqlbrace]
 & u_t = H(x,t,Du) & \quad&\text{in }\mathbb{R}^n × (0,T) \\[\medskipamount]
  & u(x,0)=u_0(x) & &\text{in } \mathbb{R}^n
\end{alignat}
\vskip 1cm

\begin{subequations}
\begin{alignat}{2}[left=\empheqlbrace]
 & u_t = H(x,t,Du) &\quad & \text{in }\mathbb{R}^n × (0,T) \\[\medskipamount]
 & u(x,0)=u_0(x) & & \text{in } \mathbb{R}^n
\end{alignat}
\end{subequations}
\end{document} 

enter image description here