12

I have a problem creating an exponential function in equation mode in Latex. I would like to have this exponential function: exponential^((y^2)/4). Does anyone know have to do that? David

4
  • Try $e^{y^2/4}$ Commented Jan 30, 2015 at 14:18
  • 1
    the first ^ has base l and exponent ( and the second ^ has base / and exponent 2 I would guess that is not what you intend, but I can not guess what function you did intend Commented Jan 30, 2015 at 14:18
  • When not in \begin{equation} mode $e^{y^2/4}$ works fine, but it does not work in \begin{equation} mode.
    – David
    Commented Jan 30, 2015 at 14:26
  • As you were told on the previous question $ is for starting math mode, so you should not use it if you are already in math mode in equation Commented Jan 30, 2015 at 15:27

2 Answers 2

16

In the equation environment, you shouldn't use the $ sign(*):

\begin{equation} e^{y^2/4} \end{equation}

or

\begin{equation} e^{\frac{1}{4} y^2} \end{equation}

should work.

(*) Except in such cases:

\begin{equation} x=0 \text{ if $x$ and $y$ are nice people} \end{equation}
5
  • 6
    the euler e should be upright, so \mathrm{e} or \exp(...)
    – MaxNoe
    Commented Jan 30, 2015 at 18:01
  • 1
    e is a constant, therefore it should be upright.
    – MaxNoe
    Commented Jan 30, 2015 at 19:40
  • 2
    @MaxNoe Upright e is a convention used in certain fields, but certainly not all. As pure mathematician I don't set it upright. Nor would I use \operatorname{e}, however I do use \exp(...) inline and on large expressions. Commented Jan 31, 2015 at 14:46
  • Thank you for your help. In my case, I think all the e-expressions you gave me works perfectly well. Thanks!
    – David
    Commented Feb 1, 2015 at 8:11
  • @MaxNoe why do you say so? All constants should be upright? For example, wikipedia does not use that convention for the exponential function page.
    – cserpell
    Commented May 26, 2022 at 0:53
1
\begin{equation}
e^{\frac{y^2}{4}}
\end{equation}
1
  • 2
    This is already covered in the existing answer.
    – egreg
    Commented Feb 20, 2018 at 15:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .