# Averaging a function over solid angle

I am trying to average $$r$$ over the solid angle $$\Omega$$ in 3D. To start this I have expressed $$r$$ in terms of the angle $$a$$ and sides $$x$$ and $$d$$ in 2D with the help of the law of cosines: $$r = x*cos(a) + d \sqrt{(1-x^2/d^2 Sin^2(a))}$$ or $$r = \sqrt{x^2 + d^2 - 2xd* Cos(a)}$$. The next step that I tried to take was $$\frac{1}{2\pi} \int_0^{2\pi} r da *\frac{1}{\pi}\int_0^{\pi}sin(\phi)d\phi$$ to average over the solid angle $$d\Omega = sin(\phi)d{\theta}d\phi$$. This method gave me results in terms of elliptic integrals which is not what I was looking for. Is there a simpler (or completely different) method for doing averaging over the solid angle? Or should I reconsider my expressions for $$r$$? Thanks

• It is not clear what angle $\phi$ represents and why you are taking a space average for a planar figure. – Aretino Jan 13 at 19:26
• With $\phi$ I mean the zenith angle, also the figure is supposed to be 3D but I tried expressing $r$ in 2D – Smitty Jan 13 at 19:41
• Knowing the original 3D setting would help. You should also correct ${1\over\pi}$ to ${1\over2}$ in your integral formula, but the integral over $\phi$ could be simply discarded: you are averaging over angle $a$. – Aretino Jan 13 at 20:47
• In addition, your second formula for $r$ is wrong. – Aretino Jan 13 at 20:59
• Treating $a$ as an azimuthal angle cannot be correct, because $a$ can only vary between $0$ and $\pi$. Hence I suspect, even without knowing the setting in space, that you should simply regard $a$ as the zenith angle. – Aretino Jan 13 at 21:23