Wolfram|Alpha tells me that $\int|\sin(x)| = -\cos(x)\text{sgn}(\sin(x))$ (which happens to also be its derivative), but I don't understand how this is possible, because the resulting function jumps back to $-1$ at every $\pi$, although the $|\sin(x)|$ never goes below $0$. Also, an integral should always be continuous, and this one isn't.
It seems like the integral is missing $2\lfloor\frac{x}{\pi}\rfloor +1$. Is Wolfram|Alpha wrong, or is there something I'm not aware of?
The indefinite integrals Wolfram Alpha gives aren't guaranteed to be valid over the entire line, just on some open set. In this case, it's chosen something that's valid over a single period. If you ask for a definite integral it should still give the correct answer, though.