RE: [Q] error in Integrate

• To: mathgroup at smc.vnet.net
• Subject: [mg8777] RE: [mg8750] [Q] error in Integrate
• From: "Richard W. Finley, M. D." <trfin at umsmed.edu>
• Date: Thu, 25 Sep 1997 12:26:11 -0400
• Sender: owner-wri-mathgroup at wolfram.com

Hi
This has already been discussed but why do you say it is obviously =
wrong?  In fact, it is correct.  The answer 1/3 is also correct.  If you =
define Sqrt[(x-y)^2] to be (x-y) for x>y and -(x-y) for x<y then you get =
the answer you desire.  If you define it to be (x-y) for all x in the =
region, then the answer is indeed zero.  The problem is that Sqrt is =
multiple valued and how you define it in a given region determines the =
answer.  Mma is somewhat inconsistent in this regard because if you use =
NIntegrate you get a different answer than Integrate, but both are =
formally correct.  One must simply be more precise in the formulation of =
the problem.  There are always subtle pitfalls waiting for those who =
integrate multiple valued functions...I have been "burned" on many =
occasions.
RF

-----Original Message-----
From:	Denis Barbier [SMTP:barbier at cmapx.polytechnique.fr]
To: mathgroup at smc.vnet.net
Sent:	Saturday, September 20, 1997 9:28 PM
To:	mathgroup at smc.vnet.net
Subject:	[mg8750] [Q] error in Integrate

Hi,

with Mma 2.2,
Integrate[Integrate[ Sqrt[x-y]^2,{x,0,1}],{y,0,1}]

gives 0, which is obviously wrong.

Am i missing something ?
Is there a package or something else i could load to correct this result =
?
(theoretical result is 1/3)