How to find $x$-coordinate of all points where $f(x)=xe^{-x^2}$ has a horizontal tangent? As you can tell from the graph, the function has a horizontal tangent at $y=0$. But how can you tell at what $x$-coordinates?
 A: The line tangent to a function $f(x)$ is horizontal when the derivative, $f'(x)$ is equal to zero.
Thus, we need to find the derivative of $f(x)=xe^{-x^2}$
We proceed via the product and chain rules:
$$f'(x)=e^{-x^2}+xe^{-x^2}(-2x)=e^{-x^2}-2x^2e^{-x^2}$$
Setting this equal to zero, we find that

 $$f'(x)=e^{-x^2}-2x^2e^{-x^2}=e^{-x^2}(1-2x^2)=0$$ when $1-2x^2=0$. This occurs when $x=\pm \frac{1}{\sqrt{2}}$.

A: Hint: Form the derivative $f'$ and determine all values of $x$ satisfying $f'(x)=0$.
There are two such values.
A: Since $f(x)$ is a differentiable function, that happens for the stationary points of $f$. Since $f(x)$ is an odd function and $0$ is not a stationary point, it is enough to compute the stationary points belonging to $\mathbb{R}^+$. Over such a set $f(x)>0$, so the stationary points are the same for $g(x)=\log f(x) =  \log(x)-x^2$, whose derivative is $g'(x)=\frac{1}{x}-2x$, that vanishes only at $x=\frac{1}{\sqrt{2}}$. It follows that the answer is given by $x=\pm\frac{1}{\sqrt{2}}$.
