[Tex/LaTex] Main label in a system of equations

equationslabelsnumberingsubequations

I'm trying to create a system of equations with sub-numbering using the \begin{subnumcases} environment. Everything works perfectly but I would need to place a label somewhere in order to ref the system itself using the main number assigned to it, without having to ref one equation of it.

This is my code:

\documentclass{book}
\usepackage{cases}
\begin{document}
\begin{subnumcases}{}\label{eq:system}
    \frac{d\psi}{d\zeta} = \frac{m_1}{y_1\prime}(x_1-\beta y_1\prime) \label{eq:dpsidz}
    \\*
    \frac{dx_i}{d\zeta} = \frac{m_i}{\psi y_i\prime}(x_i-y_i\prime)(x_i-\beta y_i\prime) \qquad \forall i=1,...,C-1 \label{eq:dxdz}
    \\*
    0 = y_1\prime (x_j-\beta y_j\prime)-\alpha_{1j}y_j\prime(x_1-\beta y_1\prime) \qquad \forall j=2,...,C \label{eq:algeb1}
    \\*
    0 = \sum_{i=1}^{C}y_i\prime -1 \label{eq:algeb2}
    \\*
    \psi|_{\zeta=0} = 1
    \\*
    x_i|_{\zeta=0} = x_i^F \qquad \forall i=1,...,C
\end{subnumcases}\\
The system illustrated in \ref{eq:system} is a \textsc{dae} system with a differential index equal to 1.
\end{document}

As you can see, I've tried to place the label{eq:system} inside the environment, before the first equation, but when I ref it in text it appears the name of the first equation. If the system equations are labelled 1.1a, 1.1b etc., I would like to ref the system as 1.1.
I hope I was clear in explaining my issue. Thank you

Best Answer

You can use empheq together with amsmath and its subequations environment.

\documentclass{book}
\usepackage{amsmath,empheq}
\usepackage{hyperref}

\begin{document}

\begin{subequations}\label{eq:system}
\begin{empheq}[left=\empheqlbrace]{align}
  &\frac{d\psi}{d\zeta} = \frac{m_1}{y_1'}(x_1-\beta y_1') \label{eq:dpsidz}
  \\
  &\frac{dx_i}{d\zeta} = \frac{m_i}{\psi y_i'}(x_i-y_i')(x_i-\beta y_i')
    \qquad \forall i=1,\dots,C-1 \label{eq:dxdz}
  \\
  &0 = y_1' (x_j-\beta y_j')-\alpha_{1j}y_j'(x_1-\beta y_1')
    \qquad \forall j=2,\dots,C \label{eq:algeb1}
  \\
  &0 = \sum_{i=1}^{C}y_i' -1 \label{eq:algeb2}
  \\
  &\psi|_{\zeta=0} = 1
  \\
  &x_i|_{\zeta=0} = x_i^F \qquad \forall i=1,\dots,C
\end{empheq}
\end{subequations}
The system illustrated in \ref{eq:system} is a \textsc{dae} system 
with a differential index equal to~$1$.

\end{document}

With hyperref the anchor will be immediately above the system.

enter image description here

A couple of stylistic notes:

  1. instead of ... you should input \dots;
  2. instead of \prime you should use ^{\prime} or the easier ' (apostrophe) as in the code above.