
私はこれら 4 つの区分的に定義された関数を記述しようとしています。
私は次のコードを書きました:
\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}
そして、次のような結果が得られました:
これら 4 つの区分的に定義された関数をどのように分離できるでしょうか?
答え1
アンパサンドは 1 つだけ使用してください&
。
lshortの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
cases
Tommy L の回答に従ってを使用するほかに、次の方法もあります。
align
複数の連続した方程式があるため、環境を使用します。\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}