[Tex/LaTex] Piecewise-defined functions

casesequationsmath-mode

I'm trying to write these four piecewise-defined functions.

enter image description here

I wrote this code:

\begin{equation}
 \theta = \begin{cases}
  \theta r + Se \left( \theta s - \theta r \right)  & Hp < 0 \\
  \theta s                                                        & Hp \geq 0
  \end{cases} \\
\end{equation}

\begin{equation}
 Se =  \begin{cases}
  \frac{1}{[1 + |\alpha Hp|^n]^m}  & Hp < 0 \\
  1                                               & Hp \geq 0
  \end{cases} \\
\end{equation}

\begin{equation}
 C_m = \begin{cases}
  \frac{\alpha m}{1 - m} \left( \theta s - \theta r \right) Se^{\frac{1}{m}} [1 - Se^{\frac{1}{m}} ]^m & Hp < 0 \\
  0                                                                                                                                                & Hp \geq 0
  \end{cases} \\
\end{equation}

\begin{equation}
 K_r = \begin{cases}
  Se^ l [1-[1- Se^{\frac{1}{m}}]^m] ^2 & Hp < 0 \\
  1                                                       & Hp \geq 0
  \end{cases}\\
\end{equation}

And I got this result:enter image description here

How is it possible to separate these four piecewise-defined functions?

Best Answer

Only use one ampersand, &.

See page 68 in lshort: https://tobi.oetiker.ch/lshort/lshort.pdf

Example:

\begin{equation*}
    |x| = \begin{cases}
              -x & \text{if } x < 0,\\
               0 & \text{if } x = 0,\\
               x & \text{if } x > 0.
          \end{cases}
\end{equation*}

Produces:

enter image description here