1
$$
\left. \begin{array}{c}
    \frac{NR}{K}=50\\
    0<R\leqslant 35\\
    NR\geqslant 65\\
    N>0\\
    K=24\\
    NR\geqslant \text{600 }\left( an\,\,initial\,\,guess \right)\\
\end{array} \right\} \Rightarrow \left\{ \begin{array}{c}
    K_{\min}=24\\
    N_{\min}=40\\
    R_{\max}=30\\
\end{array} \right. 
\\
\left. \begin{array}{c}
    R_U=\frac{NR}{I}\\
    R_D=\frac{NR}{J}\\
    K=I+J\\
\end{array} \right\} \Rightarrow \left\{ \begin{array}{c}
    I=K-K\alpha =24-24\cdot \frac{1}{4}=18\\
    J=K\alpha =24\cdot \frac{1}{4}=6\\
\end{array} \right. 
$$

I have tried to debug this code for a long time. The editor keeps telling me there is an error "Undefined control sequence". Can anyone help me out find where the problem is? Thanks.

Larry
  • 55
  • 4

1 Answers1

2

In LaTeX, you have to use packages to use some predefined commands, like \leqslant, \geqslant or \text. This is one of the main differences of LaTeX and MathJax. The first two commands require amssymb, while the last one needs amsmath. Btw, don't use $$ $$ like in MathJax.

\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\begin{document}
\[
\left. \begin{array}{c}
    \frac{NR}{K}=50\\
    0<R\leqslant 35\\
    NR\geqslant 65\\
    N>0\\
    K=24\\
    NR\geqslant \text{600 }\left( an\,\,initial\,\,guess \right)\\
\end{array} \right\} \Rightarrow \left\{ \begin{array}{c}
    K_{\min}=24\\
    N_{\min}=40\\
    R_{\max}=30\\
\end{array} \right. 
\\
\left. \begin{array}{c}
    R_U=\frac{NR}{I}\\
    R_D=\frac{NR}{J}\\
    K=I+J\\
\end{array} \right\} \Rightarrow \left\{ \begin{array}{c}
    I=K-K\alpha =24-24\cdot \frac{1}{4}=18\\
    J=K\alpha =24\cdot \frac{1}{4}=6\\
\end{array} \right. 
\]
\end{document}

enter image description here

However, why do you use array with \left and \right? The spacing is awful! Also, using either $$ or \[ \] won't let you have line breaks.

\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\left.\begin{aligned}
\tfrac{NR}{K}=50\\
0<R\leqslant 35\\
NR\geqslant 65\\
N>0\\
K=24\\
NR\geqslant600\text{ (an initial guess)}
\end{aligned}\right\}&\Rightarrow\begin{cases}
    R_U=\frac{NR}{I}\\
    R_D=\frac{NR}{J}\\
    K=I+J
\end{cases}\\
\left.\begin{aligned}
    R_U=\tfrac{NR}{I}\\
    R_D=\tfrac{NR}{J}\\
    K=I+J
\end{aligned}\right\}&\Rightarrow\begin{cases}
    I=K-K\alpha =24-24\cdot \frac{1}{4}=18\\
    J=K\alpha =24\cdot \frac{1}{4}=6
\end{cases}
\end{align*}
\end{document}

enter image description here