Re: positive square root
- To: mathgroup at smc.vnet.net
- Subject: [mg58691] Re: positive square root
- From: dh <dh at metrohm.ch>
- Date: Fri, 15 Jul 2005 03:02:08 -0400 (EDT)
- References: <db57ne$4no$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Paul, Mathematica is correct. You can convince yourselve by considering that any number r may be written in exponential form: r= a Exp[-I b] where a (a>=0) is the absolute value of the number and b (real) its argument. Taking the square root gives (neglecting multiplicity) Sqrt[a] Exp[-I b/2] Taking the absolute value, the exponential disappears. Sqrt[a] is positive by definition and we are left with: Sqrt[a] Therefore: Abs[Sqrt[r]] == Sqrt[a] == Sqrt[Abs[r]] sincerely, Daniel paulvonhippel at yahoo wrote: > I work in a world where the square root is always a positive number. > But Mathematica allows for the possibility of negative square roots. > Two questions arise: > > (1) Is there a way to tell Mathematica that I'm only interested in > positive square roots? > > (2) My current solution is to use, e.g., Abs[Sqrt[z]]. But when > Mathematica echoes this, it puts the Abs function *under* the radical, > so it looks like Sqrt[Abs[z]]. Is this a bug in the display? >