Re: Sqrt of complex number

• To: mathgroup at smc.vnet.net
• Subject: [mg126645] Re: Sqrt of complex number
• From: Erik Max Francis <max at alcyone.com>
• Date: Mon, 28 May 2012 05:11:41 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <jpspgr\$hdj\$1@smc.vnet.net>

```On 05/27/2012 01:44 AM, Jacare Omoplata wrote:
> When I try to find the square root of of a complex number, I get only one answer.
>
> In[1]:= Sqrt[3-4 I]
> Out[1]= 2-I
>
> But -2+I is an answer as well.
>
> In[2]:= (-2+I)^2
> Out[2]= 3-4 I
>
> Why does Mathematica give the first answer and not the second? Does it choose the answer
> with the positive real number? Is there any way I can get both answers? Or do I just have to
> remember that the negative of the given answer is also an answer?

It's the principal square root.  Does this result surprise you, after
all, even though -2 squared is also 4?

In[3]:= Sqrt[4]

Out[3]= 2

If you want to actually ask for _all_ the possible answers, use Solve:

In[1]:= Solve[x^2 == 3 - 4 I, x]

Out[1]= {{x -> -2 + I}, {x -> 2 - I}}

--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Jabber erikmaxfrancis
The side that stays within its fortifications is beaten.
-- Napoleon Bonaparte

```

• Prev by Date: Re: Sqrt of complex number
• Next by Date: Re: Sqrt of complex number
• Previous by thread: Re: Sqrt of complex number
• Next by thread: Re: Sqrt of complex number