Why is Mathematica not simplifying further?

After I use Simplify on an expression I get$\dfrac{1}{2}\sqrt{-\dfrac{\sqrt{(-b^2+16|c|^2)(4|c|^2+b\Im(c))^2}}{4a(4|c|^2+b\Im(c)])}}$. This expression can clearly be simplified further by noticing that the square bracket term in the numerator cancels the other bracket term in the denominator so $\dfrac{1}{2}\sqrt{-\dfrac{\sqrt{(-b^2+16|c|^2)}}{4a}}$. This is clearly a much simpler form since it includes less terms, so my question is why does not mathematica do this?

Edit: here is my code

real[x_, y_] := -2 a x^3 - 2 a y^2 x + 2 Re[c] x + 2 Im[c] y + b/2 y;
imaginary[x_, y_] := -2 a x^2 y - 2 a y^3 + 2 Im[c] x - 2 Re[c] y - b/2 x;
sol = Solve[{real[x, y] == 0, imaginary[x, y] == 0},{x,y}];
FullSimplify[Sqrt[(x /. sol[[2, 1]])^2 + (y /. sol[[2, 2]])^2],
Assumptions -> {(a | b) ∈ Reals && c ∈ Complexes && (a | b | c) > 0}]

• Your expectation is only true if you assume the expression to be  Real>0  – Ulrich Neumann Feb 9 '18 at 9:26
• What do you mean by !=0? Is it not equal to zero? When I use the Simplify function I've included the assumption that $a,b,c>0$ – Turbotanten Feb 9 '18 at 9:29
• != stands for not equal. – Ulrich Neumann Feb 9 '18 at 9:31
• Please give your mathematica code. What about bJ(c) ? Is this a function? – Ulrich Neumann Feb 9 '18 at 9:34
• Okey, but I have used included the assumption in the Simplify function that $a,b,c>0$ so the expression in the bracket must thus be $>0$ – Turbotanten Feb 9 '18 at 9:34

You have given contradictive assumptions. In Mma the condition that a variable, say, c, is positive (c>0) automatically means that it belongs to Reals. Thus, when you fix c ∈ Complexes && (a | b | c) > 0 you mislead Mma.

According to your initial expressions the parameters a and b are Reals and positive, while c is Complex, am I right? If yes, try this:

    expr = Simplify[Sqrt[(x /. sol[[2, 1]])^2 + (y /. sol[[2, 2]])^2],
Assumptions -> {a, b} > 0];

MapAt[PowerExpand, expr, {2, 1}]

(*  1/2 Sqrt[-((I Sqrt[b^2 - 16 Im[c]^2 - 16 Re[c]^2])/a)]  *)


Have fun!

{2,1} is a TreeCoordinate of the part of the whole expression that is under the outer square root. The Tree you can visualize by the function

TreeForm[expr]


yielding the following structure

Here the arrow indicates the element {2,1} that wee need. This can be made visible, if you hover the cursor over this element. It is this element that the PowerExpand function is convenient to be applied to.

• Yes a,b are real and positive while c is complex. True, good that you pointed that out that assuming c>0 is misleading. What does exactly the {2,1} term in MapAt do? – Turbotanten Feb 9 '18 at 10:42
• @Turbotanten Please have a look at the edit. – Alexei Boulbitch Feb 9 '18 at 10:51

The "bracket" you want to simplify is complex!

bracket = r Exp[I φ];(* stands for (4 c Conjugate[c] + b Im[c])*)

expr = Sqrt[bracket^2]/bracket ;
FullSimplify[ expr, {Element[{r, φ}, Reals], r > 0 }]
(* E^(-I φ) Sqrt[E^(2 I φ)] *)


Further simplification needs information about φ

• What do you mean by the bracket I want to simplify is complex? There is no imaginary unit in my expression. – Turbotanten Feb 9 '18 at 10:02
• @Turbotanten: The "bracket" is the expression (4 c Conjugate[c] + b Im[c]) which is complex! By the way your restrictions c>0 and c complex cannot be fullfilled both. – Ulrich Neumann Feb 9 '18 at 12:49