[Tex/LaTex] Why fraction (with power) in fraction doesn’t work

fractions

$$\lim_{x\to 0^{+}} \frac{e^{-\frac{1}{x}}{x^{10}}$$

here is my code. It said,

Emergency stop.
<*> Worksheet2_main

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on ./Worksheet2_main.log.
***------------------------------------------------------------
*** Running bibtex on Worksheet2_main ...
***------------------------------------------------------------

So I tried to write the numerator by its own.

$$e^{-\frac{1}{x}$$

It just works. How could this happen?

Best Answer

The error message is issued because the numerator part of the fractional expression isn't terminated with a } (closing curly brace).

You should also contemplate inline-fraction notation, {-1/x}, for the exponent of e. The resulting expression will be both more compact and easier to read as the terms are typeset in script style rather than in scriptscript style.

Finally, note that using $$ to start and end display-math mode is deprecated in LaTeX; use \[ and \] instead. For more information on this subject, see Why is \[ ... \] preferable to $$ ... $$?

enter image description here

\documentclass{article} 
\begin{document}
\[
\lim_{x\to 0^{+}} \frac{e^{-\frac{1}{x}}}{x^{10}} =
\lim_{x\to 0^{+}} \frac{e^{-1/x}}{x^{10}}
\]
\end{document}
Related Question