On 03/30/2013 07:30 PM, Rupert Swarbrick wrote:
> Jean-Claude Arbaut <arbautjc at gmail.com> writes:
>> I was playing with a problem on math.stackexchange.com, and I found this in
>> Maxima:
>>
>>> integrate(cos(1/3*exp(-%i*theta)),theta,0,2*%pi);
>>> 0
>>
>> WolframAlpha gives me 2*%pi, and it seems obvious that it can't be null
>> anyway. Any hint to have the computation done right with Maxima ?
>
> Er, cos is analytic, as is exp so you are integrating an analytic
> function around a closed loop (unless I've missed something
> obvious). Why are you so sure that this should give you a nonzero
> answer?
>
After glancing at a plot of both the real and imaginary parts from 0 to 2*%pi,
I think 2*%pi is a reasonable answer. And
(%i5) c(t) := cos(1/3*exp(-%i*t))$
(%i6) rectform(c(t));
(%o6) %i*sin(cos(t)/3)*sinh(sin(t)/3)+cos(cos(t)/3)*cosh(sin(t)/3)
(%i7) quad_qags(realpart(c(t)),t,0,2*%pi)[1];
(%o7) 6.283185307179586
Unfortunately I don't have the time to look into this much more at the moment.
> Rupert
>
Cheers,
Kris Katterjohn