From: SourceForge.net <noreply@so...>  20100624 19:57:27

Bugs item #3020243, was opened at 20100623 11:53 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3020243&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Integration Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: defint(exp(cos(x))*cos(sin(x)),x,0,2*%pi) wrong result 0 Initial Comment: The correct result is 2*%pi. This is a new bug appearing in version 5.21.1. Previous versions (<= 5.20.1 ) return just the integral expression unevaluated, which is fair enough, but most importantly is not a wrong result. Maxima version: 5.21.1 Maxima build date: 8:13 4/26/2010 Host type: i686pcmingw32 also on linux system (fedora11) Lisp implementation type: GNU Common Lisp (GCL) also with cmucl Lisp implementation version: GCL 2.6.8 also with cmucl 19f  >Comment By: Raymond Toy (rtoy) Date: 20100624 15:57 Message: Expanding does produce a better answer. The derivative does equal the integrand. Plotting realpart(%o3 )shows a discontinuity near %pi. (Perhaps it's a bug, but plot2d(%o3,[x,0,%pi]) produces a warning that a nonnumeric value occurs somewhere. It seems as if it occurs everywhere except at 0.)  Comment By: Dieter Kaiser (crategus) Date: 20100624 14:42 Message: We get a more simple result when expanding the function gamma_incomplete: (%i3) integrate(exp(cos(x))*cos(sin(x)),x),gamma_expand:true; (%o3) (%i*expintegral_ei(%e^(%i*x))%i*expintegral_ei(%e^(%i*x)))/2 I think this result is correct, as a reference I have compared the result with wolfram alpha. But nevertheless, the definite integral is wrong and I am wondering why the conjugate function is introduced in the unsimplified result. Dieter Kaiser  Comment By: Raymond Toy (rtoy) Date: 20100624 14:18 Message: This particular integral is evaluated by computing the antiderivative. Perhaps in earlier versions, maxima could not, but maxima can now. So integrate(exp(cos(x))*cos(sin(x)),x) returns: (%i*conjugate(gamma_incomplete(0,%e^(%i*x))) %i*conjugate(gamma_incomplete(0,%e^(%i*x))) %i*gamma_incomplete(0,%e^(%i*x))+%i*gamma_incomplete(0,%e^(%i*x))) /4 Somehow this doesn't look right. Don't know if this is the correct antiderivative or not, but that's how maxima gets zero for the answer. At x=0, the result is zero, and by periodicity x=2*%pi is also zero. The wrong branch cut is taken, assuming the antiderivative is correct.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3020243&group_id=4933 