The title says it all, really - I am looking for
$$\int \arccos\left(\frac{\cos(x)}{r}\right) \, \mathrm{d}x$$
where $0<r<1$ and $x$ is in a domain where the integrand is real. It came up in a research problem involving billiard dynamics, but this is probably not relevant. I tried the usual techniques, Gradstein & Ryzhik and Mathematica without success. I am mostly seeking an exact answer, though it could involve obscure special functions.
Edit: Following Axoren, I am trying to expand the integrand in a series. Putting the following in mathematica
$Assumptions={r>0,r<1,x<Pi/2,x>ArcCos[r]};
a=Series[ArcCos[Cos[x]/r],{x,Pi/2,10}];
Integrate[a,x]
yields
$$\frac{1}{2} \pi \left(x-\frac{\pi }{2}\right)+\frac{\left(x-\frac{\pi }{2}\right)^2}{2 r}-\frac{\left(r^2-1\right) \left(x-\frac{\pi }{2}\right)^4}{24 r^3}+\frac{\left(r^4-10 r^2+9\right) \left(x-\frac{\pi }{2}\right)^6}{720 r^5}-\frac{\left(r^6-91 r^4+315 r^2-225\right) \left(x-\frac{\pi }{2}\right)^8}{40320 r^7}+\frac{\left(r^8-820 r^6+8694 r^4-18900 r^2+11025\right) \left(x-\frac{\pi }{2}\right)^{10}}{3628800 r^9}+O\left(\left(x-\frac{\pi }{2}\right)^{12}\right) $$
which gives me some hope of a closed form solution.
Edit 2: O.L.'s comment leads to the following exact solution, which checks numerically: $$ \int\chi(x)dx=\frac{1}{2}\left[{\rm Li}_2\left(\frac{e^{i(x+\chi(x))}}{r}\right) +{\rm Li}_2\left(\frac{e^{-i(x+\chi(x))}}{r}\right)+\pi(x+\chi(x))-\chi(x)^2 \right]+C$$ where $\chi(x)=\arccos(\cos(x)/r)$. (Thanks also for the comments at the other question regarding tags). Further remark: This expression involves the real part of the dilogarithm at complex argument. The mathematica pages state (without source or proof) a formula for the real part in terms of real arguments: See
http://functions.wolfram.com/ZetaFunctionsandPolylogarithms/PolyLog2/19/01/
I can give you a closed form for $|\cos(x)| \le r$. Since $r$ will always be less than $\frac \pi 2$, can just say the following:
$$ \int_{\arccos(-r)}^{\arccos(r)} \arccos \left(\frac{\cos(x)} r \right)\ dx $$
However, even that's not going to be pretty.
First, an identity:
$$ \arccos(x) = \frac \pi 2 - \sum_{n=0}^{\infty} \frac{\binom{2n}{n} x^{2n + 1}}{4^n (2n + 1)} \quad \mbox{for } |x| \le 1 $$
Now, we apply it to the integral.
$$ \int_{\arccos(-r)}^{\arccos(r)} \frac \pi 2 dx - \int_{\arccos(-r)}^{\arccos(r)}\sum_{n=0}^{\infty} \frac{\binom{2n}{n} \left(\frac{\cos(x)}{r}\right)^{2n + 1}}{4^n (2n + 1)}dx $$
$$ \int_{\arccos(-r)}^{\arccos(r)}\frac{\pi}{2} - \int_{\arccos(-r)}^{\arccos(r)}\sum_{n=0}^{\infty} \frac{\binom{2n}{n} \left(\frac{\cos(x)}{r}\right)^{2n + 1}}{4^n (2n + 1)} dx $$
$$ \int_{\arccos(-r)}^{\arccos(r)}\frac{\pi}{2} - \int_{\arccos(-r)}^{\arccos(r)}\sum_{n=0}^{\infty} \frac{\binom{2n}{n} \cos^{2n + 1}(x)}{4^n (2n + 1)r^{2n + 1}} dx $$
$$ \int_{\arccos(-r)}^{\arccos(r)}\frac{\pi}{2} - \sum_{n=0}^{\infty} \frac{\binom{2n}{n} \int_{\arccos(-r)}^{\arccos(r)}{\cos^{2n + 1}(x)\ dx}}{4^n (2n + 1)r^{2n + 1}} $$
Since at this point, $r$ is free, we can't simplify that inner integral expression until it's bound. So, all together, we have:
$$ \int_a^b \arccos \left(\frac{\cos(x)} r \right)\ dx = \left[\frac{\pi x}{2}\right]_a^b - \sum_{n=0}^{\infty} \frac{\binom{2n}{n} \int_{a}^{b} \cos^{2n + 1}(x)\ dx} {4^n (2n + 1)r^{2n + 1}} \quad \mbox{for } \arccos(-r) \le a \le b \le \arccos(r) $$
That's actually prettier than I expected it to be. However, it's not exactly what you're looking for, it's the closest I expect you to get. You can follow the same process so long as you can bound $x \in [\arccos(-r), \arccos(r)]$ when you use the result from it.