Oh, by the way, you're in good company if you're having trouble
getting the branch cuts right.

Today I found the following interesting result in Mathematica:

N[Integrate[1/z, {z, 1, I, -1, -I, 1}]]
0. + 6.28319 I

N[Integrate[Cos[z]/z, {z, 1, I, -1, -I, 1}]]
0. + 6.28319 I

N[Integrate[Sin[z]/z^2, {z, 1, I, -1, -I, 1}]]
0. + 6.28319 I

N[Integrate[Exp[z]/z, {z, 1, I, -1, -I, 1}]]
1.66533*10^-16 + 0. I

Or more simply:

{NIntegrate[Exp[z]/z, {z, 1, I}], N[Integrate[Exp[z]/z, {z, 1, I}]]}
{-1.55771 + 2.51688 I, -1.55771 + 0.946083 I}

This is curious because even the naive computation Ei(I) - Ei(1) gives
the expected thing...

Fredrik

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to