# Non-algebraic equation in the set of complex numbers

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 ?

• Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Nov 13 '15 at 19:06
• This discussion on Reduce vs Solve may be helpful – tba Nov 14 '15 at 2:08

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


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

• 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 2:07

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)/2) || z == (I Sqrt)/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)/2)}, {z -> ( I Sqrt)/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)/2)}, {z -> ( I Sqrt)/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.

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= {-3 + 4 imz^2 + 12 rez^2, 8 imz rez}

Out= {-(1/2), 1/2, -((I Sqrt)/2), (I Sqrt)/2} *)

• Overkill, indeed in this simple case. – Georges Perros Nov 13 '15 at 19:58

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)/2), (I Sqrt)/2, -(1/2), 1/2}

   Solve[4 z^2 + 8 z Conjugate[z] - 3 == 0, z]
(* {z -> -1/2}, {z -> 1/2}, {z -> (-I/2)*Sqrt}, {z -> (I/2)*Sqrt}} *)

• Yes, that works also. It's even simpler than adding options to Solve in this case. Thanks. – Georges Perros Nov 17 '15 at 17:56