Wrong root when using numerical values

I have the following inequality:

$$\sqrt{\frac{a}{2x}}+ \frac{b}{1-\frac{a}{a+\sqrt{a(2bx + a)}}} + \frac{a}{2x\frac{a}{a+\sqrt{a(2bx + a)}}\left(1-\frac{a}{a+\sqrt{a(2bx + a)}}\right)} < f$$ on the domain $a>\ln(2)$, $b > 0$, $0 < f < 1$, $x > 1$. Let's call the l.h.s. the "quantity of interest". I want to solve it for $x$.

I use Reduce:

Reduce[{Sqrt[a/(2 x)] +
b/(1 - a/(a + Sqrt[a (2 x b + a)])) +
a / (2 x (a/(a + Sqrt[a (2 x b + a)])) (1 - a/(a + Sqrt[a (2 x b + a)]))) < f,
a > Log[2], 0 < f < 1, 0 <= b, x >= 1}, x]


And get:

0 < f < 1 && 0 <= b < f && a > Log[2] &&
x > Root[-8 a^3 + (a^2 - 16 a^2 b + 8 a^2 f +
16 a^2 f^2) #1 + (-4 a b^2 + 8 a b f - 16 a b^2 f - 4 a f^2 +
32 a b f^2 - 16 a f^3) #1^2 + (4 b^4 - 16 b^3 f +
24 b^2 f^2 - 16 b f^3 + 4 f^4) #1^3 &, 3]


Let's call the Root[....] expression the "implicit root expression". Let's now find an explicit expression for this root (which one can check is real)

FullSimplify[
Root[-8 a^3 + (a^2 - 16 a^2 b + 8 a^2 f +
16 a^2 f^2) #1 + (-4 a b^2 + 8 a b f - 16 a b^2 f - 4 a f^2 +
32 a b f^2 - 16 a f^3) #1^2 + (4 b^4 - 16 b^3 f +
24 b^2 f^2 - 16 b f^3 + 4 f^4) #1^3 &, 3]]]


We get:

(1/(96 (b - f)^4))(32 a (b - f)^2 (1 + 4 f) + (8 I (I + Sqrt[3]) a^2 (b - f)^4
(48 b + (1 + 4 f)^2))/(12 Sqrt[3] Sqrt[a^6 (b - f)^12 (-1 + 2 b + 2 f)^2
(27 b^2 - f^2 (1 + 16 f) - b (1 + 18 f))] + a^3 (b - f)^6 (-1 - 12 f +
8 (27 b^2 + (21 - 8 f) f^2 + 18 b (1 + f))))^(1/3) - 8 (1 + I Sqrt[3])
(12 Sqrt[3] Sqrt[a^6 (b - f)^12 (-1 + 2 b + 2 f)^2 (27 b^2 - f^2 (1 + 16 f) -
b (1 + 18 f))] + a^3 (b - f)^6 (-1 - 12 f + 8 (27 b^2 + (21 - 8 f) f^2
+ 18 b (1 + f))))^(1/3))


Let's call this expression the "explicit root expression".

One could simplify by hand further, but let's not do it now (I did it by hand, and then also tried with the simpler expression, but the result doesn't change).

Assume now that we somehow got some specific values for a, b, and f and we want to find x. Specifically: a = Log[20], b = 0.00672874, and f = 0.03.

If I replace these values in the explicit root expression, we get:

2144.31 - 1.47874*10^-12 I


Ok, let's assume that the very small imaginary part is actually 0, as it should be. We have then that, according to the result of the first Reduce, if we have x > 2144.31, then the quantity of interest should be $<f$. But if we plug 2145 and the fixed values for a, b, and f in the quantity of interest, Mathematica returns:

0.0391055


which is not < 0.03.

Let's do a different check then, and plug the values for a,b, and f in the implicit root expression. Mathematica returns

4030.04


and indeed, if we evaluate the quantity of interest for 4031, we get

0.0299971


which is smaller than 0.03, as requested.

Am I doing something wrong when calling ToRadicals or FullSimplify or something else? Is it a precision problem?

• You shouldn't believe that the number of a given root is independent on its parameters. This is the basic reason for your confussion. See for example: Finding parameters making real part of eigenvalues vanish or find where 3 inequalities are simultaneously greater than zero Nov 30, 2015 at 8:56
• There is another post discussing this critical issue: Strange behavior of Reduce with a cubic equation. Nov 30, 2015 at 9:00
• @artes : Thank you for the pointers, I didn't know that. If you want to transform your comments to an answer, I'll be glad to accept it. Nov 30, 2015 at 15:12
• ToRadicals cannot make a choice consistent with Root in the presence of parameters (that is to say, for some values of parameters the result might correspond to a different Root solution for the same equation). This is discussed under "Possible Issues" on the refguide page for ToRadicals. Nov 30, 2015 at 16:35
• @Matteo I recommend to answer your own question so that you will understand the issue thoroughly. Nov 30, 2015 at 16:56

The issue is that toRadicals may not return an expression equivalent to the Root object when this contains parameters. This is more or less what the documentation of toRadicals also says, without further details. Rather, toRadicals will return a different root of the same equation.
More precisely, this seems to be more a limitation of Root that it is exposed by toRadicals than an actual issue with toRadicals: the order of the roots of a parametrized equation depends on the value of the parameters, so Root assigns a somewhat arbitrary order, which is then picked up by toRadicals.