MathGroup Archive 2002

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

Search the Archive

Working with Real variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34208] Working with Real variables
  • From: bghiggins at ucdavis.edu (Brian Higgins)
  • Date: Thu, 9 May 2002 05:16:22 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear MathGroup,

I am interested in evaluating multiple integrals involving Abs[x-y]
terms where x and y are real variables. I was interested in using the
ReIm package or Ted Ersek's SwitchableRealOnly package

To set the tone I started with the following simple example using a 
traditional approach that relies on standard Mathematica functions

Simplify[Integrate[Abs[x - y], {y, 0, 1}], Element[{x, y} ,Reals]

which gives

(1/2)*((-(-1 + x))*Abs[-1 + x] + x*Abs[x])

This is effectively the same result what I would get by doing the
integration by hand.  So far so good. I then try the ReIm package

In[1]:=<< Algebra`ReIm`

In[2]:=x /: Im[x] = 0; y/:Im[y]=0;

In[4]:=Integrate[Abs[x - y], {y, 0, 1}]

Out[4]=(Sqrt[(-1 + x)^2] - 2*Sqrt[(-1 + x)^2]*x)/(2*(1 - x))

This  does not evaluate to the above result. If I use the
SwitchableRealOnly package I get the same result found by the  ReIm
package. Is this a bug, or am I missing something crucial. when using
these packages.

Thanks in advance for any help/suggestions

Brian


  • Prev by Date: Re: Sequence and Or
  • Next by Date: PSLQ implementation?
  • Previous by thread: Re: Start-up window size saving
  • Next by thread: PSLQ implementation?