Let me be try to be highly specific, as my previous attempt How do I suppress an automatic sign change? to pose the question initially had a sign error, and perhaps became a little muddled.
In the course of pursuing the question Evaluate a certain three-dimensional constrained integral, the term (one of 694)
r = (202338335476512488921084723200 x^6 Sqrt[-(-1 + 2 x) (2 - x + 2 Sqrt[1 - x - 2 x^2])]Boole[1/38 (10 - Sqrt[5]) < x <= 1/4])/(319794090309 (723 + 17 Sqrt[5]))
is generated.
My attempt, r/.c, to apply (so the term becomes integrable--as can be checked) the rule (now corrected from earlier version--again, my apologies)
c := Sqrt[-(-1 + 2 x) (2 - x + 2 Sqrt[1 - x - 2 x^2])] -> 1 - 2 x + Sqrt[1 - x - 2 x^2]
fails (because apparently the expression -(-1 + 2 x) is ab initio converted to (1-2 x)).
What needs to be done, so that the intended conversion takes place?
Unfortunately, it would seem the apparent "automatic" conversion of $-(-1 + 2 x)$ to $(1-2 x)$ is not so "automatic" that it is performed in the formula for $r$ itself, which would obviate the apparent dilemma.
-(-1 + 2 x)
automatically transformed into(1 - 2 x)
. Did it happen with your expression also? If yes, the rule application is senseless. If not, there is something wrong with your code. May it be that a part of your expression was held? $\endgroup$HoldPattern
:c = HoldPattern[Sqrt[-(-1 + 2 x) (2 - x + 2 Sqrt[1 - x - 2 x^2])]] -> Sqrt[(1 - 2 x) (2 - x + 2 Sqrt[1 - x - 2 x^2])]
. However, I can't test it, sincer
is automatically converted. $\endgroup$