ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 21 Jun 2021 15:09:34 +0200Incorrect result for integral of (cos z) / zhttps://ask.sagemath.org/question/57637/incorrect-result-for-integral-of-cos-z-z/I am confused by the following result: I'd like to integrate `cos(z) / z` on a circle around the origin. I tried:
var('z,t')
f = (cos(z))/z
show(f)
gamma = e^(i * t)
dg = gamma.diff(t)
h = f(z=gamma) * dg
print(h)
show(h.integrate(t, 0, 2 * pi))
and I get:
I*cos(e^(I*t))
0
If I put the same integral into [WolframAlpha](https://www.wolframalpha.com/input/?i=integral+of+I*cos%28e%5E%28I*t%29%29+from+t+%3D+0+to+2+*+pi), I get the result I was expecting (`2 pi i`).
Is this a bug, or have I specified the problem incorrectly?
ripple_carryMon, 21 Jun 2021 15:09:34 +0200https://ask.sagemath.org/question/57637/