Derivatives of $|x|$ I wanted to calculate the first and second derivatives of the function $f(x)=|x|$, in order to verify that:
$$
f'(x)=\frac{|x|}{x}
$$
and
$$
f''(x)=2\delta(x).
$$
Can you help me?
 A: To do so, I used the family of functions $f_m(x)=\sqrt{x^2+m^2}$, which satisfies:
$$
\lim_{m\to 0} f_m(x)=f(x),
$$
uniformly in $x$, since the maximum distance between the succession and the limit function is $|m|$ itself (for $x=0$).
Then:
$$
\frac{\mathrm{d}}{\mathrm{d}x}f(x)= \frac{\mathrm{d}}{\mathrm{d}x}\lim_{m\to 0} f_m(x)  
=\lim_{m\to 0} \frac{\mathrm{d}}{\mathrm{d}x} f_m(x) 
=\lim_{m\to 0} \frac{x}{\sqrt{x^2+m^2}} =\frac{x}{|x|}.
$$
$$
\frac{\mathrm{d}}{\mathrm{d}x}f'(x)= \lim_{m\to 0} \left(\frac{1}{\sqrt{x^2+m^2}}-\frac{x^2}{(x^2+m^2)^{3/2}}\right)= \lim_{m\to 0} \frac{m^2}{(x^2+m^2)^{3/2}}.
$$
Now we have to look at:
$$
\lim_{m\to 0} \int\mathrm{d}x \frac{m^2}{(x^2+m^2)^{3/2}} \rho(x) = \lim_{m\to 0} \int\mathrm{d}y\ m \frac{m^2}{(m^2y^2+m^2)^{3/2}} \rho(my) = \rho(0)\int\frac{\mathrm{d}y}{(y^2+1)^{3/2}}=2\rho(0),
$$
where the last integral can be calculated with the substitution $\sqrt{y^2+m^2}=t-y$.
Which means
$$
\int\mathrm{d}x \frac{\mathrm{d^2}f(x)}{\mathrm{d^2}x}\rho(x) = 2\rho(0)
$$
$$
\frac{\mathrm{d^2}|x|}{\mathrm{d^2}x} =2\delta(x).
$$
A: The issue with this question is you haven't specified what kind of derivative you would like. However, the first one can be seen in a simpler way, as follows:
For $x$ non zero, the function is either $f(x) = x$, or $f(x) = -x$, for which the derivatives can be taken easily, either they're $+1$ for $x>0$ or $-1$ for $x<0$ (which agrees with the answer you've supplied), so the only bone of contention is at $x=0$, where the derivative you have provided doesn't exist, so we can leave it undefined as well.
To answer the question (rigorously) it is necessary to work in the space of distributions, however if you want a less rigorous answer, we have that the function $|x| / x = 2H(x) - 1$, where $H$ is the heaviside function (this is at every non zero $x$), so differentiating gives $2 \delta_0$
