# Can't simplify expression with square roots of square roots

I'm very new to Mathematica, and I've been using it to evaluate some symbolic expressions in my research that are too complicated to do by hand. However, some of them don't simplify when it is obvious to me that it could be simplified further. The following is a simple example (compared to the much messier other expressions I have):

FullSimplify[Expand[Sqrt[1+2 Subscript[\[Gamma], Q]+Sqrt[1-4 Subsuperscript[\[Gamma], P, 2]+4 Subscript[\[Gamma], Q]]] Sqrt[(1-2 Subsuperscript[\[Gamma], P, 2]+2 Subscript[\[Gamma], Q]+Sqrt[1-4 Subsuperscript[\[Gamma], P, 2]+4 Subscript[\[Gamma], Q]])/(1+2 Subscript[\[Gamma], Q]+Sqrt[1-4 Subsuperscript[\[Gamma], P, 2]+4 Subscript[\[Gamma], Q]])] (1+4 Subscript[\[Gamma], Q]+Sqrt[1-4 Subsuperscript[\[Gamma], P, 2]+4 Subscript[\[Gamma], Q]])], 0<4 Subsuperscript[\[Gamma], P, 2]+4 Subscript[\[Gamma], Q]<1 \[And]Subscript[\[Gamma], P] \[Element] Reals \[And]Subscript[\[Gamma], Q] \[Element] Reals ]


(I also attached the screenshot for better readability)

So clearly the $$\sqrt{1+2\gamma_Q+\sqrt{1-4\gamma_P^2+4\gamma_Q}}$$ term can be cancelled out since I have a constraint that $$\gamma_P, \gamma_Q$$ are such that this term is strictly positive. I have tried both Simplify, Expand then Simplify, FullSimplify, all with Assumptions option, as well as tighting the constraints on $$\gamma_P, \gamma_Q$$ so that they are not just real but in a smaller interval, so I'm not sure how to make this expression simplify even further. Any guidance would be appreciated!

• PowerExpand instead of Expand would do it.
– Syed
May 27, 2022 at 4:53
• I think I remember reading, but you should check this yourself to make certain that I am correct, that FullSimplify doesn't "denest radicals" and there is a library function somewhere that will enable Mathematica to do that in the cases where it is feasible to do. After that has been done then sometimes it is possible to further simplify some expressions. A Google Search for denest radical gives what looks like it might help. Or other searches might help. If that works for your problem then that may be what you are looking for.
– Bill
May 27, 2022 at 6:26
• Notice that Superscript[x,2]=== x^2 is False. Do you mean for Subsuperscript[\[Gamma], P, 2] to mean Subscript[\[Gamma],P]^2? In any case, you should avoid using Subscript while defining symbols or variables. Things like Subscript[x, 1] are not a symbol, but a composite expression where Subscript is an operator without built-in meaning. Read how to properly define indexed variables here May 27, 2022 at 8:41

FullSimplify[PowerExpand[YOUR EXPRESSION], your conditions]

$$\left(\sqrt{-4 \gamma _P^2+4 \gamma _Q+1}+4 \gamma _Q+1\right) \sqrt{\sqrt{-4 \gamma _P^2+4 \gamma _Q+1}-2 \gamma _P^2+2 \gamma _Q+1}$$
• That is not True for some variable combinations. f[x, y] /. {x -> -5, y -> -4} // N yields 29.207 and FullSimplify[PowerExpand[f[x, y]], cond] /. {x -> -5, y -> -4} // N yields -29.207 May 27, 2022 at 6:45
• Then let me ask, why does FullSimplify not recognize this? f[a, b] // PowerExpand[#, Assumptions -> cond] & // FullSimplify[#, Assumptions -> cond] &should cancel the additions term (-1)^Floor[(\[Pi] + Arg[1 + 2 b + Sqrt[1 - 4 a + 4 b]] - Arg[1 - 2 a + 2 b + Sqrt[1 - 4 a + 4 b]])/(2 \[Pi])] May 27, 2022 at 6:56
• Ok. Found the error. Didn't notice a typo in OP. Subsuperscript[\[Gamma], P, 2] instead of Subscript[\[Gamma], P] May 27, 2022 at 7:01