0

I don't know why this equation have the errors. Thanks if you can help me.

\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}
2
  • 3
    What m in array arguments is supposed to mean? If you change with c or l it compiles fine Commented Mar 1, 2019 at 22:22
  • 1
    As koleygr said. Also h_{k}-\lambda & if & k=1 \\ \\ you've got two \\s there which is probably not what you want? Commented Mar 1, 2019 at 22:24

1 Answer 1

5

The column type m is wrong. Besides you have a trailing \\ that doesn't belong there.

However, you should use 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}

Note that I removed the wrong \left and \right; I added \, in front of the differential symbol.

enter image description here

4
  • 3
    +1. Mathematical typographical detail question: Would you recommend to use an upright d in d\Theta in order to show, that it is an operator? Commented Mar 1, 2019 at 22:54
  • 2
    @Dr.ManuelKuehner That's a recurring question. I'd not use an upright d even under threat, because here it is not an operator. Other people are happy to follow a different convention. Commented Mar 1, 2019 at 22:57
  • Ok, thanks. I was interested in your point of view. Commented Mar 1, 2019 at 22:59
  • 1
    @Dr.ManuelKuehner You may find answers of mine where the dreaded upright d is used, but just to respect the questioner's preference. Let's hope, at least, that the Wolfram originated symbol is left where it belongs (the trashcan, I mean). Commented Mar 1, 2019 at 23:09

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.