Re: 2 questions about simplifications of expressions in MMA
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg438] Re: [mg423] 2 questions about simplifications of expressions in MMA
- From: olness at phyvms.physics.smu.edu (Fredrick Olness (214) 768-2500 or -2495, Fax -4095)
- Date: Mon, 30 Jan 1995 11:36:44 -0600
> Fedor Pikus writes: (pikus at physics.ucsb.edu)
> Dear Mathgroupers,
> I've done some computations on MMA, and the results seem to be ok, but
> writter in a horrible form.
> First of all, how do I make MMA understand that this
>
> 2
> e1 - Sqrt[(e1 - e2) ] - e2
> Out[12]= {----------------------------------- }
> 2 2
> Sqrt[(e1 - Sqrt[(e1 - e2) ] - e2) ]
>
> is really 1.
--------------------------------------------------------------------
PowerExpand will do much of what you need, but it assumes the opposite
branch of the Sqrt[] function than you want.
--------------------------------------------------------------------
In[]:= tmp= (e1-Sqrt[(e1-e2)^2] - e2 )/( Sqrt[(e1-Sqrt[(e1-e2)^2] - e2 )^2] )
In[]:= tmp //PowerExpand
Out[]= 0
--------------------------------------------------------------------
The solution is to lead Mathematica through to the proper branch, and
it will do the rest.
--------------------------------------------------------------------
In[]:= tmp /.{Sqrt[(e1-e2)^2] -> -(e1-e2)} //PowerExpand
Out[]= 1
--------------------------------------------------------------------
Fredrick I. Olness
SMU Mail: Department of Physics
Fondren Science Bldg.
Southern Methodist University
Dallas, TX 75275
Internet: Olness at phyvms.physics.smu.edu (129.119.200.74)
Olness at mail.physics.smu.edu