# What does this function mean?

$$f(x) = \frac{x}{e^{x^2}}$$ Differentiate $f(x)$.

How should the above function be interpreted? Is the function equivalent to:

a)$$f(x) = \frac{x}{e^{x^2}} = \frac{x}{{(e^x)^2}} = \frac{x}{e^{2x}}$$

or

b) $$f(x) = \frac{x}{e^{x^2}} = \frac{x}{{e^{(x^2)}}} ≠ \frac{x}{e^{2x}}$$

Thanks!

-
It is interpreted as (b). – LASV Dec 13 '13 at 5:09
@dfg:Maybe helps to use some small, simple values like $x=1$. – DBFdalwayse Dec 13 '13 at 5:16

$a^{b^c}$ should be interpreted as $a^{(b^c)}$. Because, as you point out, $(a^b)^c = a^{bc}$. This is even true in most programming languages, which specify that a^b^c should be evaluated from right to left, unlike expressions like a-b+c, which should be evaluated from left to right.

-
Out of curiosity, what programming languages use ^ for exponentiation? – Alex Becker Dec 13 '13 at 5:14
BASIC, MATLAB, and Mathematica are examples. – Stephen Montgomery-Smith Dec 13 '13 at 5:16
Ah. I use those so infrequently I sometimes forget there are languages where it isn't bitwise XOR. – Alex Becker Dec 13 '13 at 5:27
But I just tried out 2^3^4 in OCTAVE, which is meant to emulate MATLAB, and it did the computation left to right. But Mathematica did it right to left. I am pretty sure that BASIC does it right to left, because I remember reading about it in a BASIC manual, and wondering why. – Stephen Montgomery-Smith Dec 13 '13 at 5:27
FORTRAN uses **. It does it right to left: folk.uio.no/hpl/scripting/doc/f77/tutorial/expres.html – Stephen Montgomery-Smith Dec 13 '13 at 5:28

The expression

$f(x) = x / e^{x^2} \tag{1}$

should be interpreted in the same way we would interpret $x / exp(x^2)$;that is,

$f(x) = x e^{-x^2} = x \exp (-x^2). \tag{2}$

The tip-off here is that the exponent $2$ of $x$ in the expression $x^2$ is in fact written as a superscript of $x$; in item (a) of the question, $(e^x)^2 = (e^x)(e^x) = e^{2x}$; but $e^{x^2}$ should be thought of as $e^{xx} = (e^x)^x$; as Stephen Montgomery points out in his answer, the evaluation of the exponents is right to left.

Having hopefully clarified the issue, we have

$f'(x) = (x e^{-x^2})' = e^{-x^2} + x e^{-x^2} (-2x) \tag{3}$

using the Leibniz product rule and the formula $d / dx (e^u) = e^u (du / dx)$. After the simple algebra,

$f'(x) = e^{-x^2}(1 - 2x^2). \tag{4}$

Hope this helps. Cheerio,

and as always,

Fiat Lux!!!

-