# Mathematica ignores my assumption when solving a qudratic equation

I try to solve the inequality $r-3t_0-2\sqrt{2 rt_0}<0$ with assumption that $0\leq r\leq 2t_0$. First, by observation, we can clearly see that if $r=0$, then clearly, this inequality holds. Then I use mathematica

Assuming[{t0 >= 0, r >= 0, r < 2*t0}, Simplify[Solve[r - 3*t0 - 2*Sqrt[2*r*t0] == 0, r]]]


The output is

(* Out: {{r -> (7 - 2 Sqrt[10]) t0}, {r -> (7 + 2 Sqrt[10]) t0}} *)


which is $r_1=(7-2\sqrt{10})t_0$ (which is positive) and $r_2=(7+2\sqrt{10})t_0$. This means, if $r_1<r<r_2$, then $r-3t_0-2\sqrt{2rt_0}<0$ will be true. But clearly $r=0$ will make $r-3t_0-2\sqrt{2rt_0}<0$ also true. Also, I feel that $(r-r_1)(r-r_2)$ does not give back my $r-3t_0-2\sqrt{2rt_0}$. Do I miss something?

• Have you tried Reduce ? Reduce[r - 3 t0 - 2 Sqrt[2 r t0] < 0, r, Reals] – JimB Jun 10 '18 at 5:13
• @JimB it gives '(t0 <= 0 && r < 7 t0 + 2 Sqrt[10] Sqrt[t0^2]) || (t0 > 0 && 0 <= r < 7 t0 + 2 Sqrt[10] Sqrt[t0^2])', which still does not make any sense. I don't think $r=7t_0+2\sqrt{10}t_0$ is a correct root – ftxx Jun 10 '18 at 5:28
• Assuming function is only appending to \$Assumptions, which is default value of Assumptions option for most functions that use it. Solve function does not have Assumptions option, so yes it is ignoring your assumptions, which might be surprising, but it is the documented behavior. – jkuczm Jun 10 '18 at 13:46
• For functions like Solve and Reduce, that don't take Assumptions option, assumptions should be put in logical conjunction in first argument. Reduce[r - 3*t0 - 2*Sqrt[2 r t0] < 0 && 0 <= r < 2 t0] (* t0 > 0 && 0 <= r < 2 t0 *) – jkuczm Jun 10 '18 at 13:47