# Optimization for inequalities in $\mathbb{C}$

I want to check when the expression

$$\sqrt{\sqrt{\lambda^{2}\left(2E+\lambda^{2}\right)}+E+\lambda^{2}}$$

is real, when it is purely imaginary and when it is complex (with imaginary part not zero).

Also I would like to know the sign of the imaginary part in the case it is non-zero. To check the last part, after some steps, I am using Reduce for inequalities like $\mathrm{Im}\left(\sqrt{\lambda^{2}\left(2E+\lambda^{2}\right)}\right)>0$ but this is taking a lot of time on Mathematica. Is there a way to get the kind of results that I want more quickly?

The variables are real and the code I ran is

  Reduce[ Im[ Sqrt[ e + λ^2  -Sqrt[ λ^2 (2 e + λ^2)]]] > 0, {e, λ}]

-
Can you include the code which is taking a long time? – Jonathan Shock Jul 16 '13 at 17:11
Are the variables real ? – b.gatessucks Jul 16 '13 at 17:16
Reduce[Im[Sqrt[e + x^2 + Sqrt[(x^2) (2*e + x^2)]]] == 0, x, Reals] for real vars – Dr. belisarius Jul 16 '13 at 17:55
@belisarius Interestingly, Reduce doesn't seem to solve the <0 case correctly. – Sjoerd C. de Vries Jul 16 '13 at 20:29

Let's see what are the regions of interest:

n = 4;
Partition[
RegionPlot[#[[2]][#[[1]][Sqrt[e + x^2 + Sqrt[(x^2) (2*e + x^2)]]], 0],
{x, -n, n}, {e, -n, n}, PlotLabel -> #,
AxesLabel -> Automatic, LabelStyle -> Medium] & /@
Tuples@{{Re, Im}, {Less, Greater}},
2] // Grid // Framed


So in principle we should only focus on the sign of the imaginary part. Like this:

Reduce[Im[Sqrt[e + x^2 + Sqrt[(x^2) (2*e + x^2)]]] == 0, e, Reals]
(*
e >= -(x^2/2)
*)


and that's the information you were after.

-