5

The following equation in $\mathbb{C}$:

$4z^2+8|z|^2-3=0$

is not algebraic and has 4 solutions : $\pm\frac{1}{2}$ and $\pm i\frac{\sqrt{3}}{2}$. The Solve function in Mathematica only returns the 2 real values :

Solve[4 z^2 + 8 Abs[z]^2 - 3 == 0, Complexes]

(* {{z -> -(1/2)}, {z -> 1/2}} *)

What am I missing ?

5 Answers5

5
Solve[4 z^2 + 8 Abs[z]^2 - 3 == 0 && z \[Element] Complexes, z]

{{z -> -(1/2)}, {z -> 1/2}, {z -> -((I Sqrt[3])/2)}, {z -> ( I Sqrt[3])/2}}

Suba Thomas
  • 8,716
  • 1
  • 17
  • 32
  • Why isn't this equivalent to the code in the question? I can't find anything in the documentation to imply otherwise. – tba Nov 14 '15 at 02:07
4

Actually, Reduce did it :

Reduce[4 z^2 + 8 Abs[z]^2 - 3 == 0,z, Complexes]

z == -(1/2) || z == 1/2 || z == -((I Sqrt[3])/2) || z == (I Sqrt[3])/2

Or using the option Method-> Reduce in Solve :

Solve[ 4 z^2 + 8 Abs[z]^2 - 3 == 0, z, Complexes, Method -> Reduce]

{{z -> -(1/2)}, {z -> 1/2}, {z -> -((I Sqrt[3])/2)}, {z -> ( I Sqrt[3])/2}}

Or using an option introduced in version 8 :

Solve[ 4 z^2 + 8 Abs[z]^2 - 3 == 0, z, Complexes, MaxExtraConditions -> All]

{{z -> -(1/2)}, {z -> 1/2}, {z -> -((I Sqrt[3])/2)}, {z -> ( I Sqrt[3])/2}}

This way one gets replacement rules in the usual Solve way instead of a boolean expression, in case the former is more useful.

I discovered that the variable name can be omitted both in Solve and Reduce. But it cannot be considered good practice. The mention of the domain (complexes) is also superfluous.

Sjoerd C. de Vries
  • 65,815
  • 14
  • 188
  • 323
2

A pedestrian approach, overkill in this case, is to separate into explicit real and imaginary parts both for the expression(s) and variable(s).

expr = 4 z^2 + 8  Abs[z]^2 - 3;
{re, im} = 
 ComplexExpand[{Re[expr], Im[expr]}, z] /. {Re[z] -> rez, Im[z] -> imz}
solns = Solve[{re, im} == 0];
rez + I*imz /. solns

(* Out[380]= {-3 + 4 imz^2 + 12 rez^2, 8 imz rez}

Out[382]= {-(1/2), 1/2, -((I Sqrt[3])/2), (I Sqrt[3])/2} *)
Daniel Lichtblau
  • 58,970
  • 2
  • 101
  • 199
1

Specifying Complexes for Solveor Reduce suffices as does just doing it yourself (as alluded to by Daniel:Lichtblau):

x + I y /.Solve[{4 (x^2 - y^2) + 8 (x^2 + y^2) - 3 == 0, 8 x y == 0}, {x, y}]

yield:

 {-((I Sqrt[3])/2), (I Sqrt[3])/2, -(1/2), 1/2}
ubpdqn
  • 60,617
  • 3
  • 59
  • 148
0
   Solve[4 z^2 + 8 z Conjugate[z] - 3 == 0, z]
(* {z -> -1/2}, {z -> 1/2}, {z -> (-I/2)*Sqrt[3]}, {z -> (I/2)*Sqrt[3]}} *)
murray
  • 11,888
  • 2
  • 26
  • 50