spot the LaTeX mistake

It took me forever to spot the (obvious) mistake in the following LaTeX formula

[sourcecode gutter=”false”]

\int \exp\[ -\{ (n+\sigma^{-2})\mu^2 -2n\mu{\bar x_n} + n ({\bar x_n})^2 \}/2 \]

[/sourcecode]

Can you find it?!

18 Responses to “spot the LaTeX mistake”

  1. …. can’t ….

  2. \[ …. \] is simply an alias for $$ and $$ and thus can be used within an equation. \left[ … \right] must be used instead.

  3. indeed indeed \{ and \[ have different meanings!

  4. Tatiana X's avatar
    Tatiana X Says:

    On a second thought, \[ and \{ should swap and \[ be replaced with [. Same for \] and \}.
    ?
    Get well soon!

  5. Surely those brackets are going to open and close equation environments.

  6. aren’t the “\int” and “\exp\” terms supposed to be enclosed by the math brackets \[…\] ?

    un “coup de bon courage” pour ton pouce…

  7. Nicolas Chopin's avatar
    Nicolas Chopin Says:

    Is it \[ instead of either [ ?
    Also: {\bar x_n} might be correct, but is ambiguous: do you mean
    \bar{x}_n or \bar{x_n}?

Leave a Reply

Discover more from Xi'an's Og

Subscribe now to keep reading and get access to the full archive.

Continue reading