# Why fraction (with power) in fraction doesn't work?

$$\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?

• (1)welcome, (2) as always on this site please post a full minimal example instead of sniplets. (3) count your }'s, the first argument for \frac is not properly closed, you only closed the e^ – daleif Feb 26 '18 at 6:02
• You showed only the final part of the error message, but not the initial part, which reported that "File ended while scanning use of \frac." That should be a pretty good tip-off as to where the problem occurs. – Mico Feb 26 '18 at 6:36
• Tbh, it is so hard to check all of these curly brackets. – Yuchen Zhang Feb 26 '18 at 6:57

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 $$ ... ?

\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}

• Thank you! I should have been careful to that. That link is helpful. I appreciate it. – Yuchen Zhang Feb 26 '18 at 6:55
• @YuchenZhang or if using amsmath try \begin{equation*} ... \end{equation*}, this makes it easy to change it to a numbered equation (remove the *'s) if needed. Some editors have a nice interface for changing environments. – daleif Feb 26 '18 at 8:12