# Simplify with constraints does not work with square roots

I am trying to simplify a complex expression. One of the smallest parts of this expression is $$\sqrt{1/(1-(1-m/k)^d)}\cdot\sqrt{(1-(1-m/k)^d)}$$. For this smallest part it seems that Simplifydoes not work. Hence, I tried to use

Simplify[Sqrt[1/(1-(1-m/k)^d)]*Sqrt[(1-(1-m/k)^d)],m>=1 && k>=1 && d>=1 && k>=4m]

expecting $$1$$ as result. Instead, I get exactly the same expression that I provided in input. How is it possible?

Note: I noticed that if I replace $$d$$ with a positive integer, it works without specifying that the variables are real.

I'm not sure why your assumptions didn't do the trick, but I often use the pattern _ \[Element] Reals, which works here:

Simplify[Sqrt[1/(1 - (1 - m/k)^d)]*Sqrt[(1 - (1 - m/k)^d)], _ \[Element] Reals]
(* 1 *)

• PowerExpand will do the jpb Commented Aug 27, 2023 at 19:59
• Thank you ! Anyway, why did not work? It is about complex numbers and $d$? I noticed that if I replace $d$ with a positive integer, it works without specifying that the variables are real. Commented Aug 27, 2023 at 20:10
• OK, thank you @RolandF, but I am working on a huge expression and it would be complicated to use PowerExpand on all single expression parts where I manually see that it can be used Commented Aug 27, 2023 at 22:32
• Your assumptions have to assure, simply to check, that the different expressions exclude a wedge along the negative real axis, so that all the square roots are maps to the right half plane Re z>0. Since this is nearly impossible to formulate, PowerExpand allsumes high school algebra power rules, implicitetly assuming that all expressions are real positive, without any checks. You may use PowerExpand at no cost toegether with FullSimplify and check the results for identity on some critical complex exact numerical points in C. Erreoneous simplfications yield imaginary multiples of Pi Commented Aug 28, 2023 at 3:39
• Thank you @RolandF ! Commented Aug 28, 2023 at 10:23
\$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global*"]

Assuming[m >= 1 && k >= 1 && d >= 1 && k >= 4 m,
Sqrt[1/(1 - (1 - m/k)^d)]*Sqrt[(1 - (1 - m/k)^d)] //
ComplexExpand // Simplify]


However, the first condition is not feasible

FindInstance[(1 - m/k)^d > 1 && m >= 1 && k >= 1 && d >= 1 && k >= 4 m,
{d, k, m}, Reals]

(* {} *)


Adding the redundant condition (1 - m/k)^d <= 1

Assuming[m >= 1 && k >= 1 && d >= 1 && k >= 4 m && (1 - m/k)^d <= 1,
Sqrt[1/(1 - (1 - m/k)^d)]*Sqrt[(1 - (1 - m/k)^d)] //
ComplexExpand // Simplify]

(* 1 *)
`
• Thank you. Interesting. I would like to understand the reasons for this behavior so I will always know how to simplify any expression. Do you have any idea? Commented Aug 28, 2023 at 10:20
• I can only guess that it gets caught in a logic loop. And "always know how to simplify any expression" is only a dream. Commented Aug 28, 2023 at 14:38
• Sure, I meant any "elementary" expression, that is, formed by composing elementary functions. This must be possible with Mathematica. Commented Aug 29, 2023 at 18:17