# [Tex/LaTex] Write case condition on two lines

equations

I have this equation: which must be inserted in a Office document. But it is too large, so I want to add a line return in the middle of the 2nd and 3rd condition such that the new line starts exactly at the same point as before (not in the left area of the "equation system").

s(g) =
\begin{cases}
q_i / n
& se \; \exists i:1 \leq i \leq k \enspace t.c. \enspace g \in [x_{i-1}, x_i] \\
q_1 / n - P \left(q_1/n, x_0 - g \right)
& se \; g \notin [x_{i-1}, x_i] \: \forall i: 1 \leq i \leq k \;\; e \;
\left( x_0 - g \right) \leq \left( g - x_k \right) \\
\left q_k / n  - P \left(q_k/n, g - x_k \right)
& se \; g \notin [x_{i-1}, x_i] \: \forall i: 1 \leq i \leq k \;\; e \;
\left( x_0 - g \right) > \left( g - x_k \right)
\end{cases}


Are you looking for something like this? I am not sure if "e" and "se" are words or math... if words, then \textrm{e} and \textrm{se} would make proper sense.

REVISED SOLUTION (if only left alignment is required)

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$s(g) = \begin{cases} q_i / n & se \; \exists i:1 \leq i \leq k \enspace t.c. \enspace g \in [x_{i-1}, x_i] \\ q_1 / n - P \left(q_1/n, x_0 - g \right) & se \; g \notin [x_{i-1}, x_i] \: \forall i: 1 \leq i \leq k \;\;\\ & e \; \left( x_0 - g \right) \leq \left( g - x_k \right) \\ q_k / n - P \left(q_k/n, g - x_k \right) & se \; g \notin [x_{i-1}, x_i] \: \forall i: 1 \leq i \leq k \;\; \\ & e \; \left( x_0 - g \right) > \left( g - x_k \right) \end{cases}$
\end{document} ORIGINAL SOLUTION

\documentclass{article}
\usepackage{amsmath,stackengine}
\stackMath
\begin{document}
\def\stackalignment{l} s(g) = \begin{cases} q_i / n & se \; \exists i:1 \leq i \leq k \enspace t.c. \enspace g \in [x_{i-1}, x_i] \\ q_1 / n - P \left(q_1/n, x_0 - g \right) & \stackunder{ se \; g \notin [x_{i-1}, x_i] \: \forall i: 1 \leq i \leq k \;\; }{ e \; \left( x_0 - g \right) \leq \left( g - x_k \right) } \\ q_k / n - P \left(q_k/n, g - x_k \right) & \stackunder{ se \; g \notin [x_{i-1}, x_i] \: \forall i: 1 \leq i \leq k \;\; }{ e \; \left( x_0 - g \right) > \left( g - x_k \right) } \end{cases}
\end{document} 