Using Assuming with Reduce
Assuming >> Details:
- Assuming affects the default assumptions for all functions that have an Assumptions option.
Assumptions
is not an option for Reduce
:
Options[Reduce]
{Backsubstitution -> False, Cubics -> False, GeneratedParameters -> C, Method -> Automatic, Modulus -> 0, Quartics -> False, WorkingPrecision -> ∞}
You can wrap Reduce
with FullSimplify
:
Assuming[w > 1/2 && P < 1, FullSimplify@Reduce[P + f (-1 + P) (-1 + 2 w) > 0]]
f (-1 + P + 2 w - 2 P w) < P
As mentioned by @kglr (+1) Reduce
will ignore the conditions in Assuming
but FullSimplify
will use them.
Composition[
MemberQ[Assumptions],
Keys,
Options
] /@ {Reduce, FullSimplify}
(* {False, True} *)
Another option would have been to incorporate your assumptions into the expression to Reduce
.
Reduce[
And @@ {
P + f (-1 + P) (-1 + 2 w) > 0,
w > 1/2,
P < 1
}
]
(* w > 1/2 && P < 1 && f < -(P/(1 - P - 2 w + 2 P w)) *)
There is a warning in the docs for FullSimplify
:
Some of the transformations used by
FullSimplify
are only generically correct.
It's also true for Simplify
(e.g. Simplify[Sin[Pi x]/x == 0, x ∈ Integers]
). Often one uses Reduce
to avoid such errors.
One way to introduce assumptions in Reduce
is to include them as constraints:
Assuming[w > 1/2 && P < 1,
Reduce[$Assumptions && P + f (-1 + P) (-1 + 2 w) > 0]]
(* w > 1/2 && P < 1 && f < -(P/(1 - P - 2 w + 2 P w)) *)