# Testing an expression whether it is always negative given conditions

Suppose we have the following:

$$i(\gamma+\nu)[R s -1]$$

where $$i, \gamma, \nu, s > 0$$ and $$R\leq1$$ can we show/test that this will always be negative?

• R=1, s=2 as a counter example. Basically Rs>1 will work as a counter example. If you want the product be always negative, you need Rs<1 Jul 14 at 20:45

Clear["Global*"]

expr = i*(γ + ν)*(R*s - 1);

Assuming[{i > 0, γ > 0, ν > 0, s > 0, R <= 1},
Simplify[expr < 0]]

(* R s < 1 *)


Since this simplifies to a condition rather than True, it is not always negative. For example,

counterExamples =
FindInstance[{expr > 0, i > 0, γ > 0, ν > 0, s > 0,
R <= 1}, {i, γ, ν, s, R}, 3]

(* {{i -> 275, γ -> 58, ν -> 70, s -> 68,
R -> 87/103}, {i -> 17, γ -> 32, ν -> 10, s -> 7,
R -> 1}, {i -> 113, γ -> 12, ν -> 63, s -> 69, R -> 45/103}} *)


Verifying that these values make the expression positive

expr /. counterExamples

(* {204617600/103, 4284, 25441950/103} *)

• What about if we add the condition $s+i \leq1$
– Math
Jul 15 at 10:54
• Assuming[{i > 0, \[Gamma] > 0, \[Nu] > 0, s > 0, R <= 1, s + i <= 1}, Simplify[expr < 0]] evaluates to True and counterExamples = FindInstance[{expr >= 0, i > 0, \[Gamma] > 0, \[Nu] > 0, s > 0, R <= 1, s + i <= 1}, {i, \[Gamma], \[Nu], s, R}] returns an empty list. Both indicate that under the given constraints that the expression is always negative. Jul 15 at 13:34
expr = i*(γ + ν)*(R*s - 1);
ForAll[{i, R, s, γ, ν},
And @@ {i > 0, γ > 0, ν > 0, s > 0, R <= 1}, expr >= 0];
Resolve[%]


False`

• what about if we add the condition $s+i\leq1$? when I tried, it gave me a "true" output confirming it is always negative?
– Math
Jul 15 at 10:58