Re: Simplification ?
- To: mathgroup at smc.vnet.net
- Subject: [mg38079] Re: Simplification ?
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Tue, 3 Dec 2002 04:28:49 -0500 (EST)
- References: <as5pn8$ngo$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Olivier,
Allowing x to be any complex number
Sqrt[x^2] = x if x is not negative and
= -x if x is negative
We can make us of this as follows
Simplify[Sqrt[x^2],Not[x<0]]
x
Simplify[Sqrt[x^2],x<0]
-x
We can force the reduction by
PowerExpand[Sqrt[x^2]]
x
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Olivier Durussel" <olivier.durussel at epfl.ch> wrote in message
news:as5pn8$ngo$1 at smc.vnet.net...
> Hi,
>
> Is there a way to force Mathematica to simplify the terms like
>
> Sqrt[x^2]
>
> to give x ???
>
> Thanks per advance !
> ___________________________________________________________
> Olivier DURUSSEL
>
> Ecole Polytechnique Fédérale de Lausanne
> STI-IPR-LCSM
> ME-Ecublens
> CH-1015 Lausanne
> Tél.: +41 21 693 53 17
> Fax.:+41 21 693 35 09
>
>
>