MathGroup Archive 2002

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

Search the Archive

Re: simplify expr to 1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37953] Re: simplify expr to 1
  • From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
  • Date: Thu, 21 Nov 2002 00:38:31 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Jerry Blimbaum  wanted to know why Mathematica doesn't simplify 
(f[x]/g[x])^r * (g[x]/f[x])^r  --> 1

----------------
It doesn't because it isn't always true! 
Some counter examples:


In[1]:=
   x= -4;
   r= 1/2;
   x^r*(1/x)^r

Out[3]=
   -1


In[4]:=
   x= -4;
   r= 23/7;
   x^r*(1/x)^r

Out[6]=
   (-1)^(4/7)


However, PowerExpand does what you were looking for.  PowerExpand does
transformations that aren't always true.


In[7]:=
   Clear[x,r];
   PowerExpand[x^r*(1/x)^r]

Out[8]
   1


Simplify knows this simplifies to 1 if (x>0), or if (r) is an integer.


In[9]:=
   Clear[x,r];
   Simplify[ x^r*(1/x)^r,  x>0 ]

Out[10]=
   1


In[11]:=
   Clear[x,r];
   Simplify[ x^r*(1/x)^r,  r \[Element] Integers ]

Out[12]=
   1


But some might argue that that isn't true either because 
sometimes the result is 1.0 instead of the integer 1.

In[13]:=
   x=2.3;
   r=1/2;
   x^r*(1/x)^r

Out[15]=
   1.


In[16]:=
   x=2;
   r=0.5;
   x^r*(1/x)^r

Out[18]=
   1.

-------
Regards,
  Ted Ersek

Download my latest tricks from: 
http://www.verbeia.com/mathematica/tips/Tricks.html
and  
http://www.verbeia.com/mathematica/tips/GraphicsTricks.html



  • Prev by Date: Re: Interactivity?
  • Next by Date: Re: Difference between fonts in Mathematica 4.1 and 4.2?
  • Previous by thread: Data storage in ListPlots and Exported EPS graphics?
  • Next by thread: Re: Re: simplify expr to 1