8

I am a beginner in Latex and I would like to know how I can write this system of equations

enter image description here

But I don't know how.

I have tried this code:

\documentclass{article}
\usepackage{mathtools}
\usepackage{nccmath}
\begin{equation}
\centering
\left\{\begin{split}
\mfrac{k_{i\omega}}{k_{p\omega}} &=2\pi \times 10 \\
|\mfrac{(k_{p\omega}s + k_{i\omega})}{s}.\mfrac{1}{(T s + 1)}| &= 1 \\ 
\end{split}\right.
 \end{equation}
 \end{document}

But I couldn't get the absolute value symbol as shown in the figure above and also I couldn't display the s=jw under the absolute value symbol and also the equations aren't aligned

9

A solution using the cases environment:

\documentclass[]{article}

\usepackage{amsmath}

\begin{document}
\begin{equation}
    \begin{cases}
      k_{i\omega}/k_{p\omega}=2\pi\times 10\\
      \left\lvert\frac{k_{p\omega}s+k_{i\omega}}{s}\cdot\frac{1}{Ts+1}\right\rvert_{S=\mathrm{j}\cdot2\pi}=1
    \end{cases}\,.
\end{equation}
\end{document}

enter image description here

  • 1
    Personally, I do not prefer using cases if there are no cases semantically speaking (WYSIWYM). – ivankokan Dec 12 '19 at 23:01
  • 1
    @ivankokan that's why I've added the cleaner array approach. – Skillmon likes topanswers.xyz Dec 12 '19 at 23:02
10

A solution using array (no packages needed):

\documentclass[]{article}

\begin{document}
\begin{equation}
  \left\{\begin{array}{@{}l@{}}
    k_{i\omega}/k_{p\omega}=2\pi\times 10\\
    \left|
      \frac{k_{p\omega}s+k_{i\omega}}{s}\cdot\frac{1}{Ts+1}
    \right|_{S=\mathrm{j}\cdot2\pi}=1
  \end{array}\right.\,.
\end{equation}
\end{document}

enter image description here

6

Here is a way to do it, with the dcases and spreadlines environments, from mathtools. The latter package lets you define additional vertical spacing between rows of a multiline equation, which is necessary here, due to the fractions in each line.

I added another solution with the empheq package.

Unrelated: preferably load nccmath before mathtools, as there might be problems with the \intertext command. Also, I defined an \abs command for the absolute value with the \DeclarePairedDelimiter command from mathtools to have the vertical lines adjusted to their contents.

\documentclass{article}
\usepackage{nccmath}
\usepackage{empheq} %% loads mathtools, which loads amsmath
\DeclarePairedDelimiter{\abs}\lvert\rvert

\begin{document}

\begin{spreadlines}{1ex}
\begin{equation}
\begin{dcases}
\mfrac{k_{i\omega}}{k_{p\omega}} =2\pi \times 10 \\
\abs*{\mfrac{(k_{p\omega}s + k_{i\omega})}{s}\cdot \mfrac{1}{(T s + 1)}}= 1
\end{dcases}
\end{equation}
\end{spreadlines}

\begin{empheq}[left=\empheqlbrace]{equation}
    \begin{aligned}
     & \mfrac{k_{i\omega}}{k_{p\omega}} =2\pi \times 10 \\
     & \abs*{\mfrac{(k_{p\omega}s + k_{i\omega})}{s}\cdot \mfrac{1}{(T s + 1)}}= 1
    \end{aligned}
\end{empheq}

\end{document} 

enter image description here

  • What is the purpose of \abs*{stuff} compared with \abs{stuff}? – pzorba75 Dec 13 '19 at 4:51
  • 1
    It adds a pair of implicit \left ... \right. Another solution would be, say, \abs[\bigg]{stuff}, which adds a pair of implicit \biggl ... \biggr. – Bernard Dec 13 '19 at 8:12
4
\documentclass{article}

\usepackage{amsmath}

\begin{document}
\begin{equation*}
  \left\{
    \begin{aligned}
      & k_{i\omega} / k_{p\omega} = 2\pi \times 10 \\
      & {\left|
        \frac{k_{p\omega}s + k_{i\omega}}{s} \cdot \frac{1}{Ts + 1}
      \right|}_{s = j \cdot 2\pi} = 1
    \end{aligned}
  \right.
\end{equation*}
\end{document}

enter image description here

  • 1
    In fact, I want the equations to aligned on the left not based on the equal operator? – littleesuf Dec 12 '19 at 22:56
  • 1
    I want the first equation to be on the left too – littleesuf Dec 12 '19 at 22:59
  • Edited. In general, use the & to specify the place of alignment. – ivankokan Dec 12 '19 at 23:13
0

I added my humble proposal using an array for my MWE. The output is very similar to the previous answers. The screenshot is:

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
$\left\{ \begin{array}{ll}
 k_{i\omega}/k_{p\omega}=2\pi\times 10 &\\
\Bigl|\frac{k_{p\omega}s + k_{i\omega}}{s}\cdot\frac{1}{Ts+1}
\Bigr|_{S=\mathrm{j}\cdot 2\pi}=1
\end{array} \right.$ 
\end{document}
-1

For fun:

This uses the amsmath package due to the use of \substack. This avoids any align, aligned, gather, array, ... environments but I had to pay the price of aligning manually.

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
$$\Large\left\{\substack{\hspace{-2.1cm}\,k_{i\omega}/k_{p\omega}\,=\,2\pi\,\times\, 10\vspace{0.2cm}\\\,\left|\frac{k_{p\omega}s\,+\,k_{i\omega}}{s}\,\cdot\,\frac{1}{Ts\,+\,1}\right|_{s\,=\,{\rm j}\,\cdot\,2\pi}\,=\,1}\right.$$
\end{document}

enter image description here

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.