# Why does the exp(x) not work in Latex?

I am currently working on a paper and require an equation with e^x. I tried using the suggested layout of $\exp(x)$ but my output only shows an equation with exp(x) in the PDF output. Is there something that I am doing wrong is is there a specific package I need to use?

Any help would be appreciated.

• Welcome to TeX.SX! Your question is not very clear: does by any chance $e^{x}$ do what you want?
– GuM
Sep 5 '18 at 10:48
• Yes it does but I am confused why the alternative notation would not work since I have ensured that I did not make any mistakes in writing the $\exp(x)$ Sep 5 '18 at 10:54
• The alternative notation is just that: there is no “translation” of \exp(x) into e^{x}. There are cases where the former notation is preferable to the latter. Sep 5 '18 at 10:57
• The input \exp(x) is specifically meant to generate the word “exp” (in upright font), a left parenthesis, an “x” in math italic font, and a closing parenthesis. In LaTeX, to add a superscript to something you must use the ^ notation. I advise you not to try to write anything in LaTeX without having previously read an introductory guide (at least).
– GuM
Sep 5 '18 at 10:58
• As already mentioned, \exp is an alternative notation to e^{...} that users should know. Sadly not everyone does. Consider $\exp\biggl(\int_0^1 fdx\biggr) \qquad e^{\int_0^1 fdx}$ which of these are more redable? There are many examples of this where there are a short notation for simple input, and a companion notation for complicated input. Sep 5 '18 at 11:05

I think you may have misunderstood what you have been told.

\exp(x) is not an alternative to e^{x} in LaTeX, exp(x) is an alternative to ex in maths and physics etc.

The exp(x) notation is useful where x is some large or complicated expression, e.g.:

$\exp\biggl(\, \sum_{n=1}^{10} \frac{1}{n} \biggr)$


Which I certainly think is a big improvement over:

$e^{\sum_{n=1}^{10} \frac{1}{n}}$


The ex notation is useful where x is something nice and small, like, well:

$e^{x}$


So LaTeX supports both, \exp(x) for exp(x) and e^{x} for ex. \exp(x) is not a LaTeX shorthand (longhand?) for e^{x} = ex.

• A further improvement is adding \, between \biggl( and \sum: try and judge for yourself. Sep 5 '18 at 12:43
• @egreg I wanted to do that, but I didn't trust my own judgement, I'll make the change, thanks! Sep 5 '18 at 12:44
• I recommend \, also when a radical is followed by a parenthesis with a similar height, for instance (and in other cases). Sep 5 '18 at 12:46
• Good obs @egreg!! Do you know about automatic spacing? Why \, but \; no? Is subjective? Sep 5 '18 at 13:08
• @manooooh \; is too much; a thin space is usually the best. Sep 5 '18 at 13:59