From: SourceForge.net <noreply@so...>  20070627 16:50:53

Bugs item #1714044, was opened at 20070507 01:21 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1714044&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: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Robert Dodier (robert_dodier) Assigned to: Nobody/Anonymous (nobody) Summary: Maxima asks unnecessary questions in integration Initial Comment: Following example shows Maxima asking a lot of questions, although the result doesn't depend on the answers; I consider that a bug. This is from the mailing list 20070413, "integration asks to many questions". (%i1) p:(1+a*cos(kp*x1)+a*cos(kp*x2)+a*a*cos(kp*x1)*cos(kp*x2))*sin(kp*(x1x2)/4); (%i2) p2:p*(1+c*cos(kp*(x1+x2)/2)); (%i3) integrate(integrate(p2^2,x1,4*%pi/kp,4*%pi/kp),x2,5*%pi/kp/2,7*% pi/kp/2); Is kp positive or negative? p; Is a zero or nonzero? n; Is a c positive, negative, or zero? n; Is c zero or nonzero? n; Is a positive or negative? n; Is c positive or negative? p; Is cos(kp x2) positive, negative, or zero? p; Is kp positive or negative? p; <result here>  >Comment By: Raymond Toy (rtoy) Date: 20070627 12:50 Message: Logged In: YES user_id=28849 Originator: NO A slightly different version of easysubs has been checked in. Problem 209 in rtest15 passes. Closing this report.  Comment By: Raymond Toy (rtoy) Date: 20070613 17:26 Message: Logged In: YES user_id=28849 Originator: NO Oops. There is one difference. Problem 209 in rtest15 returns 2/3/sqrt(2) instead of sqrt(2)/3. But these are equivalent.  Comment By: Raymond Toy (rtoy) Date: 20070613 17:11 Message: Logged In: YES user_id=28849 Originator: NO Here is a replacement for easysubs. If the antiderivative doesn't involve the inverse of a trig function, or hyperbolic function or isn't a log, we can substitute in the limits directly (if they're finite). If the limit succeeds, we are done. This change gets rid of all the questions and doesn't introduce any additional issues in the testsuite. The change is the new line containing involve. (defun easysubs (e ll ul) (cond ((or (infinityp ll) (infinityp ul)) ()) (t (cond ((or (polyinx e var ()) (not (involve e '(%log %asin %acos %atan %asinh %acosh %atanh)))) (let ((llval (noerrsub ll e)) (ulval (noerrsub ul e))) (cond ((and llval ulval) (m ulval llval)) (t ())))) (t ())))))  Comment By: Raymond Toy (rtoy) Date: 20070613 15:01 Message: Logged In: YES user_id=28849 Originator: NO FWIW, the maxima is computing this integral via methodradicalpoly. It can find the antiderivative and is now carefully substituting the limits in via intsubs. Since the antiderivative only involves trig functions (no inverses), there shouldn't be a problem just substituting in the limits. Perhaps easysubs needs to be extended to handle this case?  Comment By: Nobody/Anonymous (nobody) Date: 20070612 23:18 Message: Logged In: NO I had the same silly question when integrating exp(ïky)*hermite(n,x)*x^j  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1714044&group_id=4933 