# Solve equation with $\arccos$ and sqrt

I have an equation to calculate $$A$$ from $$r$$ and $$h$$: $$A= \arccos\left(\frac{r-h}{r}\right)r^2 - (r-h)\sqrt{r^2-(r-h)^2}$$

But now $$A$$ and $$r$$ are known, and I want to solve for $$h$$ instead. So far, I solve this equation numerically, but I was wondering whether it can be solved analytically. All three $$A$$, $$r$$ and $$h$$ are positive. I have tried to solve it using Wolfram Alpha, but I only get a timeout. Any better ideas?

• Well, that's essentially Kepler's equation (en.wikipedia.org/wiki/…). >" I am sufficiently satisfied that it [Kepler's equation] cannot be solved a priori, on account of the different nature of the arc and the sine. But if I am mistaken, and any one shall point out the way to me, he will be in my eyes the great Apollonius." — Johannes Kepler
– user436658
Commented Jan 3, 2021 at 15:37
• Thanks, I came across this equation when reviewing code for calculating areas, the Wikipedia link has some helpful links, e.g. this one: winemantech.com/blog/… Commented Jan 4, 2021 at 9:43

Assume $$r>0$$ and let $$h=r(1-x)$$. This gives $$\cos ^{-1}(x)-x \sqrt{1-x^2}=\frac A {r^2}=\color{red}{k}$$ Use a series expansion around $$x=0$$ $$k=\frac \pi 2-2x+\sum_{n=1}^\infty \frac {|a_n|}{b_{n+1}}\,x^{2n+1}\tag 1$$ where the $$a_n$$ form sequence $$A091154$$ in $$OEIS$$ and the $$b_n$$ form sequence $$A143582$$.
$$x=-\frac 18 \sum_{n=1}^\infty \frac {c_n}{4^{n} (2 n-1)!}\,\left(k-\frac{\pi }{2}\right)^{2n-1}$$ where the $$c_n$$ form sequence $$A281181$$ in $$OEIS$$.
To give an idea of the accuracy of $$(1)$$, consider the truncated series $$S_p=\frac \pi 2-2x+\sum_{n=1}^p \frac {|a_n|}{b_{n+1}}\,x^{2n+1}$$ and the infinite norm $$\Phi_p=\int_{-1}^{+1} \Big(\cos ^{-1}(x)-x \sqrt{1-x^2} -S_p\Big)^2\,dx$$
$$\left( \begin{array}{cc} p & \Phi_p \\ 1 & 1.19707\times 10^{-3} \\ 2 & 1.85427\times 10^{-4} \\ 3 & 5.21327\times 10^{-5} \\ 4 & 1.99086\times 10^{-5} \\ 5 & 9.16556\times 10^{-6} \\ 6 & 4.78667\times 10^{-6} \\ 7 & 2.73743\times 10^{-6} \\ 8 & 1.67653\times 10^{-6} \\ 9 & 1.08327\times 10^{-6} \\ 10 & 7.30691\times 10^{-7} \\ \end{array} \right)$$