# Help with Seemingly Hopeless Double Integral

I hate to be that guy to just post an integration problem and ask how to solve it so I'll give a little relevant info

Okay, so I'm working on a physics project and my professor proposed that the following double integral could potentially solve a problem that I've used an alternative method to solve:

$$I=\int_0^\pi\int_0^\rho\frac{t^2\sin\phi\left(t\cos\phi-d\right)}{\left[t^2\sin^2\phi+\left(t\cos\phi-d\right)^2\right]^{3/2}}\;dt d\phi$$

1. $$\rho$$ is an arbitrary, strictly positive real constant
2. $$d$$ is a real constant that satisfies $$d>\rho$$

This integral's value could provide immense insight into fields of uniform, solid spherical objects, so it's actually pretty important for my work.

After some quick attempts to simplify, I decided to try some integral calculators with set values. Needless to say, the result after the first integral seemed so hopeless that I couldn't imagine simplifying and integrating again--not to mention then generalising constant inputs to their original variable form.

However, there is a strong likelihood that $$I$$ simplifies to one of the following two solutions:

$$\text{1.This solution comes from inverse square laws}$$

$$I=\frac{1}{d^2}$$

$$\text{2. This solution comes from a separate computation that I did (integrals below)}$$

$$I=\left(1-\frac{\rho^2}{5d^2}\right)\left[\frac{3}{2\rho^2}+\frac{3(\rho^2-d^2)}{4d\rho^3}\ln\left(\frac{d+\rho}{d-\rho}\right)\right]$$

Although it looks like these are vastly different answers, given $$\rho=1$$ and $$d=10$$, you get the following outputs from $$(1)$$ and $$(2)$$:

$$1.\; I=0.01$$ $$2.\; I\approx 0.01000046$$

Here's the ratio of solution (2) over (1) for $$\rho\in(0,1),\;d\in(0,50)$$

I tried to tackle this problem differently than my professor, and set up the following integrals to solve the problem that lead to solution $$(2)$$:

$$\frac{9}{4\rho^6}\left[\;\int\limits_{d-\rho}^{d+\rho}x\left[x-\frac{x^2+d^2-\rho^2}{2d}\right]\left[\frac{(x+d)^2-\rho^2}{4d\cdot x}\right]\;dx\right]\cdot\left[\;\int\limits_{d-\rho}^{d+\rho}\frac{\rho^2-(x-d)^2}{2d\cdot x}\;dx\right]$$

Where you come in

If the double integral is correctly composed (which my professor felt confident with), I need someone skilled in integration to solve said double integral. I've given two possible solutions and it's probable that the answer will be one of those. If it's solution $$(1)$$, I know that mine will have an error and you will essentially have proved the inverse square law for gravitational and electric fields. If it's solution $$(2)$$, then this will be far more exciting to me but less likely. If it's neither, then there are several possible implications

BOUNTY

I'm willing to award the following bounties for solving the double integral at the beginning. Since certain solutions have stronger implications (as explained above), I'm rewarding the following bounties:

