次のコードがあります:
\begin{gather}
u(x,t) = 0 \ \mathrm{ si\ } x = 0, x = 1\\
\label{ex1bc}
\\
u(x,0) = \left\{
\begin{array}{ll}
2x, & \mathrm{si\ } 0 \le x \le 1/2 \\
2(1-x) & \mathrm{si\ } 1/2 \le x \le 1 \\
\end{array}
\right.
\label{ex1inicial}
\end{gather}
これにより、次のようになります。
空白の方程式 2.23 なしでそれを実現したいのですが、何が間違っているのでしょうか?
答え1
最初の式の後に不必要な余分な部分があります\\
。それを削除すると、余分な線は消えます。
2 番目の方程式では、cases
環境の使用を検討してください。たとえば、左側の中括弧が少し大きくなります。
\documentclass{article}
\usepackage{amsmath} % for 'cases' env. and `\text` macro
\numberwithin{equation}{section} % just for this example
\setcounter{section}{2} % just for this example
\setcounter{equation}{21}
\begin{document}
\begin{gather}
u(x,t) = 0 \text{ si } x = 0, x = 1 \label{ex1bc}\\
u(x,0) = \begin{cases}
2x & \text{si } 0 \le x \le 1/2 \\
2(1-x) & \text{si } 1/2 \le x \le 1 \\
\end{cases} \label{ex1inicial}
\end{gather}
\end{document}