Find the second distributional derivative of $|\sin(x)|$ I am trying to find the second distributional derivative of $f(x)=|\sin(x)|$, where $x$ defined in $\mathbb R$.
I have not got far but I started like this:
Let $\varphi$ be defined in $S(\mathbb R)$, then:
$$
\frac{d^2}{dx^2} f(\varphi) = \int_{\mathbb R} f(x) \frac{d^2}{dx^2} \varphi \, dx
$$
what to do next?
By the way, where can I find the syntax for doing all the symboles?
 A: My strategy for computing distributional derivatives is to compute symbolically/naively first, then confirm my answer using integration by parts.  So, symbolically, the first derivative of $f(x)$ should be (by the chain rule): 
$$
f^\prime(x)=\text{sgn}(\sin(x))\cos(x)
$$ Where $\text{sgn}(x)$ is the signum function, defined as: 
$$
\text{sgn}(x)=\left\{\begin{array}{cc}
-1 & x<0\\
0 & x=0\\
1 & x>0
\end{array}\right.
$$
Then, using the product rule, we get 
$$
f^{\prime\prime}(x)=\text{sgn}^\prime(\sin(x))\cos^2(x)-\sin(x)\text{sgn}(\sin(x))
$$ Recall that the derivative of the signum function is $\text{sgn}^\prime(x)=2\delta(x)$, so $\text{sgn}^\prime(\sin(x))\cos^2(x)=2\sum_{k\in\Bbb{Z}}2\delta(x-k\pi)$.  This is because when $\sin(x)=0$, $\cos^2(x)=1$.  Also note that $\sin(x)\text{sgn}(\sin(x))$ will be exactly $\vert \sin(x)\vert$, since $\text{sgn}(\sin(x))=-1$ when $\sin(x)<0$ and $\text{sgn}(\sin(x))=1$ when $\sin(x)>0$.   Hence we have 
$$
f^{\prime\prime}(x)=2\sum_{k\in\Bbb{Z}}\delta(x-k\pi)-\vert\sin(x)\vert
$$
From here, you should be able to verify this using integration by parts.  The goal is to show that for every $\varphi\in\mathcal{S}$, we have 
$$
\langle f^{\prime\prime},\varphi\rangle=\langle f,\varphi^{\prime\prime}\rangle
$$ where $\langle\cdot,\cdot\rangle$ is the inner product.
A: Let's apply the jump formula for derivation of distributions. $|\sin x|$ is continuous and piecewise $C^1$, we write
$$|\sin x|'=\begin{cases}\cos x,&x\in [2\pi k,\pi+2\pi k),\\-\cos x,&\text{otherwise}.\end{cases}$$
Clearly, this function is no longer continuous, but still piecewise $C^1$, so we will get $\delta$-functions in the second derivative. The jumps are all equal to $2$ and they occur in points of the form $\pi\mathbb Z$.
We can write it as 
$$|\sin x|''=g+2\sum_{k\in\pi\mathbb Z}\delta_k,$$
$$g(x)=\begin{cases}-\sin x,&x\in [2\pi k,\pi+2\pi k),\\\sin x,&\text{otherwise},\end{cases}=-|\sin x|,$$or
$$|\sin x|''=-|\sin x|+2\sum_{k\in\pi\mathbb Z}\delta_k.$$
