0

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
  }
  \quad
  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:

enter image description here

  • 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}. – Stefan Pinnow Mar 20 at 18:24
  • The first equation is not a linear equation in x, y, z. What are you trying to obtain? – Bernard Mar 20 at 18:47
  • I edited the question, now you can see – Valentin Mar 20 at 19:28
  • Why don't you use the cases environment, possibly with an aligned environment inside? – Bernard Mar 20 at 19:41
2

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
  }
  \quad
  \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
  }
  \quad
  \text{some text}
\end{equation*}

\end{document}

enter image description here

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
  }
  \quad
  \text{where}~w=\ln n
\end{equation*}
\end{document}

enter image description here

Needless to mention that the last two equations contradict each other.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.