조각별로 정의된 함수

조각별로 정의된 함수

나는 이 네 가지 조각으로 정의된 함수를 작성하려고 합니다.

여기에 이미지 설명을 입력하세요

나는 다음 코드를 작성했습니다.

\begin{equation}
 \theta = \begin{cases}
  \theta r + Se \left( \theta s - \theta r \right)  & Hp < 0 \\
  \theta s                                                        & Hp \geq 0
  \end{cases} \\
\end{equation}

\begin{equation}
 Se =  \begin{cases}
  \frac{1}{[1 + |\alpha Hp|^n]^m}  & Hp < 0 \\
  1                                               & Hp \geq 0
  \end{cases} \\
\end{equation}

\begin{equation}
 C_m = \begin{cases}
  \frac{\alpha m}{1 - m} \left( \theta s - \theta r \right) Se^{\frac{1}{m}} [1 - Se^{\frac{1}{m}} ]^m & Hp < 0 \\
  0                                                                                                                                                & Hp \geq 0
  \end{cases} \\
\end{equation}

\begin{equation}
 K_r = \begin{cases}
  Se^ l [1-[1- Se^{\frac{1}{m}}]^m] ^2 & Hp < 0 \\
  1                                                       & Hp \geq 0
  \end{cases}\\
\end{equation}

그리고 나는 이런 결과를 얻었습니다.여기에 이미지 설명을 입력하세요

조각별로 정의된 이 네 가지 함수를 어떻게 분리할 수 있나요?

답변1

앰퍼샌드 하나만 사용하세요 &.

짧게는 68페이지를 참조하세요.https://tobi.oetiker.ch/lshort/lshort.pdf

예:

\begin{equation*}
    |x| = \begin{cases}
              -x & \text{if } x < 0,\\
               0 & \text{if } x = 0,\\
               x & \text{if } x > 0.
          \end{cases}
\end{equation*}

생산물:

여기에 이미지 설명을 입력하세요

답변2

casesTommy L의 답변에 따라 사용하는 것 외에도 다음을 수행할 수도 있습니다.

  1. align여러 개의 연속 방정식이 있으므로 환경 을 사용하십시오 .
  2. a를 사용 \makebox하여 의 정렬을 얻습니다 conditions.

여기에 이미지 설명을 입력하세요

노트:

  • \MakeBox케이스 중 하나에 만 매크로를 적용하면 됩니다 .
  • 이 특별한 경우에는 차이가 없더라도 mathtools일부 수정 사항이 포함된 패키지를 사용했습니다 .amsmath

암호:

\documentclass{article}
\usepackage{mathtools}
\usepackage{calc}

\newcommand*{\WidestExpression}{\frac{\alpha m}{1 - m} \left( \theta s - \theta r \right) Se^{\frac{1}{m}} [1 - Se^{\frac{1}{m}} ]^m}
\newcommand*{\MakeBox}[1]{\makebox[\widthof{$\WidestExpression$}][l]{$#1$}}

\begin{document}
\begin{align*}
 \theta &= \begin{cases}
  \theta r + Se \left( \theta s - \theta r \right)  & Hp < 0 \\
   \MakeBox{\theta s}                               & Hp \geq 0
  \end{cases} \\
 Se &=  \begin{cases}
  \frac{1}{[1 + |\alpha Hp|^n]^m}                   & Hp < 0 \\
  \MakeBox{1}                                       & Hp \geq 0
  \end{cases} \\
 C_m &= \begin{cases}
  \WidestExpression                                 & Hp < 0 \\
  0                                                 & Hp \geq 0
  \end{cases} \\
 K_r &= \begin{cases}
  Se^ l [1-[1- Se^{\frac{1}{m}}]^m] ^2              & Hp < 0 \\
  \MakeBox{1}                                       & Hp \geq 0
  \end{cases}\\
\end{align*}
\end{document}

관련 정보