1. +200 rep if you verify solution $$(1)$$
2. +500 rep if you verify solution $$(2)$$
3. +75 rep for any other solutions (note they'll have to be verified by a second user first)

QUESTIONS

• Edited: Typo in the original post – Lanier Freeman Mar 25 at 23:31
• So $\phi\in[0,\pi]$, and $t\in[0,\rho]$ for some ?fixed? constant $\rho$? (And the first solution seems to not depend on $\rho$. Unexpected, since i can take $\rho=0$.) Please fix some framework for all used constants. Things seem to be important, please just fix these details for the eye of a first reader... Help will come in some seconds... (At least numerically, this is the easiest (experimental) validation when explicit choices are given.) – dan_fulea Mar 25 at 23:48
• @LanierFreeman I'm not sure if this is too helpful, but I think the result must depend on rho. If you call the integral $I= I(\rho,d)$, then differentiate with rho, I got $I'= -2(\frac{\rho}{d})^{2}$, again, differentiated in rho. But this means that the original integral can't depend only on $d$, right? – Ryan Goulden Mar 26 at 1:03
• Yes this is the type of integration found in some older textbooks on electromagnetism; the aim would be to eventually calculate the magnetic moment of a "classical" spinning electron, say if its charge is uniformly distributed over a spherical volume of radius $d$. – James Arathoon Mar 26 at 1:17
• If it still matters, I also found the answer to be $\frac{-2\rho^3}{3d^2}$ by converting to rectangular. – Tom Himler Mar 26 at 1:24

As a mathematician, I would divide by force in the numerator and denominator by $$d^3$$, substitute $$t/d$$ by something, thus reducing to the case $$d=1$$. But here, let it be, we conserve the homogeneous setting as a control of the computations.

We split the numerator, compute first \begin{aligned} J_1 &= \int_0^\rho dt \int_0^\pi \frac {t^2\sin\phi\cdot t\cos\phi} {\left[t^2\sin^2\phi+\left(t\cos\phi-D\right)^2\right]^{3/2}}\; d\phi \\ &= \int_0^\rho dt \int_0^\pi \frac {t^2(-\cos\phi)'\cdot t\cos\phi} {\left[t^2-2Dt\cos\phi+D^2\right]^{3/2}}\; d\phi \\ &\qquad\text{ Substitution: }u=\cos \phi\ , \\ &= \int_0^\rho dt \int_{-1}^1 \frac {t^3\; u} {\left[t^2-2Dt\;u+D^2\right]^{3/2}}\; du \\ &\qquad\text{ Substitution (for u, fixed t) of the radical }v=\sqrt{t^2-2Dt\;u+D^2}\ , \\ &\qquad u=\frac 1{2Dt}(t^2+D^2-v^2)\ ,\ du=-\frac v{Dt}\; dv\\ , \\ &= - \int_0^\rho dt \int_{\sqrt{t^2+2Dt+D^2}}^{\sqrt{t^2-2Dt+D^2}} \frac {t^3\; \frac 1{2Dt}(t^2+D^2-v^2)} {v^3}\; \frac v{Dt}\; dv \\ &= \int_0^\rho t\;dt \int_{D-t}^{D+t} \frac 1{2D^2} \cdot \frac {t^2+D^2-v^2} {v^2}\; dv \\ &= \int_0^\rho t\;dt \;\frac 1{2D^2} \left[ -(t^2+D^2)\frac 1v -1 \right]_{v=D-t}^{v=D+t} \\ &= \int_0^\rho dt \;\frac t{2D^2} \left[ (t^2+D^2)\left(\frac 1{D-t}-\frac 1{D+t}\right) - 2t \right] \\ &= \int_0^\rho dt \left[ \frac D{D+t} +\frac D{D-t} -2\frac{D^2+t^2}{D^2} \right] \\ &= D\ln\frac {D+t}{D-t} - 2\rho\left(1+\frac {\rho^2}{3D^2}\right) \ . \end{aligned} Computer check for $$D=2$$, $$\rho=1$$ (pari/gp code):

? D=2; r=1;
? intnum(t=0,r, intnum(s=0, Pi, t^2*sin(s)*t*cos(s) / (t^2-2*t*D*cos(s)+D^2)^(3/2) ) )
%19 = 0.030557910669552716123823807178384744388
? D*log( (D+r)/(D-r) ) - 2*r*(1+r^2/3/D^2)
%20 = 0.030557910669552716123823807178384742634
?
? D=223; r=101;
? intnum(t=0,r, intnum(s=0, Pi, t^2*sin(s)*t*cos(s) / (t^2-2*t*D*cos(s)+D^2)^(3/2) ) )
%22 = 1.9969022076015148346071622544965636670
? D*log( (D+r)/(D-r) ) - 2*r*(1+r^2/3/D^2)
%23 = 1.9969022076015148346071622544965636629


The other integral. I will integrate here first w.r.t. $$t$$.

\begin{aligned} J_2 &= -D \int_0^\pi d\phi \int_0^\rho \frac {t^2} {\left[(t-D\cos\phi)^2+D\sin^2\phi\right]^{3/2}} \; dt \\ &\qquad\text{ and we consider separately (without the factor -D)} \\ J_2(\phi) &= \int_0^\rho \frac {t^2} {\left[(t-D\cos\phi)^2+D\sin^2\phi\right]^{3/2}} \; dt \\ &= \int_{0-D\cos\phi}^{\rho-D\cos\phi} \frac {(u+D\cos\phi)^2} {(u^2+a^2)^{3/2}} \; du\ ,\qquad a:= D\sin\phi \ . \\ &\qquad \text{ Now the integrals can be computed} \\ \int \frac{u^2} {(u^2+a^2)^{3/2}} \; dt &= -\frac t{(u^2+a^2)^{1/2}}+\operatorname{arcsinh} \frac ta+C\ , \\ \int \frac{u} {(u^2+a^2)^{3/2}} \; dt &= -\frac 1{(u^2+a^2)^{1/2}}+C\ , \\ \int \frac{1} {(u^2+a^2)^{3/2}} \; dt &= -\frac {a^2\;u}{(u^2+a^2)^{1/2}}+C\ , \end{aligned} and the computation goes on. If my calculus is ok, then \begin{aligned} J_2(\phi) &= \int_0^\pi d\phi\; \Bigg[ \operatorname{arcsinh} \frac{t-D\cos \phi}{D\sin\phi} \\&\qquad\qquad\qquad+ \frac{t-D\cos\phi}{(t^2-2Dt\cos\phi+D^2)^{1/2}\sin^2\phi} \\&\qquad\qquad\qquad\qquad\qquad\qquad +\frac2{(t^2-2Dt\cos\phi+D^2)^{1/2}} \Bigg]_0^\rho\ . \end{aligned} I have to submit, hope this is helpful to check with the own computations. I'll be back, but typing kills a lot of time.

• Sorry, been away. I've added a bounty of +100 to the question. Your answer is fantastic and I'll award one within a week. However, I'm leaving it up to attract other answers as well. Thanks for all the effort – Lanier Freeman Mar 27 at 23:32
• Shouldn't the integrand in $J_2$ be $t^2 \sin \phi/((t - D \cos \phi)^2 + D^2 \sin^2 \phi)^{3/2}$? – Maxim Mar 28 at 1:30

Hint:

With the change of variable $$u=\cos\phi$$, the integral on $$\phi$$ becomes

$$\int_{-1}^1\frac{t^2(tu-d)}{\sqrt{(u-dt)^2+d^2(1-t^2)}}du.$$

By decomposition of the numerator, you will get a term

$$c(t)\log((u-dt)^2+d^2(1-t^2))$$

and another

$$c'(t)\arctan\frac{u-dt}{d\sqrt{1-t^2}}.$$

These terms do not simplify at the bounds of the integration interval.

The integral on $$t$$ (cubic in $$t$$ at the denominator) is worse. I am not optimisitc about existence of a closed-form.

\begin{align*} &\iint \frac{t^2 \sin(\phi) (t \cos(\phi) - d)}{(t^2 \sin^2(\phi) + (t \cos(\phi) - d)^2)^{3/2}} \,\mathrm{d}t\,\mathrm{d}\phi \\ &= \frac{\sqrt{d^2 + t^2 - 2 d t \cos(\phi)}(d^2 - 2 t^2 - 2 d t \cos(\phi) - 3 d^2 \cos(2 \phi))}{6d^2} \\ &+ d \cos(\phi) \ln\left(t - d \cos(\phi) + \sqrt{d^2 + t^2 - 2 d t \cos(\phi)}\right) \sin^2(\phi) \text{,} \end{align*} as one can readily verify. Then $$I = \frac{-2 \rho^3}{3 d^2}$$.

I think for your case $$1$$, you mean $$I \propto \frac{1}{d^2}$$. The integral can't be positive because:

• $$t^2 \geq 0$$ and
• $$\sin(\phi) \geq 0$$ since $$\phi \in [0,\pi]$$, but
• $$t \cos(\phi) - d < 0$$ because $$0 < t < \rho < d$$, while
• the denominator is $$\geq 0$$, so
• the integrand is (zero or) negative everywhere.
• My prof said there may be a sign error so I’m not really bothered by that. Also the limit as $d\to\infty$ should lead to $1/d^2$ which I just realised and could inspire solutions and offer insight. I’ll get back within the coming days I have an exam to prepare for – Lanier Freeman Mar 28 at 19:24

I have to say, that the solution of I looks similar to (1), it is:

$$I=-\frac{2 \rho ^3}{3 d^2}$$

I integrate the integral for several values of $$\rho$$ and $$d$$ numerical and checked this result, it is correct.

For the calculation you only need the substitution of @Yves it is not that difficult! - with the help of Mathematica:

First you have to do the integration over t, the antiderivative is just:\,

$$\int \frac{t^{2}\text{Sin}[\phi ](t\text{Cos}[\phi ]-d)}{\left( t^{2}\ \text{ Sin}[\phi ]^{2}+(t\text{Cos}[\phi ]-d)^{2}\right) ^{3/2}}dt$$

$$=\frac{\left( 2\left( \rho ^{2}+3\varrho ^{2}\right) \text{Cos }[\phi ]+\varrho \left( -4\rho +\sqrt{\rho ^{2}+\varrho ^{2}-2\rho \varrho \text{Cos}[\phi ]}\,\text{Log}\left[ \rho -\varrho \text{Cos}[\phi ]+\sqrt{ \rho ^{2}+\varrho ^{2}-2\rho \varrho \text{Cos}[\phi ]}\right] +\text{Cos} [2\phi ]\left( -6\rho +3\sqrt{\rho ^{2}+\varrho ^{2}-2\rho \varrho \, \text{Cos} [\phi ]}\,\text{Log}\left[ \rho -\varrho \text{Cos}[\phi ]+\sqrt{\rho ^{2} +\varrho ^{2}-2\rho \varrho \text{Cos}[\phi ]}\right] \right) \right) \right) \,\text{Sin}[\phi ]}{2\sqrt{\rho ^{2}+\varrho ^{2}-2\rho \varrho \text{ Cos}[\phi ]}}$$

Second you do the substitution:

$$y=\text{Cos}[\phi ]$$ and the simplification:

$$\text{Cos}[2 \phi ]=\text{Cos}^{2}[\phi ]-\text{Sin}^{2}[\phi ]$$

$$I=\int_{1}^{-1}\left[ \frac{-t \varrho +6y^{2} t\varrho -y\left( t^{2}+3\ \varrho ^{2}\right) +\left( 1-3y^{2}\right) \varrho \,\sqrt{t^{2}-2 \,y \,t \varrho +\varrho ^{2}}\,\text{Log}\left[ t -y\,\varrho +\sqrt{ t^{2}-2\,y\, t\, \varrho \ +\varrho ^{2}}\right] }{\sqrt{t^{2}-2\,y\, t \varrho +\varrho ^{2}}}\right] _{0}^{\rho }dy$$