Minimum of $\left| \sin x- 1\right| + \left|\sin x- 2\right| + \left| \sin x -3\right| + \left| \sin x+1\right|$ I would like to know the minimum value of $$\left| \sin x- 1\right| + \left|\sin x- 2\right| + \left| \sin x -3\right| + \left| \sin x+1\right|$$ 
for $x \in \mathbb{R}$.

As $x$ varies through $\mathbb R$, $\sin x$ varies through $[-1,1]$. The problem then reduces to finding the minimum of $f(y)=|y-1|+|y-2|+|y-3|+|y+1|$ for $y\in [-1,1]$.
But on $[-1,1]$, $f(y)=(1-y)+(2-y)+(3-y)+(y+1)=7-2y$, so the minimum value is $5$.
