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}$ 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 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
    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 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
    Jan 30, 2015 at 18:01
  • 1
    e is a constant, therefore it should be upright.
    – MaxNoe
    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. 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
    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
    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
    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 .