\begin{align*}
\ln(f(x)) \amp = \ln\left(x^2e^{-x^2}\right)\\
\ln(f(x)) \amp = 2\ln(x) - x^2\\
\ddx{\ln(f(x))} \amp = 2\ddx{\ln(x)} - \ddx{x^2} \\
\frac{f'(x)}{f(x)} \amp = \frac{2}{x} - 2x\\
f'(x) \amp = x^2e^{-x^2}\left(\frac{2}{x} - 2x\right)
\end{align*}
We can see that \(f'(x)=0\) when \(x^2\text{,}\) \(e^{-x^2}\text{,}\) and \(\left(\frac{2}{x} - 2x\right)\) are 0. Note that \(e^{-x^2}\) is only ever positive, and so is never 0. while \(x^2 = 0\) when \(x=0\text{.}\)
\begin{align*}
\frac{2}{x} - 2x \amp = 0\\
2-2x^2 \amp =0\\
2(1-x)(1+x) \amp = 0\\
x \amp = \pm 1
\end{align*}
Note that \(f'(-1)=0\text{,}\) \(f'(0) = 0\text{,}\) and \(f'(1) = 0\text{,}\) and so these are the \(x\)-values where \(f(x)\) has horizontal tangent lines.