Subject: Are these both the right answer for the integral?
From: Richard Hennessy
Date: Wed, 05 Jan 2011 19:19:48 -0500
On second thought this is not okay. You cannot add signum(x) *%i, because
that is not a constant. I think it is a bug which I don't know offhand how
to fix. I would not call it a feature. The function is not real from
(-1,1). That is not a supported type of function. When I wrote pw I was
thinking about real functions not complex ones. I will have to figure it
out. I don't see how you can call it a feature. I just don't understand
the problem yet.
Rich
-----Original Message-----
From: Richard Hennessy
Sent: Wednesday, January 05, 2011 5:48 PM
To: reyssat
Cc: Maxima List
Subject: Re: [Maxima] Are these both the right answer for the integral?
Thanks, your right, it is always okay to add a constant to the answer for
integrate. I don't understand integration with respect to complex numbers
very well. The article mentions that users who are only familiar with real
integration would have a problem with understanding the answer to
integration of some piecewise functions. I am not sure if my algorithm is
right, I designed it for real numbers but sometimes complex numbers appear
out of nowhere.
Rich
-----Original Message-----
From: reyssat
Sent: Wednesday, January 05, 2011 5:06 PM
To: Richard Hennessy
Cc: Maxima List
Subject: Re: [Maxima] Are these both the right answer for the integral?
Richard Hennessy a ?crit :
> 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
>
Hi Rich,
The function is a multivalued function defined on the complex plane
except at 0 , 1 and -1.
So on the real line, depending on how the integral is computed, the
answer is defined only up to an additive constant on each of the
intervals ]-inf,-1[ , ]-1,0[ , ]0,1[ , ]1,inf[. The answer with pw.mac
just adds %i, this is ok, it could even be worse : adding %i +
5*%i*signum(1-x) - (3+2*%i)*signum(1+x) is also a correct result.
So I don't know either why pw.mac adds %i, but I would consider it as a
feature, not a bug.
Eric
> (%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
>
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima