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


Groups > comp.soft-sys.math.mathematica > #10241 > unrolled thread

Re: Sqrt of complex number

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-05-28 09:10 +0000
Last post2012-05-28 09:10 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Sqrt of complex number Bob Hanlon <hanlonr357@gmail.com> - 2012-05-28 09:10 +0000

#10241 — Re: Sqrt of complex number

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-05-28 09:10 +0000
SubjectRe: Sqrt of complex number
Message-ID<jpvfd9$q4l$1@smc.vnet.net>
A function (e.g., Sqrt) must be single-valued at each point so Sqrt is
defined as the "principal root." The two values you are looking for
are

y /. Solve[y^2 == x, y]

{-Sqrt[x], Sqrt[x]}

y /. Solve[y^2 == 3 - 4 I, y]

{-2 + I, 2 - I}

See http://reference.wolfram.com/mathematica/tutorial/FunctionsThatDoNotHaveUniqueValues.html


Bob Hanlon


On Sun, May 27, 2012 at 4:42 AM, Jacare Omoplata
<walkeystalkey@gmail.com> 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.
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web