First thing to consider with such a convoluted expression is that there are many equivalent forms of it. FullSimplify
, espectially with assumptions (or Assuming
) can considerably reduce the size of output.
Some examples, although by any means all the flexibility, are represented below.
First, let's define a function which formats Boolean equations, rewritten into disjunctive normal form, with "simplest" forms first. Every row represents one item in Or
($a\lor b\lor c\lor\ldots$).
ClearAll[prettyDNF];
prettyDNF[eqns_] :=
TraditionalForm@
Column[SortBy[
List @@ (FullSimplify /@
BooleanMinimize[eqns, "DNF"]),
LeafCount],
Dividers -> All]
A simple example:
prettyDNF[a || b && c]
$$\begin{array}{|l|}
\hline
a \\
\hline
b\land c \\
\hline
\end{array}$$
Now you can show your output in slightly more understandable form:
prettyDNF[
FullSimplify@
Reduce[(2*a*p*r*F - a*p^2)/((2*a + 2)*r^2*F^2 + (-2*a - 4)*p*r*F + 2*p^2) < 0]]
$$\begin{array}{|l|}
\hline
F\in \mathbb{R}\land p\neq 0\land
r=0\land a>0 \\
\hline
a>0\land F\leq 0\land p>0\land r>0 \\
\hline
F\geq 0\land p<0\land a>0\land r>0 \\
\hline
F\geq 0\land r<0\land a>0\land p>0 \\
\hline
p<0\land r<0\land a>0\land F\leq 0 \\
\hline
F>0\land p>0\land r<0\land p<(a+1) F r
\\
\hline
F>0\land p<0\land r>0\land (a+1) F r<p
\\
\hline
a<0\land r>0\land F r<p\land p<2 F r
\\
\hline
a<0\land r>0\land 2 F r<p\land p<F r
\\
\hline
a<0\land r<0\land p<F r\land 2 F r<p
\\
\hline
F<0\land p>0\land r>0\land p<(a+1) F r
\\
\hline
F<0\land p<0\land r<0\land (a+1) F r<p
\\
\hline
a<0\land a+1>\frac{p}{F r}\land
p>0\land r>0 \\
\hline
a<0\land p<0\land r<0\land
a+1>\frac{p}{F r} \\
\hline
a<0\land 2 F<\frac{p}{r}\land
F>\frac{p}{r}\land p>0 \\
\hline
F<\frac{p}{r}\land a+1>\frac{p}{F
r}\land 2 F>\frac{p}{r} \\
\hline
2 F<\frac{p}{r}\land a+1>\frac{p}{F
r}\land F>\frac{p}{r} \\
\hline
a+1<\frac{p}{F r}\land 2
F<\frac{p}{r}\land a>0\land p>0\land
r>0 \\
\hline
a+1<\frac{p}{F r}\land 2
F<\frac{p}{r}\land p<0\land r<0\land
a>0 \\
\hline
a+1<\frac{p}{F r}\land p<0\land
a>0\land 2 F>\frac{p}{r}\land r>0 \\
\hline
a+1<\frac{p}{F r}\land r<0\land
a>0\land 2 F>\frac{p}{r}\land p>0 \\
\hline
\end{array}$$
If you can use assumptions on your variables (let's assume F > 0
), it may reduce number of forms radically:
Assuming[F > 0,
prettyDNF[
FullSimplify@
Reduce[(2*a*p*r*F - a*p^2)/((2*a + 2)*r^2*F^2 + (-2*a - 4)*p*r*F + 2*p^2) < 0]]]
$$\begin{array}{|l|}
\hline
p<0\land a>0\land r>0 \\
\hline
r<0\land a>0\land p>0 \\
\hline
p\neq 0\land r=0\land a>0 \\
\hline
a<0\land p<F r\land 2 F r<p \\
\hline
a<0\land F r<p\land p<2 F r \\
\hline
a+1<\frac{p}{F r}\land p<0\land r>0 \\
\hline
a+1<\frac{p}{F r}\land r<0\land p>0 \\
\hline
a<0\land a+1>\frac{p}{F r}\land
p>0\land r>0 \\
\hline
a<0\land p<0\land r<0\land
a+1>\frac{p}{F r} \\
\hline
a+1<\frac{p}{F r}\land 2
F<\frac{p}{r}\land a>0 \\
\hline
F<\frac{p}{r}\land a+1>\frac{p}{F
r}\land 2 F>\frac{p}{r} \\
\hline
\end{array}$$
Also, there may be other rewriting methods than FullSimplify
with Assuming
. For instance, cylindrical algebraic decomposition (which may a have more intuitive geometric formulation) can be used on polynomials:
ClearAll[prettyDNF2];
prettyDNF2[eqns_] :=
TraditionalForm@
Column[SortBy[List @@
BooleanMinimize[eqns, "DNF"],
LeafCount],
Dividers -> All]
Assuming[F > 0,
prettyDNF2[
Refine@CylindricalDecomposition[
(2*a*p*r*F - a*p^2)/((2*a + 2)*r^2*F^2 + (-2*a - 4)*p*r*F + 2*p^2) < 0,
{F, r, p, a}]]]
$$\begin{array}{|l|}
\hline
r=0\land a>0\land p>0 \\
\hline
r=0\land p<0\land a>0 \\
\hline
p<0\land a>0\land r>0 \\
\hline
r<0\land a>0\land p>0 \\
\hline
F r<p<2 F r\land a<0\land r>0 \\
\hline
2 F r<p<F r\land a<0\land r<0 \\
\hline
a<\frac{p-F r}{F r}\land p<0\land r>0
\\
\hline
a<\frac{p-F r}{F r}\land r<0\land p>0
\\
\hline
0<a<\frac{p-F r}{F r}\land p>2 F
r\land r>0 \\
\hline
0<a<\frac{p-F r}{F r}\land p<2 F
r\land r<0 \\
\hline
0<p<F r\land \frac{p-F r}{F
r}<a<0\land r>0 \\
\hline
F r<p<0\land \frac{p-F r}{F
r}<a<0\land r<0 \\
\hline
F r<p<2 F r\land a>\frac{p-F r}{F
r}\land r>0 \\
\hline
2 F r<p<F r\land r<0\land a>\frac{p-F
r}{F r} \\
\hline
\end{array}$$
EDIT:
Some eye candy for two-dimensional toy case, for demonstration of the fact visualization is a very good way to make inequalities intuitive in two-dimensional cases:
Module[{eqns, sols},
eqns = x^2 + y^2 < 1 && x^2 + (y - 1/2)^2 > 1/2 && ! (0 < y - x/2 < 1/4);
sols = Assuming[(x | y) \[Element] Reals,
FullSimplify[List @@ BooleanMinimize[Reduce@eqns, "DNF"]]];
RegionPlot[sols, {x, -1, 1}, {y, -1, 1},
PlotPoints -> 100, PlotLegends -> "Expressions"]]
Same with GenericCylindricalDecomposition
, which generates only fully dimensional regions:
Module[{eqns, sols},
eqns = x^2 + y^2 < 1 && x^2 + (y - 1/2)^2 > 1/2 && ! (0 < y - x/2 < 1/4);
sols = List @@
BooleanMinimize[
First@GenericCylindricalDecomposition[eqns, {x, y}], "DNF"];
RegionPlot[sols, {x, -1, 1}, {y, -1, 1},
PlotPoints -> 100, PlotLegends -> "Expressions"]]
It's worth noting the order of decomposition affects formulation of regions.
BooleanConvert[ ]
andLogicalExpand[ ]
are sometimes useful to flatten the nested conditions. That doesn't mean that the expression will be "easy" to read, but at least you may focus in one condition at a time $\endgroup$LogicalExpand@ Reduce[(2*a*p*r*F - a*p^2)/((2*a + 2)*r^2*F^2 + (-2*a - 4)*p*r*F + 2*p^2) < 0, Reals]
$\endgroup$