MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: False result with Integrate ?

> Gilles BARBIER wrote:
> >
> >      Help !
> >
> >      Why : Integrate[ Sqrt[(x-y)^2],{x,0,1}],{y,0,1}]
> >      gives 0 with math2.2 or math3.0.
> >
> >      The exact result is 1/3 !!
> >
> >      Gilles
> >      EDF/DER
> Are you sure?  Sqrt[(x-y)^2]=x-y and
> Integrate[x,{x,0,1}]-Integrate[y,{y,0,1}]=0.

Gilles BARBIER wrote:
>      No, Sqrt[(x-y)^2]=Abs[x-y]
>      Moreover, I do not understand how the integral of an
>      always positive function can be 0.
>      In mathemetics, we can then demonstrate that, in this case,
>      the function has to be null "nearly everywhere". This is
>      obviously not the case here.
>      Gilles.
>      EDF/DER.

Upon looking at the problem further, I don't think that the symbolic
integrator is smart enough to split up the limits.  In order to
symbolically do this integral correctly, 


That is a pretty subtle trick for a symbolic processor to do. 
Apparently, Mma isn't up to the task. 

Another side note to this is that Sqrt[] is a multivalued function being
both positive and negative, hence any integral of Sqrt of anything is
zero.  The symbolic processor was not up to the task of integrating

By the way, NIntegrate[Sqrt[(x-y)^2],{x,0,1},{y,0,1}] returns 0.3333333.

  • Prev by Date: remote kernel
  • Next by Date: Re: When to use Compile[]
  • Previous by thread: False result with Integrate ?
  • Next by thread: Re: False result with Integrate ?