## maxima-bugs

 [Maxima-bugs] [ maxima-Bugs-3525906 ] bug in integrate(x*exp(-a*x^2+b*x), x, X_0, inf) From: SourceForge.net - 2012-05-11 17:25:32 ```Bugs item #3525906, was opened at 2012-05-11 10:25 Message generated for change (Tracker Item Submitted) made by ognelis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: ivan antonovich (ognelis) Assigned to: Nobody/Anonymous (nobody) Summary: bug in integrate(x*exp(-a*x^2+b*x),x,X_0,inf) Initial Comment: Maxima 5.27.0 http://maxima.sourceforge.net using Lisp CLISP 2.48 (2009-07-28) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d: false; (%o1) false (%i2) assume(a>0); (%o2) [a > 0] (%i3) expr: exp(-a*x^2+b*x)*x; (%o3) x*%e^(b*x-a*x^2) (%i4) res1:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's do the integration once again: #============================================ (%i5) res1new:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's see the results #============================================ #++++++++first++++++++++++ (%i6) factor(ratsimp(res1)); (%o6) %e^(b^2/(4*a))*(2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a*abs(2*a*X_0-b) +2*gamma_incomplete(1/2, (4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a^(3/2)*b*X_0 -gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *sqrt(a)*b^2) /(4*a^2*abs(2*a*X_0-b)) #++++++++second++++++++++++ (%i7) factor(ratsimp(res1new)); (%o7) (gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)*b +2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*a) *%e^(b^2/(4*a)) /(4*a^2) #============================================ #The results are different!!! #============================================ #============================================ #Let's continue:(now 2 a X_0 -b is negative) #============================================ (%i8) res2:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? negative; (%i9) factor(ratsimp(res2)); (%o9) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*b -2*sqrt(%pi)*b -2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)) *%e^(b^2/(4*a)) /(4*a^(3/2)) #============================================ #Let'see the difference between expressions with positive and negative 2 a X_0 -b #============================================ (%i10) factor(ratsimp(res2-res1new)); (%o10) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))-sqrt(%pi)) *b*%e^(b^2/(4*a)) /(2*a^(3/2)) #============================================ #But the results must be the same. #============================================ P.S. integrate(x^n*exp(-a*x^2+b*x),x,X_0,inf) can be programmed as diff(integrate(exp(-a*x^2+b*x),x,X_0,inf),b,n). To verify this one needs to change the order of integration and differentiation. The result can be obtained in terms of the error function. There is only one conditition -- a>0. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3525906 ] bug in integrate(x*exp(-a*x^2+b*x), x, X_0, inf) From: SourceForge.net - 2012-05-11 17:27:03 ```Bugs item #3525906, was opened at 2012-05-11 10:25 Message generated for change (Settings changed) made by ognelis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&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: ivan antonovich (ognelis) Assigned to: Nobody/Anonymous (nobody) Summary: bug in integrate(x*exp(-a*x^2+b*x),x,X_0,inf) Initial Comment: Maxima 5.27.0 http://maxima.sourceforge.net using Lisp CLISP 2.48 (2009-07-28) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d: false; (%o1) false (%i2) assume(a>0); (%o2) [a > 0] (%i3) expr: exp(-a*x^2+b*x)*x; (%o3) x*%e^(b*x-a*x^2) (%i4) res1:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's do the integration once again: #============================================ (%i5) res1new:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's see the results #============================================ #++++++++first++++++++++++ (%i6) factor(ratsimp(res1)); (%o6) %e^(b^2/(4*a))*(2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a*abs(2*a*X_0-b) +2*gamma_incomplete(1/2, (4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a^(3/2)*b*X_0 -gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *sqrt(a)*b^2) /(4*a^2*abs(2*a*X_0-b)) #++++++++second++++++++++++ (%i7) factor(ratsimp(res1new)); (%o7) (gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)*b +2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*a) *%e^(b^2/(4*a)) /(4*a^2) #============================================ #The results are different!!! #============================================ #============================================ #Let's continue:(now 2 a X_0 -b is negative) #============================================ (%i8) res2:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? negative; (%i9) factor(ratsimp(res2)); (%o9) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*b -2*sqrt(%pi)*b -2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)) *%e^(b^2/(4*a)) /(4*a^(3/2)) #============================================ #Let'see the difference between expressions with positive and negative 2 a X_0 -b #============================================ (%i10) factor(ratsimp(res2-res1new)); (%o10) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))-sqrt(%pi)) *b*%e^(b^2/(4*a)) /(2*a^(3/2)) #============================================ #But the results must be the same. #============================================ P.S. integrate(x^n*exp(-a*x^2+b*x),x,X_0,inf) can be programmed as diff(integrate(exp(-a*x^2+b*x),x,X_0,inf),b,n). To verify this one needs to change the order of integration and differentiation. The result can be obtained in terms of the error function. There is only one conditition -- a>0. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3525906 ] bug in integrate(x*exp(-a*x^2+b*x), x, X_0, inf) From: SourceForge.net - 2012-08-15 16:38:35 ```Bugs item #3525906, was opened at 2012-05-11 10:25 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&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: Pending >Resolution: Works For Me Priority: 5 Private: No Submitted By: ivan antonovich (ognelis) Assigned to: Nobody/Anonymous (nobody) Summary: bug in integrate(x*exp(-a*x^2+b*x),x,X_0,inf) Initial Comment: Maxima 5.27.0 http://maxima.sourceforge.net using Lisp CLISP 2.48 (2009-07-28) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d: false; (%o1) false (%i2) assume(a>0); (%o2) [a > 0] (%i3) expr: exp(-a*x^2+b*x)*x; (%o3) x*%e^(b*x-a*x^2) (%i4) res1:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's do the integration once again: #============================================ (%i5) res1new:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's see the results #============================================ #++++++++first++++++++++++ (%i6) factor(ratsimp(res1)); (%o6) %e^(b^2/(4*a))*(2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a*abs(2*a*X_0-b) +2*gamma_incomplete(1/2, (4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a^(3/2)*b*X_0 -gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *sqrt(a)*b^2) /(4*a^2*abs(2*a*X_0-b)) #++++++++second++++++++++++ (%i7) factor(ratsimp(res1new)); (%o7) (gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)*b +2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*a) *%e^(b^2/(4*a)) /(4*a^2) #============================================ #The results are different!!! #============================================ #============================================ #Let's continue:(now 2 a X_0 -b is negative) #============================================ (%i8) res2:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? negative; (%i9) factor(ratsimp(res2)); (%o9) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*b -2*sqrt(%pi)*b -2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)) *%e^(b^2/(4*a)) /(4*a^(3/2)) #============================================ #Let'see the difference between expressions with positive and negative 2 a X_0 -b #============================================ (%i10) factor(ratsimp(res2-res1new)); (%o10) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))-sqrt(%pi)) *b*%e^(b^2/(4*a)) /(2*a^(3/2)) #============================================ #But the results must be the same. #============================================ P.S. integrate(x^n*exp(-a*x^2+b*x),x,X_0,inf) can be programmed as diff(integrate(exp(-a*x^2+b*x),x,X_0,inf),b,n). To verify this one needs to change the order of integration and differentiation. The result can be obtained in terms of the error function. There is only one conditition -- a>0. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2012-08-15 09:38 Message: In maxima 5.28post, the two integrals are identical for both 2*a*X_0-b positive and negative. Marking as pending/worksforme ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3525906 ] bug in integrate(x*exp(-a*x^2+b*x), x, X_0, inf) From: SourceForge.net - 2012-09-21 05:47:57 ```Bugs item #3525906, was opened at 2012-05-11 10:25 Message generated for change (Settings changed) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&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: Works For Me Priority: 5 Private: No Submitted By: ivan antonovich (ognelis) Assigned to: Nobody/Anonymous (nobody) Summary: bug in integrate(x*exp(-a*x^2+b*x),x,X_0,inf) Initial Comment: Maxima 5.27.0 http://maxima.sourceforge.net using Lisp CLISP 2.48 (2009-07-28) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d: false; (%o1) false (%i2) assume(a>0); (%o2) [a > 0] (%i3) expr: exp(-a*x^2+b*x)*x; (%o3) x*%e^(b*x-a*x^2) (%i4) res1:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's do the integration once again: #============================================ (%i5) res1new:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? positive; #============================================ #Let's see the results #============================================ #++++++++first++++++++++++ (%i6) factor(ratsimp(res1)); (%o6) %e^(b^2/(4*a))*(2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a*abs(2*a*X_0-b) +2*gamma_incomplete(1/2, (4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *a^(3/2)*b*X_0 -gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a)) *sqrt(a)*b^2) /(4*a^2*abs(2*a*X_0-b)) #++++++++second++++++++++++ (%i7) factor(ratsimp(res1new)); (%o7) (gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)*b +2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*a) *%e^(b^2/(4*a)) /(4*a^2) #============================================ #The results are different!!! #============================================ #============================================ #Let's continue:(now 2 a X_0 -b is negative) #============================================ (%i8) res2:integrate(expr,x,X_0,inf)\$ Is 2*a*X_0-b positive, negative, or zero? negative; (%i9) factor(ratsimp(res2)); (%o9) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*b -2*sqrt(%pi)*b -2*gamma_incomplete(1,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))*sqrt(a)) *%e^(b^2/(4*a)) /(4*a^(3/2)) #============================================ #Let'see the difference between expressions with positive and negative 2 a X_0 -b #============================================ (%i10) factor(ratsimp(res2-res1new)); (%o10) -(gamma_incomplete(1/2,(4*a^2*X_0^2-4*a*b*X_0+b^2)/(4*a))-sqrt(%pi)) *b*%e^(b^2/(4*a)) /(2*a^(3/2)) #============================================ #But the results must be the same. #============================================ P.S. integrate(x^n*exp(-a*x^2+b*x),x,X_0,inf) can be programmed as diff(integrate(exp(-a*x^2+b*x),x,X_0,inf),b,n). To verify this one needs to change the order of integration and differentiation. The result can be obtained in terms of the error function. There is only one conditition -- a>0. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-08-15 09:38 Message: In maxima 5.28post, the two integrals are identical for both 2*a*X_0-b positive and negative. Marking as pending/worksforme ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3525906&group_id=4933 ```