# Ask for a proof of an upper bound

Assume $a,b\in[0,1]$, by Matlab simulation it seems that the upper bound of $a(1-b)+b(1-a)$ is 1. But I don't know how to prove it, could you please help me with it? Thanks a lot!

-

It’s useful to know that if $x,y\in\Bbb R^n$, $\{\lambda x+(1-\lambda)y:0\le\lambda\le 1\}$ is the closed line segment with endpoints $x$ and $y$: as $\lambda$ runs over the interval from $0$ to $1$, $\lambda x+(1-\lambda)y$ runs from $y$ to $x$. In particular, this is true when $n=1$. Thus, if you hold $a$ fixed and vary $b$ over $[0,1]$, the quantity $(1-b)a+b(1-a)$ ranges from $a$ (when $b=0$) to $1-a$ (when $b=1$) as $b$ runs from $0$ to $1$, and its maximum is therefore the larger of $a$ and $1-a$.

In turn, $\max\{a,1-a\}$ is maximized (for $a\in[0,1]$) when $a$ is either $1$ or $0$, and in either case $\max\{a,1-a\}=1$. Thus,

$$\max_{a,b\in[0,1]}\big((1-b)a+b(1-a)\big)=\max_{a\in[0,1]}\max\{a,1-a\}=1\;.$$

-
wonderful!______ –  Zhou Heng Jan 22 '13 at 3:41
@ZhouHeng: Glad it helped. –  Brian M. Scott Jan 22 '13 at 3:44

Here, $a(1-b)$ is the area of the region $I$,and $b(1-a)$ is the area of the region $IV$. Since area of the region $I+IV\leq$ area of the whole square which is equal to 1, therefore, $a(1-b)+b(1-a)\leq 1$, equality holds when exactly one of them is $1$ and other $0$

-
Nice solution!${}{}{}$ –  André Nicolas Jan 22 '13 at 4:04

Let $f(a,b)=a(1-b)+b(1-a)=a+b-2ab$. Then $$2f(a,b)=2a+2b-4ab=1-(1-2a)(1-2b).$$ To maximize this, we need to minimize $(1-2a)(1-2b)$. Note that in our interval, $|1-2a||1-2b|\le 1$. So the minimum is reached when $(1-2a)(1-2b)=-1$, which happens when $a=1$, $b=0$ and $a=0$, $b=1$.

So the maximum of $2f(a,b)$ is $2$.

-
Thank you!_____ –  Zhou Heng Jan 22 '13 at 3:47

Define a function $\,f(x):=x(1-b)+b(1-x)\,\,,\,x\in [0,1]\,$ , then

$$f(x)=(1-2b)x+b\,\,,\,\,\text{so}:$$

\begin{align*}(1)&\;b<\frac{1}{2}:\Longrightarrow\;f(x)\,\,\text{is an increasing line, with maximum at}\,\,f(1)=1-2b+b=1-b\leq 1\\(2)&\;b\geq\frac{1}{2}:\Longrightarrow f(x)\,\,\text{is a non-increasing line with maximum at}\,\,f(0)=b\leq 1\end{align*}

Thus, anyway you get $\,f(x)\leq 1\,$

-