I can't reproduce your problem (using the server at www.sagenb.org). I ask :
var('x, p, q')
assume(p,'integer'); assume(p>0)
assume(q,'integer'); assume(q>0)
fun = exp(-x^2) * x^(2*p) * x^q
A = integral(fun, (x,-oo,oo))
B = integral(fun, (x,-oo,0)) + integral(fun, (x,0,oo))
then I ask for A :
1/2*(-1)^q*gamma(p + 1/2*q + 1/2) + 1/2*gamma(p + 1/2*q + 1/2)
then for B :
1/2*(-1)^q*gamma(p + 1/2*q + 1/2) + 1/2*gamma(p + 1/2*q + 1/2)
to be double sure :
bool(A==B)
True
And, by the way , ask Maxima :
%maxima
declare(p, integer, q, integer);
assume(p>0, q>0);
foo(x):=%e^(-x^2)*x^(2*p)*x^q;
integrate(foo(x), x);
A:integrate(foo(x), x, minf, 0);
B:integrate(foo(x), x, 0, inf);
C:integrate(foo(x), x, minf, inf);
is(equal(A+B,C));
which gives :
done
[p>0,q>0]
foo(x):=%e^-x^2*x^(2*p)*x^q
-gamma_incomplete((q+2*p+1)/2,x^2)*x^(q+2*p+1)/(2*(x^2)^((q+2*p+1)/2))
(-1)^q*gamma((q+2*p+1)/2)/2
gamma((q+2*p+1)/2)/2
gamma(q/2+p+1/2)*(-1)^q/2+gamma(q/2+p+1/2)/2
true
HTH
Le jeudi 13 décembre 2012 15:43:54 UTC+1, undy a écrit :
>
> Sorry, I mixed up:
> A is wrong; B is correct.
>>
>>
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.