[Maxima-commits] CVS: maxima/tests rtest15.mac,1.60,1.61 From: Raymond Toy - 2007-06-22 16:50:40 ```Update of /cvsroot/maxima/maxima/tests In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13838/tests Modified Files: rtest15.mac Log Message: Bug [ 1552789 ] integrate(1/(sin(x)^2+1),x,1,1+%pi) Integral is no longer slow, but does return the wrong answer. This fixes the problem with the wrong answer. src/defint.lisp: o Basically, need to convert tan(x) to sin(x)/cos(x) so POLES-IN-INTERVAL can find the poles of tan(x). This probably needs refinement. tests/rtest15.mac: o Add test from this bug report o Add an additional related test. Index: rtest15.mac =================================================================== RCS file: /cvsroot/maxima/maxima/tests/rtest15.mac,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- rtest15.mac 12 Jun 2007 02:47:05 -0000 1.60 +++ rtest15.mac 22 Jun 2007 16:50:27 -0000 1.61 @@ -743,3 +743,19 @@ log((x^2+1)^(1/4)/sqrt(x)+1)/8-log((x^2+1)^(1/4)/sqrt(x)-1)/8 +atan((x^2+1)^(1/4)/sqrt(x))/4 +(x^2+1)^(1/4)/(sqrt(x)*(2*(x^2+1)/x^2-2))\$ + +/* + * Bug [ 1552789 ] integrate(1/(sin(x)^2+1),x,1,1+%pi) + * + * This bug said it was slow. That's no longer true, but the result + * was wrong. + * + * This has been fixed for this particular case. + */ +integrate(1/(sin(x)^2+1),x,1,1+%pi); +%pi/sqrt(2); + +/* A few more related tests. I think these are right */ +integrate(1/(sin(x)^2+1),x,1,1+4*%pi); +2*sqrt(2)*%pi; + ```
 [Maxima-commits] CVS: maxima/tests rtest15.mac,1.60,1.61 From: Raymond Toy - 2007-06-22 16:50:40 ```Update of /cvsroot/maxima/maxima/tests In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13838/tests Modified Files: rtest15.mac Log Message: Bug [ 1552789 ] integrate(1/(sin(x)^2+1),x,1,1+%pi) Integral is no longer slow, but does return the wrong answer. This fixes the problem with the wrong answer. src/defint.lisp: o Basically, need to convert tan(x) to sin(x)/cos(x) so POLES-IN-INTERVAL can find the poles of tan(x). This probably needs refinement. tests/rtest15.mac: o Add test from this bug report o Add an additional related test. Index: rtest15.mac =================================================================== RCS file: /cvsroot/maxima/maxima/tests/rtest15.mac,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- rtest15.mac 12 Jun 2007 02:47:05 -0000 1.60 +++ rtest15.mac 22 Jun 2007 16:50:27 -0000 1.61 @@ -743,3 +743,19 @@ log((x^2+1)^(1/4)/sqrt(x)+1)/8-log((x^2+1)^(1/4)/sqrt(x)-1)/8 +atan((x^2+1)^(1/4)/sqrt(x))/4 +(x^2+1)^(1/4)/(sqrt(x)*(2*(x^2+1)/x^2-2))\$ + +/* + * Bug [ 1552789 ] integrate(1/(sin(x)^2+1),x,1,1+%pi) + * + * This bug said it was slow. That's no longer true, but the result + * was wrong. + * + * This has been fixed for this particular case. + */ +integrate(1/(sin(x)^2+1),x,1,1+%pi); +%pi/sqrt(2); + +/* A few more related tests. I think these are right */ +integrate(1/(sin(x)^2+1),x,1,1+4*%pi); +2*sqrt(2)*%pi; + ```