# Problem involving many squares and several variables.

Let $a, b, c, d, e, f$ be nonnegative real numbers such that

• $a^2 + b^2 + c^2 + d^2 + e^2 + f^2 = 6$.
• $ab + cd + ef = 3$.
• What is the maximum value of $a+b+c+d+e+f$ ?.

I was thinking about somehow manipulating the numbers to get $\left(a + b + c + d + e + f\right)^{2}$, but I don't really know what to do.

• It seems the maximum is $6$ for $a=b=c=d=e=d=f=1$.
– msm
Commented Sep 30, 2016 at 22:04
• can you please explain who the maximum would be 6? and not any other number? Commented Sep 30, 2016 at 22:05

Since this is labeled pre-calculus here is a solution not involving calculus:

\begin{eqnarray} (a+b)^2+(c+d)^2+(e+f)^2&=&a^2+2ab+b^2+c^2+2cd+d^2+e^2+2ef+f^2\\ &=&6+2(3)\\&=&12 \end{eqnarray}

Because of symmetry the maximum will occur when each of $(a+b),\,(c+d)$ and $(e+f)$ equals $2$ so the maximum value of $a+b+c+d+e+f$ is $6$.

Suppose we have $p>0$ and

$$p^2+p^2+p^2=3p^2$$

and for $\alpha\beta\gamma\ne0$

$$(p+\alpha)^2+(p+\beta)^2+(p+\gamma)^2=3p^2\tag{1}$$

Then we will show that $$(p+\alpha)+(p+\beta)+(p+\gamma)< p+p+p$$

With a bit of algebra equation (1) becomes$$\alpha+\beta+\gamma=-\dfrac{\alpha^2+\beta^2+\gamma^2}{2p}$$

So we have that $$(p+\alpha)+(p+\beta)+(p+\gamma)=3p-\dfrac{\alpha^2+\beta^2+\gamma^2}{2p}<p+p+p$$

• How does that symmetry argument work? I can see that you can't distinguish between $a+b$, $c+d$ and $e+f$, but why can't they be 0, 0 and $\sqrt{12}$ (in any order)? Commented Oct 1, 2016 at 18:01
• I will edit my answer to include that. @LinAlg Commented Oct 1, 2016 at 18:59

First we can set up the problem as $$\max_{a, b, \dots, f} a+ b +c + d+ e + f$$ s.t. $$a^2 + b^2 + c^2 + d^2 + e^2 + f^2 + ab + cd + ef = 9$$ and then form the Lagrangian:$$\mathcal{L} = a+ b +c + d+ e + f - \lambda(a^2 + b^2 + c^2 + d^2 + e^2 + f^2 + ab + cd + ef - 9)$$

Which yields the following first order conditions:

$$1 = \lambda(2a + b)$$$$1 = \lambda(2b + a)$$$$1 = \lambda(2c + d)$$$$1 = \lambda(2d + c)$$$$1 = \lambda(2e + f)$$$$1 = \lambda(2f + e)$$

Taking the first two as an example and dividing through yields $$1 = \frac{2a+b}{2b+a} \Rightarrow 2b + a = 2a + b\Rightarrow b = a$$

The same procedure for the others yeilds $c=d$ and $e=f$.

Now, since all the variables are nonnegative and $ab + cd + ef = 3$, it must be that $a=b=c=d=e=f=1$ must be the max. This is the only way to get $x^2 + y^2 + z^2 = 3$ for any nonnegative variables $x,y,z$

I would formulate the problem as follows:

$\max_{a,b, \cdots, f} a+b+c+d+e+f$ s.t. $a^2+b^2+c^2+d^2+e^2+f^2 = 6$ and $ab+cd+ef = 3$

Then form the Lagrangian $\mathcal{L} = a+b+c+d+e+f -\lambda_1(a^2+b^2+c^2+d^2+e^2+f^2 - 6) -\lambda_2(ab+cd+ef - 3)$

Next set $\frac{\partial \mathcal{L}}{\partial a} = \frac{\partial \mathcal{L}}{\partial b} = \cdots = \frac{\partial \mathcal{L}}{\partial f} = 0$

You will get three identical pairs of equations: one for $a,b$, one for $c,d$ and one for $e,f$.

Just solve one pair (say for $a,b$) and conclude that $a=b$

Then $a=b=c=d=e=f$ follows and the maximum value is $6$

Here are provided both a Calculus of Variations and a Pre-calculus approach.

We want to maximize $$a+b+c+d+e+f\tag{1}$$ under the constraint that $$a^2+b^2+c^2+d^2+e^2+f^2=6\tag{2}$$ and $$ab+cd+ef=3\tag{3}$$ Calculus of Variations Approach

We want $$\delta a+\delta b+\delta c+\delta d+\delta e+\delta f=0\tag{4}$$ for every variation so that $$a\,\delta a+b\,\delta b+c\,\delta c+d\,\delta d+e\,\delta e+f\,\delta f=0\tag{5}$$ and $$a\,\delta b+b\,\delta a+c\,\delta d+d\,\delta c+e\,\delta f+f\,\delta e=0\tag{6}$$ Linearity says that we need $\lambda$ and $\mu$ so that $$\lambda a+\mu b=\lambda b+\mu a=\lambda c+\mu d=\lambda d+\mu c=\lambda e+\mu f=\lambda f+\mu e\tag{7}$$ If $\lambda=\mu$, then we need only have $$a+b=c+d=e+f\tag{8}$$ If $\lambda\ne\mu$, then we need $$a=b=c=d=e=f\tag{9}$$ Since $(9)\implies(8)$, we will only assume $(8)$. Add twice $(3)$ to $(2)$ and we get that $$(a+b)^2+(c+d)^2+(e+f)^2=12\tag{10}$$ and since $(8)$ says that each summand in $(10)$ is equal, we get $$|a+b|=|c+d|=|e+f|=2\tag{11}$$ Trying all sign combinations of $(11)$, we get the maximum of $(1)$ to be $$\bbox[5px,border:2px solid #C0A000]{a+b+c+d+e+f=6}\tag{12}$$

Pre-calculus Approach

If we subtract twice $(3)$ from $(2)$, we get $$(a-b)^2+(c-d)^2+(e-f)^2=0\tag{13}$$ which implies that $a=b$, $c=d$, and $e=f$. Thus, $(13)$ reduces the problem to maximizing $$a+c+e\tag{14}$$ under the constraint that $$a^2+c^2+e^2=3\tag{15}$$ Furthermore, \begin{align} (a+c+e)^2 &=a^2+c^2+e^2+2ac+2ce+2ea\\ &=3a^2+3c^2+3e^2-(a-c)^2-(c-e)^2-(e-a)^2\\[3pt] &\le9\tag{16} \end{align} Since $a=c=e=1$ gives $a^2+c^2+e^2=3$ and $(a+c+e)^2=9$, we get the maximum of $(14)$ to be $$a+c+e=3\tag{17}$$ and, because of $(13)$, the maximum of $(1)$ to be $$\bbox[5px,border:2px solid #C0A000]{a+b+c+d+e+f=6}\tag{18}$$