Bug in Integrate?

• To: mathgroup at smc.vnet.net
• Subject: [mg28428] Bug in Integrate?
• From: Ignacio Rodriguez <ignacio at sgirmn.pluri.ucm.es>
• Date: Wed, 18 Apr 2001 03:23:31 -0400 (EDT)
• Organization: UCM
• Sender: owner-wri-mathgroup at wolfram.com

```    I am getting strange results when trying to perform an integral
using Integrate and I would like some advice about whether it is a bug
or I am making some mistake.
The version of Mathematica I am using is "Microsoft Windows 3.0
(April 25, 1997)".
The code used to calculate the integral is

a[x_,y_,z_]:=FullSimplify[Integrate[{Sin[t],-Cos[t],0}/Sqrt[z^2+(x-Cos[t])^2+(y-Sin[t])^2],{t,0,2
Pi}]]

Then, I try different values of a for different settings of x,y,z.

Trying a[0,0,z] gives {0,0,0}, a result which is clearly correct.

Trying a[x,0,z] or a[0,y,z] gives a result in terms of elliptic
integrals, a result which seems correct. Particular examples are

a[1/2,0,0]={0,2(EllipticE[-8]-5EllipticK[-8]),0} N[%]={0,-1.74631,0}

a[0,1/2,0]={-EllipticE[Pi/4,-8]-EllipticE[3Pi/4,-8]+5EllipticF[Pi/4,-8]+5EllipticF[3Pi/4,-8],0,0}
N[%]={1.74631,0,0}

Last of all, trying the general case gives the surprising result
a[x,y,z]={0,0,0}, a result which seems incorrect. Or at least, it seems
inconsistent with the previous results.
Any hint to explain what is happening here will be greatly
appreciated.

--

Ignacio Rodriguez Ramirez de Arellano
Paseo Juan XXIII, 1