I have to find the first and the second distributional derivative of the function : $$f(x) = \begin{cases} \sin { (\pi|x|/2))} \quad & |x| <2 \\ 0 \quad & |x| \geq 2 \end{cases}$$ but I am not sure if I am doing it in the right way.
The first derivative should be
$$ g'(x) = \cos { (\pi|x|/2))}\operatorname{sgn}(x) \pi/2 $$
because $f(x)$ is a continuous function with no jumps in any point so the delta does not appear.
The second derivative should be :
$$ g''(x) = - \sin { (\pi|x|/2))}[\operatorname{ sgn}(x)]^2 (\pi/2)^2 + \delta _2 -\delta _{(-2)} $$
I have never seen a distribution with jumps in different points before, am I correct if I apply the delta in each of this points? Also I am not sure if the jump is $+1$ or $-1$.
The distributional derivative of a piecewise smooth function consists of two terms:
You correctly found that $f'$ has no singular part. However, note that the formula for $f'$ should also say that it's zero when $|x|>2$.
The function $f'$ is discontinuous at three points: $-2,0,2$.
So, the singular part of $f''$ is $$\frac{\pi}{2} (\delta_{-2} +2\delta_0 +\delta_2)$$ You found the continuous part of $f''$ correctly, but it can be simplified to $$- \sin { (\pi|x|/2))} (\pi/2)^2$$ And again, $f''(x)$ is zero when $|x|>2$.