# Solid angle spanned by disc/rewriting expression with elliptic integrals

The solid angle spanned by a disc of unit radius, as observed from a point $(r,z)$ at a distance $z>0$ above a point in the disc plane with at distance $r>0$ to the center, can be expressed as $\Omega_1+\Omega_2$ where

$$\Omega_1 =2\pi\Theta[-(r+1)(r-1)] +\frac{2 z}{\sqrt{(r+1)^2 + z^2}}\frac{r-1}{r+1}\Pi\left[\alpha^2,k\right]$$

$$\Omega_2 = \frac{2z}{\sqrt{(r+1)^2 + z^2}} K(k).$$ Here $$\alpha^2 = n = \frac{(r+1)^2-(r-1)^2}{(r+1)^2}, k^2=m=\frac{(r+1)^2-(r-1)^2}{(r+1)^2+z^2},$$ and $K$ and $\Pi$ are complete elliptic integrals (see DLMF Sec. 19.2) and $\Theta$ is Heaviside's theta function. Note that Mathematica defines the elliptic integrals in terms of $n$ and $m$. The formula is adapted from S. Tryka, see (Rev. Sci. Instrum., 70, 3915 (1999)). The paper quotes a special case for $r=1$ which is not included in the expression above, but the expression does have the correct limiting value from both sides.

This all well and fine, except that both terms of $\Omega_1$ are discontinuous at $r=1$ -- which is incidentally the region of interest to me. Is there any way to reformulate the expression to avoid explicit discontinuities?

Update: I suddenly realize that in the formula I quote, I have already made some transformations of the elliptic integrals compared to Tryka's paper. I'll try to dig out my notes to document these.

Note added by J.M.: the formulae in Tryka's paper referred to above were derived in a previous paper of the author.

-
Note that the complete elliptic integral of the third kind is inherently discontinuous at $n=1$; using this, one can find that the limit as $r\to 1^+$ is equal to $\pi$. – J. M. Apr 18 '11 at 22:49
Thanks, JM for your comment as well as the clarification of the background. What I was really hoping for was a way of rewriting the expression without the canceling discontinuities in order to eventually get a nice expression for the gradient of the solid angle. – Janus May 3 '11 at 7:23
I might find time to look into this later, but could you clarify in the question body how you arrived from the formulae in the article to the ones in your post? The notation in the article is... rather elaborate. – J. M. May 3 '11 at 7:26
@JM Let's call it a physicists rewriting :). I quietly assume z>0 and do not take special care about the cases $r=0$ and $r=1$ since the function must obviously be continuous. I'll make this more precise in the question. – Janus May 3 '11 at 7:42
Re: update. Great! If all goes well, maybe I wouldn't have to transform anything in your formulae. In particular, could you include the original integral Tryka said he had that was equivalent to his elliptic integral expressions? – J. M. May 3 '11 at 7:57