Bug in changevar()



Try the following and you will get an incorrect answer.

(%i1) kill(all);
(out0) done
(%i1) display2d:false;

(out1) false
(%i2) integrate((a-x)^3*h(r*x-q),x,minf,inf);

(out2) 'integrate((a-x)^3*h(r*x-q),x,minf,inf)
(%i3) changevar(%,y-(r*x-q)=0,y,x);

(out3) 0
(%i4) h(x):=exp(-x^2);

(out4) h(x):=exp(-x^2)
(%i5) integrate((a-x)^3*h(r*x-q),x,minf,inf);

Is  r  zero or nonzero?

n;
Is  q  positive, negative, or zero?

p;
Is  r  positive or negative?

p;
(out5) (sqrt(%pi)*(2*a^3*r^3-6*a^2*q*r^2+6*a*q^2*r-2*q^3)/r+sqrt(%pi)*(6*a*r^3-6*q*r^2)/(2*r^3))/(2*r^3)
(%i6) radcan(%);

(out6) sqrt(%pi)*(2*a^3*r^3-6*a^2*q*r^2+(6*a*q^2+3*a)*r-2*q^3-3*q)/(2*r^4)
(%i7)

Clearly the answer from changevar() (zero) is wrong.

Rich