# How did the author solve this integral?

I have the following spherical density distribution:

$$\rho(x, z) = \frac{1}{\sqrt{x^2 + z^2}\left(1+\sqrt{x^2+z^2}\right)^2}$$

which I have broken into a "line of sight" dimension $$z$$ and a "transverse" dimension $$x$$. I wish to integrate this profile along the line of sight to obtain the projected 2d-profile $$\Sigma(x)$$.

The published result is

(ignore the normalization prefactors)

I cannot figure out how this is obtained. For the indefinite integral, Wolfram gives

Trying to take the upper limit for the $$x>1$$ case via Mathematica gives

which does not simplify to the published result, as far as I can tell. Presumably there is a manual technique that Im unfamiliar with... anyone see a way to properly do this?

I should say, my end goal is to compute this integral for the general upper bound $$Z$$, but I wanted to first make sure I could at least reproduce the case for $$Z = \infty$$.

I observe in Mathematica (11.3)

Integrate[1/(Sqrt[x^2 + z^2] (1 + Sqrt[x^2 + z^2])^2), {z, 0, \[Infinity]}, Assumptions -> {x > 1}]


yields $$\frac{1}{x^2-1}-\frac{\sec ^{-1}(x)}{\left(x^2-1\right)^{3/2}} \text{,}$$

Integrate[1/(Sqrt[x^2 + z^2] (1 + Sqrt[x^2 + z^2])^2) /. x -> 1, {z, 0, \[Infinity]}]


yields $$\frac{1}{3} \text{,}$$ and

Integrate[1/(Sqrt[x^2 + z^2] (1 + Sqrt[x^2 + z^2])^2), {z, 0, \[Infinity]}, Assumptions -> {0 < x < 1}]


yields $$-\frac{2 \sqrt{1-x^2}+\log \left(\frac{1-\sqrt{1-x^2}}{\sqrt{1-x^2}+1}\right)}{2 \left(1-x^2\right)^{3/2}} \text{.}$$

I don't necessarily recognize the identities used to complete the identification with the published result, but I do see most of the parts of the published result, so the identity of the remainders may be possible.

Further, to your intention to compute $$\int_0^{\text{zz}} \dots \,\mathrm{d}z$$,

Assuming[{x > 1, zz \[Element] Reals, zz > 0}, FullSimplify[ Integrate[1/(Sqrt[x^2 + z^2] (1 + Sqrt[x^2 + z^2])^2), {z, 0, zz}] ] ]


yields (for $$x > 1$$) $$\frac{\text{zz} \left(\sqrt{x^2+\text{zz}^2}-1\right)}{\left(x^2-1\right) \left(x^2+\text{zz}^2-1\right)}+\frac{\tan ^{-1}\left(\frac{\text{zz}}{\sqrt{\left(x^2-1\right) \left(x^2+\text{zz}^2\right)}}\right)-\tan ^{-1}\left(\frac{\text{zz}}{\sqrt{x^2-1}}\right)}{\left(x^2-1\right)^{3/2}}$$

and I imagine the other two pieces are similar.

• This is fantastic, thanks so much. Ill hunt around for those identities. Your use of assumptions was superior to mine I suppose, I couldn't get Mathematica to do the definite integral earlier. How long did they take to run on your machine? The $0<x<1$ case runs for some time before ultimately returning the Integrate call back to me. And the general case $0<x<zz$ returns a much more complicated expression involving a Hypergeometric2F1. I do agree with your first two, though. Jul 11 '20 at 0:35
• On second thought, decided I didn't care about the identities, but I checked it numerically, and yep they're spot on the real answer, and the general form falls below the projection at $\infty$ in the way that I expect Jul 11 '20 at 0:52
• Just curious, what are your machine specs? I'd like to be able to get the general expression myself, but as I mentioned my mathematica gives something ugly for the identical input. Wondering if it is timing out as is effectively skipping some simplification it did in your case, and/or it is because of more than just a version discrepancy Jul 13 '20 at 12:44
• @Anonymous : This computation was performed on M'ma 11.3.0.0, running on Linux (x64) 4.15.0, running on an AMD Phenom II X6 1055T (2.8 GHz, 6 core, about 10 years old) and using not more than 218 MB RAM. Jul 13 '20 at 16:41