Solve the equation $R^{2}\frac{\arccos(\frac{h}{R})+\frac{h}{R}}{2} = \pi r^{2}$ for $R$

88 Views Asked by At

I have the following equation and I want to solve for $R$.

$$R^{2} \left( \frac{\arccos \left(\frac{h}{R}\right) + \frac{h}{R}}{2} \right) = \pi r^{2}$$

1

There are 1 best solutions below

0
On BEST ANSWER

As said in comments, this is a transcendental equation and you cannot expect analytical solutions and then some numerical method would be required.

We can make the equation looking nicer using $R=\frac h x$ and $a=\frac{\pi r^2}{h^2} $which makes $$a x^2-x-\cos ^{-1}(x)=0$$ and the solution is the intersetion of $f(x)=x\cos ^{-1}(x)$ with $g(x)=ax^2$. There is only one solution to the equation provided $a \geq 1$ and, for sure, the solution is in $[0,1]$.

For sure, if $a$ is large (that is to say $x$ small), you could use Taylor expansion to get $$a x^2-x-\cos ^{-1}(x)=\frac{\pi }{2}-a x^2-\frac{x^3}{6}+O\left(x^5\right)$$ and ignoring the higher order terms solve either the quadratic equation giving as approximation $x=\sqrt{\frac \pi {2a}}$ or even the cubic equation (but this would not be very pleasant).

So, for $a\geq 1$, use Newton method with $x_0=\sqrt{\frac \pi {2a}}$ for finding the zero of $$f(x)=a x^2-x-\cos ^{-1}(x)$$ $$f'(x)=2 a x+\frac{1}{\sqrt{1-x^2}}-1$$ $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$

Trying for $a=2$, this would give the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 0.88622693 \\ 1 & 0.84308752 \\ 2 & 0.84055714 \\ 3 & 0.84055001 \end{array} \right)$$

We could have a better approximation of the guess building the $[2,k]$ Padé approximant of the function and solve the resulting quadratic. Using $k=2$, this would give as an estimate $$x_0=\frac{3 a \left( \sqrt{3\pi(96 a^3-\pi)}-\pi\right)}{72 a^3-\pi}$$ For $a=2$, this would give $0.856358$.

Another thing which could be done is to use series reversion and get $$x=t-\frac{t^4}{6 \pi }-\frac{3 t^6}{40 \pi }+\frac{5 t^7}{72 \pi ^2}-\frac{5 t^8}{112 \pi }+\frac{7 t^9}{80 \pi ^2}-\frac{\left(128+105 \pi ^2\right) t^{10}}{3456 \pi ^3}+\frac{2067 t^{11}}{22400 \pi ^2}-\frac{\left(704+189 \pi ^2\right) t^{12}}{8448 \pi ^3}+\frac{11 \left(98+407 \pi ^2\right) t^{13}}{48384 \pi ^4}+O\left(t^{14}\right)$$ where $t=\sqrt{\frac \pi {2a}}$ Applied again for $a=2$, this would give $0.841464$. Using this, I am sure that Newton method would converge in very few iterations.

In order to check the quality of the approximation, let us give $x$ a value; from $x$, compute $a=\frac{x+\cos ^{-1}(x) } {x^2}$ then $t=\sqrt{\frac \pi {2a}}$ and recompute $x$ according to the last expansion. Below are rproduced some values $$\left( \begin{array}{ccc} x_{\text{given}} & a & x_{\text{calculated}} \\ 0.05 & 628.310 & 0.0500000000 \\ 0.10 & 157.063 & 0.1000000000 \\ 0.15 & 69.7879 & 0.1500000000 \\ 0.20 & 39.2360 & 0.2000000000 \\ 0.25 & 25.0899 & 0.2500000000 \\ 0.30 & 17.4012 & 0.3000000004 \\ 0.35 & 12.7610 & 0.3500000031 \\ 0.40 & 9.74550 & 0.4000000194 \\ 0.45 & 7.67423 & 0.4500000998 \\ 0.50 & 6.18879 & 0.5000004337 \\ 0.55 & 5.08573 & 0.5500016534 \\ 0.60 & 4.24249 & 0.6000056758 \\ 0.65 & 3.58157 & 0.6500179206 \\ 0.70 & 3.05183 & 0.7000529960 \\ 0.75 & 2.61819 & 0.7501492859 \\ 0.80 & 2.25547 & 0.8004077547 \\ 0.85 & 1.94438 & 0.8511043677 \\ 0.90 & 1.66793 & 0.9030757253 \\ 0.95 & 1.40450 & 0.9596060077 \end{array} \right)$$

A problem remains when $a$ is close to $1$. For that case, we can perform the Taylor expansion around $x=1$ to get $$a=1+\sqrt{2} \sqrt{1-x}+(1-x)+O\left((x-1)^{3/2}\right)\implies x=1-a+\sqrt{2 a-1}$$

Edit

Since I suppose that you would like accurate results, you will be using Newton method.

Using a quick and dirty non linear regression $(R^2=0.999997)$, you could use for the wole range $$x_0=\left(\sqrt{\frac \pi {2a}} \right)-\frac{117}{1426}\left(\sqrt{\frac \pi {2a}} \right)^5$$