使用數學符號的陣列錯誤

使用數學符號的陣列錯誤

我不知道為什麼這個方程式有錯誤。如果你能幫助我,謝謝。

\documentclass{article}
\usepackage{array}
\usepackage{amssymb,amsthm,amsmath}
\begin{document}

\begin{equation*}
\left[h(t)-\lambda t\right]_k=h_{k}-\frac{\lambda}{2 \pi}\int_{0}^{2\pi}e^{i\theta(1-k)}d\theta= \left\{\begin{array}{lcm}
h_{k}-\lambda &   if  & k=1 \\
\\ h_{k}      &   if  & k \neq  1 \\
\end{array}  \right. \\
\end{equation*}

\end{document}

答案1

列類型m錯誤。此外,你還有一個\\不屬於那裡的尾隨。

但是,您應該使用cases.

\documentclass{article}
\usepackage{amssymb,amsthm,amsmath}

\begin{document}

\begin{equation*}
[h(t)-\lambda t]_k
= h_{k}-\frac{\lambda}{2 \pi}\int_{0}^{2\pi}e^{i\theta(1-k)}\,d\theta
= \begin{cases}
  h_{k}-\lambda & \text{if $k=1$} \\[2ex]
  h_{k}         & \text{if $k \neq  1$}
\end{cases}
\end{equation*}

\end{document}

請注意,我刪除了錯誤的\left\right;我\,在微分符號前面添加了。

在此輸入影像描述

相關內容