[Date Index]
[Thread Index]
[Author Index]
Re: Error in basic integrals
*To*: mathgroup at smc.vnet.net
*Subject*: [mg7681] Re: [mg7664] Error in basic integrals
*From*: jpk at max.mpae.gwdg.de
*Date*: Sun, 29 Jun 1997 22:17:16 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
> I hope I have made an error, but I believe I have caught mathematica 3.0 returning
> a dead wrong answer to a basic integral.
>
> Integrate[1/(1-x^2],x] returns
> -1/2 Log[-1+x]+1/2 Log[1+x].
>
> This result is equivalent to ArcCoth[x] which is DEAD WRONG.
>
Not really because:
func=1/(1-z^2);
integ=Integrate[func,z];
and
In[34]:=
func-D[integ,z]//Simplify
Out[34]=
0
> The correct answer is ArcTanh[x] according to CRC handbook etc. Mathematica
> is retuning the complement to the correct answer.
>
Your CRC handbook say also for the definition
ArcTanh[z]=ContourIntegrate[1/(1-t^2),{t,0,z}]
the path of integration must not cross the real axis t in (-Infinity,-1]
and t in [1,Infinity)
A little algebra for complex z
(it is clearly illegal for real x since Log[t] for real t<0 is
indefined) shows
(1/2) (-Log[-1+z] + Log[1+z]) ==
(1/2) Log[(1+z)/(-1+z)]==
(1/2) Log[-1 * (1+z)/(1-z)]
(1/2) (Log[-1] + Log[(1+z)/(1-z)])
(1/2) ( I Pi + Log[(1+z)/(1-z)]
with the definition
ArcTanh[x]= (1/2) Log[ (1+x)/(1-x) ] for 0 <= x^2 < 1
one gets
(1/2) (-Log[-1+z] + Log[1+z]) == I Pi /2 + ArcTanh[z]
ups ...
as You probably know -- additive constants are usualy removed from
indefined integrals and on ends up with the conclusion that
Mma 3.0 indeed returns the correct answer for -1 < x < 1.
For x^2 >1 the correct answer to the integral is ArcCoth[x].
How ever You had not request the solution of Integrate[1/(1-x^2),x] on
a specific interval of x and Mma can not made any assumptions on it. Mathematica
uses allways complex continuations to make the calculation consistent. That is
one example why *real only* calculations so difficult to manage.
> Mathematica 2.2.1, by the way, returns the correct answer: -1/2 Log[x-1] +1/2
> Log[1+x] which is equivalent to ArcTanh[x].
>
> This is most discouraging. I have so much code invested in Mma 3.0, that I can't
> change languages in the middle of my dissertation.
Don't change the computer algebra system in the middle of Your dissertation --
just restart You whole study with the complex analysis lectures.
Hope that helps
Jens
PS : By the way -- the Assumptions-Option of Integrate takes no effect an I woulde
like to see that
Integrate[1/(1-x^2),x,Assumptions->{x^2<1}]
and
Integrate[1/(1-x^2),x,Assumptions->{x^2>1}]
work.
PSS: The definition :
Unprotect[Integrate]
Integrate[a_./(b_.-b_.*x_^2),x_]:=
a/b*ArcTanh[x]
Protect[Integrate]
works fine and will resolve the problem in Your case.
Prev by Date:
**D[f,x] vs f'[x]**
Previous by thread:
**D[f,x] vs f'[x]**
| |