What is the derivative of $f(x):=x^2e^{-|x|}$, and why?
I simply don't understand how to differentiate such a function, let alone why the derivative when $x=0$ is $0$.
What is the derivative of $f(x):=x^2e^{-|x|}$, and why?
I simply don't understand how to differentiate such a function, let alone why the derivative when $x=0$ is $0$.
On $(0,\infty)$, we have $f(x)=x^2e^{-x}$ so $f$ is differentiable on this open interval and $f'(x)=2xe^{-x}-x^2e^{-x}=x(2-x)e^{-x}$.
Similarly, on $(-\infty,0)$, $f(x)=x^2e^{x}$ so $f$ is differentiable on this open interval and $f'(x)=2xe^{x}+x^2e^{x}=x(2+x)e^{x}$.
It remains to see if $f$ is differentiable at $0$. We have, for every $x\neq 0$
$$\frac{f(x)-f(0)}{x-0}=xe^{-|x|}$$
By continuity of $\exp$ and the absolute value, we get that $\lim_{x\to 0}\frac{f(x)-f(0)}{x-0}$ exists and is equal to $0e^0=0$. By definition, $f$ is differentiable at $0$ and $f'(0)=0$.
We can summarize this as $f'(x)=x(2-|x|)e^{-|x|}$ for every real number $x$. (Note that, as @TurlocTheRed explained in their answer, $f'$ is odd since $f$ is even).
Since $f(x)=x^2e^{-|x|}, f(x)$ is an even function.
If $f(x)$ is a differentiable function and $f(x)=f(-x)$, it's an even function and $f'(x)=-f'(-x)$ by the chain rule. So if an even function is differentiable for $x>0$, then its differentiable for $x<0$. Further, that derivative is an odd function. Odd functions reach $0$ at the origin if the functions is defined there.
$f'(x)=2xe^{-|x|}-\frac{|x|}{x}x^2e^{-|x|}, x\ne0.$ Approaches $0$ as $x\to 0$.
So we have some non rigorous evidence $f'(0)\to0$.
At $0$, you can use $\lim_{x \to 0} \frac{f(x)-f(0)}{x}$ as Taladris does elsewhere.
EDITI: Removed erroneous use of the Symmetric Derivative.