a complex function appears in a real integration

• To: mathgroup at smc.vnet.net
• Subject: [mg33992] a complex function appears in a real integration
• From: "Shaofeng Bian" <sfbian at public2.zz.ha.cn>
• Date: Thu, 25 Apr 2002 03:00:31 -0400 (EDT)
• Organization: Department of Geodesy, ZISM
• Reply-to: "Shaofeng Bian" <sfbian at public2.zz.ha.cn>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

recently I involve into an integration of potential of mass body. The
integration is as below

Integrate[1/Sqrt[x^2+y^2+z^2],x]

As a result, it yields

ln[x+Sqrt[x^2+y^2+z^2]]

Then, I integrate it in the y-direction

Integrate[ln[x+Sqrt[x^2+y^2+z^2]]]

It is very strange that a complex function appears in a real
integration. First, I think that the Mathematica can not integrate this
integration and the result is wrong. After I check and simplify it,
however, the complex expression can converted into a real one as I want.

My problem is, "Can I believe a complex result always when I integrate a
real function". If it is true, I will be on a lucky position . I don't
need to integrate it by hand or simplify it to a real expression.

Hopefully, colleagues who have such experiences can give me some tips