Integral of Absolute Value of $\sin(x)$ For the Integral: $\int |\sin (ax)|$, it is fairly simple to take the Laplace transform of the absolute value of sine, treating it as a periodic function.
$$\mathcal L(|\sin (ax)|) = \frac{\int_0^\frac{\pi} {a} e^{-st} \sin (ax)} {1 - e^{-\frac{ \pi s} {a}}} = \frac{a (1 + e^{-\frac{ \pi s} {a}})} {(a^2 +s^2)(1 - e^{-\frac{ \pi s} {a}})} $$
Then the integral of the absolute value would simply be $ 1/s $ times the Laplace transform.  Splitting into partial fractions we have:
$$\mathcal L(\int |\sin (ax)|) = \frac{a (1 + e^{-\frac{ \pi s} {a}})} {s(a^2 +s^2)(1 - e^{-\frac{ \pi s} {a}})} =  \frac{(1 + e^{-\frac{ \pi s} {a}})} {as(1 - e^{-\frac{ \pi s} {a}})} - \frac{s (1 + e^{-\frac{ \pi s} {a}})} {a(a^2 +s^2)(1 - e^{-\frac{ \pi s} {a}})}  $$
The first term is close to the floor function, when separated:
$$  \frac{(1 + e^{-\frac{ \pi s} {a}})} {as(1 - e^{-\frac{ \pi s} {a}})} = \frac{(1 - e^{-\frac{ \pi s} {a}}) + 2e^{-\frac{ \pi s} {a}}} {as(1 - e^{-\frac{ \pi s} {a}})} = \frac{1} {as} + \frac{2e^{-\frac{ \pi s} {a}}} {as(1 - e^{-\frac{ \pi s} {a}})}$$
This leads to $$ \frac{1} {a} + \frac {2\cdot\text{floor}(\frac{ax}{\pi})} {a}$$
Since the second term looks to be $ s/a^2 $ multiplied by the original function, this points to the derivative, or $$-1\cdot\text{sign}(\sin(ax))\cos (ax)/a$$, for a total integral is:
$$ \frac{1} {a} + \frac {2\cdot \text{floor}(\frac{ax}{\pi})} {a} -\text{sign}(\sin(ax))\cos(ax)/a$$
The Laplace transform method to evaluate an integral seems bulky - is there a better method than this?  And what is the cosine version?

Suppose $F(x)$ is an antiderivative of $|\sin(x)|$.
On the interval $[n\pi, (n+1)\pi]$, $|\sin(x)| = (-1)^n \sin(x)$, so we must have $F(x) = (-1)^{n+1}\cos(x) + c_n$ there, where $c_n$ is some constant.
Comparing the values at $n\pi$ from both sides, since $\cos(n\pi) = (-1)^n$,
we get
$ 1 + c_{n-1} = -1 + c_n$, i.e. $c_n = c_{n-1} + 2$.  Thus we could take
$c_n = 2 n$, i.e. since $n = \lfloor x/\pi \rfloor$, 
$$F(x) = 2 \lfloor x/\pi \rfloor - (-1)^{\lfloor x/\pi \rfloor} \cos(x)$$ 
