Skip to main content
1 of 15
Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229

Here is a plan for any dimension $m$.

Without loss of generality, we have two open balls: $B_1=B_0(r_1)$ and $B_2=B_D(r_2)$, with $\|D\|=d$.

Take any unit vector $u$. Take any $x\in B_1$ such that $x\cdot u=0$. Then the condition that the line through $x$ in the direction of $u$ intersects $B_2$ is that $x\in B_D(R_u)$, where $R_u:=\sqrt{(D\cdot u)^2+r_2^2}$. So, $$\mathcal A(C,u)=L_{m-1}(B_0(r_1)\cap B_D(R_u)\cap H_u),$$ where $H_u:=\{x\colon x\cdot u=0\}$ and $L_{m-1}$ is the $(m-1)$-dimensional Lebesgue measure over the hyperplane $H_u$.

So, $\mathcal A(C,u)$ is the $(m-1)$-volume of the intersection of two balls, $B_0(r_1)\cap H_u$ and $B_D(R_u)\cap H_u$, in $H_u$. So, $\mathcal A(C,u)$ is an ordinary integral of the ($(m-2)$-dimensional) volumes of $(m-2)$-dimensional balls, which can probably be expressed in elementary functions and is probably known.

After that, it will remain to integrate $\mathcal A(C,u)$ over the $(m-1)$-dimensional unit sphere.

Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229