# Upper and lower bounds on difference of bounded variables

I have the following equations and inequalities:

$$1 = A' + B'$$

$$1 = A + B + C$$

$$A \le A'$$

$$B \le B'$$

All variables are bounded below by zero and above by one.

I wonder if I can find an analytic expression for the upper and lower bounds for the difference $$A'(1 - C) - A$$. The Monte-Carlo experiment shows that it can be either positive or negative:

Image

and it seems like there are some nice looking bounding curves.

First note $$A'(1-C)-A=A'(A+B)-A$$.
For the upper bound clearly we need to take $$A=0$$, $$B=B'$$ and $$C=A'$$. In which case the problem comes down to finding the maximum value of $$A'B'=A'-A'^{2}$$ which is obtained if $$A'=\frac{1}{2}$$ so an upper bound is $$\frac{1}{4}$$. For a lower bound clearly we need to take $$A=A'$$, $$B=0$$ and $$C=B'$$, so we have to find the minimum value of $$A^{2}-A$$ for $$0\leq A\leq 1$$, which is obtained if $$A=\frac{1}{2}$$. So a lower bound is $$-\frac{1}{4}$$.
So $$-\frac{1}{4}\leq A'(1-C)-A\leq\frac{1}{4}$$.