Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10240

Re: Sqrt of complex number

From Murray Eisenberg <murray@math.umass.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Sqrt of complex number
Date 2012-05-28 09:14 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jpvfls$q7a$1@smc.vnet.net> (permalink)
References <201205270842.EAA17817@smc.vnet.net>

Show all headers | View raw


As the documentation says:

    Sqrt[z] means z^(1/2)

    z^p gives the _principal value_ -- of Exp[p Log[z]].

As with any rational power 1/m, then, you'll need another way to find 
other roots. One way:

    z /. Solve[z^2 == 3 - 4 I, z]
{-2 + I, 2 - I}

(In some such situations, you'll want to wrap the z/.Solve[...] 
expression with ComplexExpand in order to get the Cartesian forms of the 
roots.

On 5/27/12 4:42 AM, Jacare Omoplata wrote:
> Hi,
>
> 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?
>
> Thanks.
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Sqrt of complex number Murray Eisenberg <murray@math.umass.edu> - 2012-05-28 09:14 +0000

csiph-web