# Unable to use \systeme with math expressions

I want to use \systeme for a system of two equations but I find out that I cannot use math expressions such as ln{n}, n^2 etc.

\documentclass[11pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{systeme}

\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}

\begin{document}

\begin{equation*}
\systeme{
c_1 ln{n} =  \frac{5}{2},
x+y+z = \frac{5}{2},
x+y+z = 5
}
some text
\end{equation*}

\end{document}


I get this error:

! L'indice n'est pas un nombre entier !.
<argument> ...indice n'est pas un nombre entier !}


This is what I want to get:

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Mar 20 '20 at 18:24
• The first equation is not a linear equation in x, y, z. What are you trying to obtain? Mar 20 '20 at 18:47
• I edited the question, now you can see Mar 20 '20 at 19:28
• Why don't you use the cases environment, possibly with an aligned environment inside? Mar 20 '20 at 19:41

I agree with the comments that this may not be the right tool for the task. If you really need to use it, you need to make the "variables" "known" to systeme.

\documentclass[11pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{systeme}

\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}

\begin{document}
\begin{equation*}
\systeme[\ln n]{
\ln n=  \frac{5}{2},
x+y+z = \frac{5}{2},
x+y+z = 5
}
\text{some text}
\end{equation*}

\begin{equation*}
\systeme*[\ln n]{
\ln n=  \frac{5}{2},
x+y+z = \frac{5}{2},
x+y+z = 5
}
\text{some text}
\end{equation*}

\end{document}


An arguably somewhat more appropriate use of systeme could be

\documentclass[11pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{systeme}

\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}

\begin{document}
\begin{equation*}
\systeme{
w=  \frac{5}{2},
x+y+z = \frac{5}{2},
x+y+z = 5
}