SourceForge has been redesigned. Learn more.

## [Maxima-discuss] Bug in Integrate

 [Maxima-discuss] Bug in Integrate From: Sean Lake - 2014-04-28 00:37:13 ```Hello All, I'm not sure what the problem is, but I have a simple test case. Here's the code: integrate( exp( -x^2/2 ) / sqrt(2*%pi) * x^m, x, -0.25, 0.25 ); %, m = 4; The result comes out negative, and it should be positive. Maxima produces the correct result if the value of m is inserted before doing the integral. Thanks, Sean Maxima 5.33.0 http://maxima.sourceforge.net using Lisp SBCL 1.1.17 ```

### Thread view

 [Maxima-discuss] Bug in Integrate From: Sean Lake - 2014-04-28 00:37:13 ```Hello All, I'm not sure what the problem is, but I have a simple test case. Here's the code: integrate( exp( -x^2/2 ) / sqrt(2*%pi) * x^m, x, -0.25, 0.25 ); %, m = 4; The result comes out negative, and it should be positive. Maxima produces the correct result if the value of m is inserted before doing the integral. Thanks, Sean Maxima 5.33.0 http://maxima.sourceforge.net using Lisp SBCL 1.1.17 ```
 Re: [Maxima-discuss] Bug in Integrate From: Barton Willis - 2014-04-28 02:41:18 ```This is a bug--if you could report it to our bug tracker , that would be great (http://sourceforge.net/p/maxima/bugs/) A workaround seems to be to declare m to be a positive integer: (%i1) (declare(m,integer), assume(m>0))\$ (%i2) integrate(exp( -x^2/2 ) / sqrt(2*%pi) * x^m, x, -1/4, 1/4)\$ (%i3) %,m = 4; (%o3) (3*sqrt(2)*sqrt(%pi)-2^(5/2)*gamma_incomplete(5/2,1/32))/(sqrt(2)*sqrt(%pi)) (%i4) float(%); (%o4) 1.5240024317779744*10^-4 This workaround should not be needed. Setting domain to complex makes answer to be wrong again :( ________________________________________ From: Sean Lake Sent: Sunday, April 27, 2014 19:37 To: maxima-discuss@... Subject: [Maxima-discuss] Bug in Integrate Hello All, I'm not sure what the problem is, but I have a simple test case. Here's the code: integrate( exp( -x^2/2 ) / sqrt(2*%pi) * x^m, x, -0.25, 0.25 ); %, m = 4; The result comes out negative, and it should be positive. Maxima produces the correct result if the value of m is inserted before doing the integral. Thanks, Sean Maxima 5.33.0 http://maxima.sourceforge.net using Lisp SBCL 1.1.17 ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Maxima-discuss mailing list Maxima-discuss@... https://lists.sourceforge.net/lists/listinfo/maxima-discuss ```