TITLE: Finding $\int\lfloor x\rfloor\cdot |\sin(\pi x)| dx$
QUESTION [5 upvotes]: Find $$\int\lfloor x\rfloor\cdot |\sin(\pi x)| dx$$

Any help would be appreciated.
The function is from $\mathbb{R}$ to $\mathbb{R}$, and so should be the result.
The best I got thus far is:
$$\int\lfloor x\rfloor\cdot |\sin(\pi x)| dx=\frac{k}{\pi}(-1)^{k+1}\cdot \cos(\pi x)+\frac{k^2}{\pi}+C, x\in [k,k+1), k\geq 0, k\in \mathbb{Z}$$
For $k<0$ it's similar, the problem is I am unable to prove this result.
EDIT: Solutions without using definite integration please, and also, I need to be able to prove that the solution is correct manually.

REPLY [4 votes]: In every unit interval $[k,k+1[$, the first factor is the constant $k$, while the second is a positive arch of sinusoid.
For $k=0$, we have
$$\int_0^x\sin(\pi x)\,dx=-\left.\frac{\cos(\pi x)}{\pi}\right|_0^x=\frac{1-\cos(\pi x)}{\pi},$$ which runs from $0$ to $\dfrac2\pi$. For the next intervals, the expression is the same with amplitude multiplied by $k$, and with an additional term $\dfrac{k(k-1)}{\pi}$ for continuity (triangular number).
Hence after simplification
$$\lfloor x\rfloor\frac{\lfloor x\rfloor-\cos(\pi\{x\})}{\pi}.$$