## [Maxima-commits] CVS: maxima/tests rtestint.mac,1.17,1.18

 [Maxima-commits] CVS: maxima/tests rtestint.mac,1.17,1.18 From: Raymond Toy - 2006-03-29 14:28:43 ```Update of /cvsroot/maxima/maxima/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6928/tests Modified Files: rtestint.mac Log Message: o Correct some comments o Add test from p. 86 and verify the answer. Index: rtestint.mac =================================================================== RCS file: /cvsroot/maxima/maxima/tests/rtestint.mac,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- rtestint.mac 28 Mar 2006 18:02:56 -0000 1.17 +++ rtestint.mac 29 Mar 2006 14:28:40 -0000 1.18 @@ -479,9 +479,9 @@ /* * Wang gives gamma((2*%i+4)/3)/3/(%i/2)^((2*%i+4)/3) * - * I think this is right. The final formula he gives is wrong, but - * the derivation leading up to it is correct, except that he has the - * wrong value for integrate(x^m*exp(k*x^n),x,0,inf). + * I think this is right, in a sense. The final formula he gives is + * wrong, but the derivation leading up to it is correct, except that + * he has the wrong value for integrate(x^m*exp(k*x^n),x,0,inf). * * However, Wang also says these integrals only converge if * n-realpart(m)>1, and we have n=3 and realpart(m)=2, so we don't @@ -492,6 +492,18 @@ (-sqrt(3)*%i/2-1/2)*2^((2*%i+4)/3)*gamma((2*%i+4)/3)/3; */ +/* p. 86 */ +/* + * We can verify this by integrate(exp(%i*s*x)/sqrt(x),x,0,inf) and + * taking the imaginary part. This satisfies the convergence + * criteria, and maxima returns the value + * sqrt(%pi)/sqrt(s)*exp(%i*%pi/4). Thus, we get the answer below. + */ +(assume(s > 0), 0); +0; +ratsimp(integrate(sin(s*x)/sqrt(x),x,0,inf)); +sqrt(%pi)/(sqrt(2)*sqrt(s)); + /* p. 87 */ (assume(r>0),0); 0; @@ -630,8 +642,6 @@ * The substitution y=s*t produces 1/sqrt(s)*integrate(y^(-1/2)*exp(-y),y,0,inf), * which is gamma(1/2)/sqrt(s). */ -(assume(s > 0), 0); -0; integrate(1/sqrt(t)/exp(s*t),t,0,inf); sqrt(%pi)/sqrt(s); ```

 [Maxima-commits] CVS: maxima/tests rtestint.mac,1.17,1.18 From: Raymond Toy - 2006-03-29 14:28:43 ```Update of /cvsroot/maxima/maxima/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6928/tests Modified Files: rtestint.mac Log Message: o Correct some comments o Add test from p. 86 and verify the answer. Index: rtestint.mac =================================================================== RCS file: /cvsroot/maxima/maxima/tests/rtestint.mac,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- rtestint.mac 28 Mar 2006 18:02:56 -0000 1.17 +++ rtestint.mac 29 Mar 2006 14:28:40 -0000 1.18 @@ -479,9 +479,9 @@ /* * Wang gives gamma((2*%i+4)/3)/3/(%i/2)^((2*%i+4)/3) * - * I think this is right. The final formula he gives is wrong, but - * the derivation leading up to it is correct, except that he has the - * wrong value for integrate(x^m*exp(k*x^n),x,0,inf). + * I think this is right, in a sense. The final formula he gives is + * wrong, but the derivation leading up to it is correct, except that + * he has the wrong value for integrate(x^m*exp(k*x^n),x,0,inf). * * However, Wang also says these integrals only converge if * n-realpart(m)>1, and we have n=3 and realpart(m)=2, so we don't @@ -492,6 +492,18 @@ (-sqrt(3)*%i/2-1/2)*2^((2*%i+4)/3)*gamma((2*%i+4)/3)/3; */ +/* p. 86 */ +/* + * We can verify this by integrate(exp(%i*s*x)/sqrt(x),x,0,inf) and + * taking the imaginary part. This satisfies the convergence + * criteria, and maxima returns the value + * sqrt(%pi)/sqrt(s)*exp(%i*%pi/4). Thus, we get the answer below. + */ +(assume(s > 0), 0); +0; +ratsimp(integrate(sin(s*x)/sqrt(x),x,0,inf)); +sqrt(%pi)/(sqrt(2)*sqrt(s)); + /* p. 87 */ (assume(r>0),0); 0; @@ -630,8 +642,6 @@ * The substitution y=s*t produces 1/sqrt(s)*integrate(y^(-1/2)*exp(-y),y,0,inf), * which is gamma(1/2)/sqrt(s). */ -(assume(s > 0), 0); -0; integrate(1/sqrt(t)/exp(s*t),t,0,inf); sqrt(%pi)/sqrt(s); ```