I believe that
s = ArcTan[Sqrt[-4 E^(I a)]]
N[Limit[s, a -> 0]]
(* 4.71239 + 0.549306 I *)
is a bug in Limit
. Plotting the function s
Plot[Evaluate[ReIm[s]], {a, -1, 1}]

indicates that s
assumes the value above nowhere in the vicinity of a == 0
. (The same is true in the complex plane.) Furthermore,
Limit[s, a -> 0]
(* π + I ArcTanh[2] *)
which can be transformed to
TrigToExp[%] // Simplify
(* 1/2 (3 π + I Log[3]) *)
On the other hand,
Limit[TrigToExp[s], a -> 0]
(* 1/2 (π - I Log[3]) *)
The answers should be identical but are not.
This situation is similar to the problem with Limit
applied to ArcTan
that was identified by J. M. in his first comment to my answer to 116041.
expr = -I (Sqrt[-1 - E^(-2 I ε)] - ArcTan[Sqrt[-1 - E^(-2 I ε)]]) +
I (Sqrt [-1 - E^(2 I ε)] - ArcTan[Sqrt[-1 - E^(2 I ε)]])
Limit[expr, ε -> 0]
(* 2 Sqrt[2] - I Pi *)
Limit[expr // TrigToExp, ϵ-> 0] // FullSimplify
(* 2 (Sqrt[2] - ArcSinh[1]) *)
I recommend that this be reported to Wolfram, Inc as a bug.
Addendum
Mathematically, the arctangent of the square root of -4
is
n Pi + I ArcTanh[2]
or
n Pi - I ArcTanh[2]
where n
is an arbitrary integer. The problem exposed in the question is that Limit[s, a -> 0]
is not choosing the same branch symbolically that Plot
, N
, etc. choose numerically. This should not be.
4.71239 + 0.549306 I
for both pieces of code. So this is bug (bugs?) introduced after v8.0.4 and partly fixed in v10. $\endgroup$ – xzczd May 29 '16 at 14:20Series[ArcTan[Sqrt[-4 E^(I a)]], {a, 0, 0}] // Normal
in all the versions you have? $\endgroup$ – J. M.'s ennui♦ May 29 '16 at 14:26I ArcTanh[2] + π Floor[(π - 2 Arg[-2 I + 2 Sqrt[-E^(I a)]])/(4 π)] + π Floor[(π + 2 Arg[-2 I + 2 Sqrt[-E^(I a)]])/(4 π)]
, v10.4.1 (Wolfram Cloud) givesI ArcTanh[ 2] + π Floor[(π - 2 Arg[-2 I + 2])/(4 π)] + π Floor[(π + 2 Arg[-2 I + 2])/(4 π)]
(Though can't be proved bySimplify
, this seems to be the same result as that in v8 and v9.) $\endgroup$ – xzczd May 29 '16 at 14:36ArcTan
isn't a special function. $\endgroup$ – Artes Aug 15 '17 at 2:17ArcTan
does not fall in that category. Thanks, $\endgroup$ – bbgodfrey Aug 15 '17 at 2:21