# Closed form for the maximum of the two-variable function $(a x + (1 - a) y) (b (1 - x) + (1 - b) (1 - y))$

Mathematics Asked on January 5, 2022

I’m trying to characterize the maximum of this function within the unit interval ($$x,yin [0,1]$$):

$$f(x,y)=(a x + (1 – a) y) (b (1 – x) + (1 – b) (1 – y))$$

for $$0 < a < 1$$ and $$0 < b < 1$$.

An observation is that each factor is a convex combination of $$x$$ and $$y$$.

By plotting the graph of $$f$$, I see that there is a unique maximum for any value in the range of $$a$$ and $$b$$. I have tried using Lagrange multipliers with no luck using the condition $$x+y-2=0$$. If $$g(x,y)=x+y-2$$, the Lagrange function is:

$$mathcal L(x,y) = f(x,y)+lambda,g(x,y)$$

I compute the gradient of $$mathcal L$$ and solve the system of equations:

$$nablamathcal L(x,y,lambda)=0$$

The solutions are:
$$x* = frac{4a – 3}{2 (2 a – 1)}$$
$$y* = frac{4a – 1}{2 (2 a – 1)}$$
$$lambda = frac{a-b}{2 (2 a – 1)}$$

In order for the condition to be active, $$lambda > 0$$, iff, $$1>a>b>frac{1}{2}$$ or $$frac{1}{2}>b>a>0$$ or $$1>b>frac{1}{2}>a>0$$ or $$1>a>frac{1}{2}>b>0$$

The objective function evaluated on the solution is:
$$f(x*, y*)=frac{1-2b}{4(1-2a)}$$

which is positive only if $$a,b>frac{1}{2}$$ or $$a,b.

I would conclude that the maximum would be

$$x* = frac{4a – 3}{2 (2 a – 1)}$$
$$y* = frac{4a – 1}{2 (2 a – 1)}$$

when $$1>a>b>frac{1}{2}$$ or $$frac{1}{2}>b>a>0$$. However, what is the expression of the maximum for the other cases of $$a$$ and $$b$$?

For, instance, I can clearly see in the plot that when $$a=1$$ and $$b=0$$, the maximum is $$(0, 1)$$ and when $$a=0$$ and $$b=1$$ the maximum is $$(1, 0)$$. And when $$a=b=frac{1}{2}$$, the maximum is the line $$y=1-x$$.

## Related Questions

### Is there a ‘geometric’ version of this derivation of the vorticity equation?

1  Asked on January 24, 2021 by calvin-khor

### Does $f(x)=f(1/x) forall x$ put any restrictions on the derivative of $f$?

2  Asked on January 24, 2021 by user106860

### Convergence of $sum_{n=1}^{+infty}ntan left( frac{pi}{2^{n+1}}right )$

2  Asked on January 24, 2021 by dzamba

### Bijective coding of general graphs (like Prüfer code but not for trees)

1  Asked on January 24, 2021 by alagris

### A Partial Integral Equation

0  Asked on January 24, 2021 by zerox

### Every Closed Set In $R^1$ is intersection of countable collection of open set.

2  Asked on January 24, 2021 by idontknow

### Partial Derivatives : Given $f(x) = Ax^3 + By^3 – Cx – Dy + E$

1  Asked on January 24, 2021 by tahoh

### Using Argument principle to find roots of complex polynomial. Studying for qualifying exam

0  Asked on January 24, 2021 by machine-learner

### How to say limit of this expression is finite

1  Asked on January 24, 2021 by user587389

### On the Fourier transform of $frac{1}{|x|_2^alpha}1_{|x|_infty>1}$

1  Asked on January 23, 2021 by kernel

### Solving inequality including logarithm

1  Asked on January 23, 2021 by damian-kowalski

### What’s the difference between a Singleton set and its member?

2  Asked on January 23, 2021 by richard-bamford

### Let $f:ℝ→ℕ$ be onto. Does there exist a $g:ℕ→ℝ$ such that $f(g(b))=b$ for all $b∈ℕ$?

2  Asked on January 23, 2021

### $dy/dt$ = 0.8y with y(0) = -0.8 , why does the result of this question end up being so different from the formula?

1  Asked on January 23, 2021 by goro1

### Does $prod_k (x – r_k)^{m_k} = prod_k (1 – frac{x}{r_k})^{m_k}$?

1  Asked on January 23, 2021 by novice

### $pi_2(T vee mathbb{C}P^2)$ and action of $pi_1$ on $pi_2$

1  Asked on January 23, 2021 by urbanog

### Solving $a=x^p – (x-b)^p$ for arbitrary $a,b$, and $p$ being natural/rational?

0  Asked on January 23, 2021 by kristof-spenko

### Sylow’s second theorem explanation

1  Asked on January 23, 2021 by pritam

### Mathematical terminology

0  Asked on January 23, 2021 by jeremys