Are these both the right answer for the integral?



Sorry, I made a mistake.  It should read integrate(3*x^2*sqrt(1+1/x^2),x);

With this change pw.mac gives a real answer so I guess my mistake is making me learn about the difference in integration with respect to real verses complex numbers. 

Rich


From: Richard Hennessy 
Sent: Wednesday, January 05, 2011 4:24 PM
To: Maxima List 
Subject: Are these both the right answer for the integral?

Hi List,

I found an article which gives an integral problem of interest.

integrate(3*x^2*sqrt(1-1/x^2),x);

Maxima alone said it works out to (1-1/x^2)^(3/2)*x^3, with abs_integrate loaded the answer is the same (1-1/x^2)^(3/2)*x^3, but with pw.mac loaded Maxima gives 3*(((x-1)*(x+1))^(3/2)/3+%i/3)*signum(x)

They all agree that diff(integrate(3*x^2*sqrt(1-1/x^2),x),x) gives the original form back, but not directly.  You have to simplify to get everything to cancel out to 0.  I don?t know why pw.mac returns an answer with %i in it.  Is that a bug?

Rich



(%i25) kill(all);
(out0) done
(%i1) 3*x^2*sqrt(1-1/x^2);
(out1) 3*sqrt(1-1/x^2)*x^2
(%i2) integrate(%,x);
(out2) (1-1/x^2)^(3/2)*x^3
(%i3) diff(%,x);
(out3) 3*(1-1/x^2)^(3/2)*x^2+3*sqrt(1-1/x^2)
(%i4) radcan(%-(out1));
(out4) -sqrt(x-1)*sqrt(x+1)*(-3*x^4+x^2*(3*x^2-3)+3*x^2)/(x^2*abs(x))
(%i5) radcan(%);
(out5) 0

(%i6) kill(all);
(out0) done
(%i1) load(pw);
(out1) "C:/Maxima-5.22.1/share/maxima/5.22.1/share/contrib/pw.mac"
(%i2) 3*x^2*sqrt(1-1/x^2);
(out2) 3*sqrt(1-1/x^2)*x^2
(%i3) pwint(%,x);
(out3) 3*(((x-1)*(x+1))^(3/2)/3+%i/3)*signum(x)
(%i4) diff(%,x);
(out4) 3*x*sqrt((x-1)*(x+1))*signum(x)
(%i5) radcan(%-(out2));
(out5) sqrt(x-1)*sqrt(x+1)*(3*x*signum(x)*abs(x)-3*x^2)/abs(x)
(%i6) radcan(%);
(out6) sqrt(x-1)*sqrt(x+1)*(3*x*signum(x)*abs(x)-3*x^2)/abs(x)
(%i7) signum2abs(%);
(out7) 0

(%i8) kill(all);
(out0) done
(%i1) load(abs_integrate);
(out1) "C:/Maxima-5.22.1/share/maxima/5.22.1/share/contrib/integration/abs_integrate.mac"
(%i2) 3*x^2*sqrt(1-1/x^2);
(out2) 3*sqrt(1-1/x^2)*x^2
(%i3) integrate(%,x);
(out3) (1-1/x^2)^(3/2)*x^3
(%i4) diff(%,x);
(out4) 3*(1-1/x^2)^(3/2)*x^2+3*sqrt(1-1/x^2)
(%i5) radcan(%-(out2));
(out5) -sqrt(x-1)*sqrt(x+1)*(-3*x^4+x^2*(3*x^2-3)+3*x^2)/(x^2*abs(x))
(%i6) radcan(%);
(out6) 0



--------------------------------------------------------------------------------
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima