Are these both the right answer for the integral?



You are right too.  I think I tried to plot realpart() of the answer which 
is not the right way to check for correctness in all cases.  Plotting 
realpart(%) gives the wrong sign for x < 0.

Rich



-----Original Message----- 
From: Mark H Weaver
Sent: Wednesday, January 05, 2011 8:08 PM
To: Richard Hennessy
Cc: reyssat ; Maxima List
Subject: Re: Are these both the right answer for the integral?

"Richard Hennessy" <rich.hennessy at verizon.net> writes:
> On second thought this is not okay.  You cannot add signum(x) *%i,
> because that is not a constant.

As reyssat pointed out, since the integrand is undefined at x=-1, x=0,
and x=1, the integral is defined only up to an additive constant on
_each_ of the intervals (-inf,-1) (-1,0) (0,1) and (1,inf).  Each of
those intervals can have its own constant, and they needn't be the same.

In other words, instead of the traditional integration constant C, in
this case you may add f(x) to the integral, where f is defined as
follows (for any constants C1,C2,C3,C4):

f(x) := if x<-1 then C1 elseif x<0 then C2 elseif x<1 then C3 else C4;

signum(x)*%i is equivalent to f(x) where C1=C2=-%i and C3=C4=%i, except
at 0 where the integral is undefined anyway.

      Mark