Group Abstract Group Abstract

Message Boards Message Boards

0
|
384 Views
|
8 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Square root of the square of a complex number

Posted 1 month ago

Greetings, everyone!

Wolfram knows about the square root of the square of a real number.

In: Or[(z^2)^(1/2) == z, (z^2)^(1/2) == -z]//FullSimplify[#, z \[Element] Reals] &

Out: True

But in the complex domain:

In: Or[(z^2)^(1/2) == z, (z^2)^(1/2) == -z]//FullSimplify[#, z \[Element] Complexes] &

Out: Or[(z^2)^(1/2) == z, (z^2)^(1/2) == -z]

Doesn't Wolfram know this?

POSTED BY: Sasha Mandra
8 Replies
POSTED BY: Michael Rogers
POSTED BY: Michael Rogers

In my reading of the documentation, PowerExpand[] assumes the variables are real by default; and to get PowerExpand[] to use the assumptions in Assuming[], one should use the option Assumptions :> $Assumptions. In that case, we get a different result:

Assuming[z \[Element] Complexes, 
 PowerExpand[Or[(z^2)^(1/2) == z, (z^2)^(1/2) == -z], 
  Assumptions :> $Assumptions]]
(*
E^(I \[Pi] Floor[1/2 - Arg[z]/\[Pi]]) z == z || 
 E^(I \[Pi] Floor[1/2 - Arg[z]/\[Pi]]) z == -z
*)
POSTED BY: Michael Rogers
Posted 1 month ago

Try with PowerExpand

In[1]:= Assuming[z\[Element]Complexes,Or[(z^2)^(1/2)==z,(z^2)^(1/2)==-z]//PowerExpand]

Out[1]= True
POSTED BY: Hans Milton

This way it works:

In[12]:= ((z^2)^(1/2) - z) ((z^2)^(1/2) + z) // FullSimplify

Out[12]= 0
POSTED BY: Gianluca Gorni
Posted 1 month ago

That's great! But why didn't Wolfram do it?

PS. To this we might add:

In: Im[z] != 0 || z == Re[z] // FullSimplify[#, z [Element] Complexes] &

Out: True

POSTED BY: Sasha Mandra
POSTED BY: Gianluca Gorni
Posted 1 month ago

You're right. It works. But it's a different formula. My formula is theoretical, yours is algebraic. It's derived from

In: Sqrt[z^2] Sqrt[z^2]

Out: z^2

POSTED BY: Sasha Mandra
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard