Let \[ f(x_1,x_2,x_3,x_4,x_5,x_6,x_7)=x_1x_2x_4+x_2x_3x_5+x_3x_4x_6+x_4x_5x_7+x_5x_6x_1+x_6x_7x_2+x_7x_1x_3 \]be defined for non-negative real numbers $x_1,x_2,\dots,x_7$ with sum $1$.
Prove that $f(x_1,x_2,\dots,x_7)$ has a maximum value and find that value.
hello, what about $\frac{1}{27}$ it is $\frac{1}{3^3}$? and \[x_1=x_2=x_4=\frac{1}{3}\]and the other variables are zero.
Sonnhard.
Please be more judicious with your $\LaTeX$. Display equations are not necessary just to display a fraction ~dj
I think that the idea is to consider how adding more and more non-zero terms will always decrease the sum and this shows that the maximum is achieved at 3 non-zero terms
In this solution I will refer to $x_ix_{i+1}x_{i+3}$ as triples where i is an integer between 1 and 7 and indices are taken mod 7
The first observation to make is that for each individual term it is paired with each of the other terms in a triple exactly once.
Take $x_1$ for example. Let's look at all the terms that contain an $x_1$ which are $x_1x_2x_4, x_5x_6x_1, x_7x_1x_3$ and notice how $x_1$ is only paired with each of the other 6 terms once in 3 triples.
This is also true for $x_i$ where i is an integer between $1$ and $7$ and indices are taken mod 7. Notice that the triples containing $x_i$ would be $x_ix_{i+1}x_{i+3}, x_ix_{i-2}x_{i-3}, x_ix_{i-1}x_{i+2}$ and notice that $i+1, i+3, i-2, i-3, i-1, i+2$ are all distinct mod 7.
Clearly, the sum will be equal to 0.
Now, say we have 4 non-zero terms, call them $x_a, x_b, x_c, x_d$
Then there is at most one triple which is non-zero. Let's say WLOG that $x_ax_bx_c$ is a triple. Now, if there existed a triple that is nonzero that contained $x_d$ then it must contain at least 2 of $x_a, x_b, x_c$ but this is impossible based on our first observation. So, the only non-zero triple is $x_ax_bx_c$ where $x_a+x_b+x_c = 1-x_d < 1$ which means $x_ax_bx_c < \frac{1}{27}$
Now we move onto the 5 non-zero term case. Let the five non-zero indices be $x_a, x_b, x_c, x_d, x_e$ shortened as $a,b,c,d,e$ for convenience.
First, it is easy to see that the maximum number of non-zero triples we can have is 2. If we WLOG let $abc$ be a nonzero triple then the second triple must contain $d$ and $e$ as outlined in the 4 non-zero case. Then, the third part of the second triple must be taken from $a,b,c$ so WLOG let the third part of the triple be $c$. Then the first triple is $abc$ and the second is $cde$. Now, it is impossible to choose 3 elements in $a,b,c,d,e$ such that no 2 of them have already been in the same triple.
So now we want to maximize $abc+cde = c(ab+de)$ when $a+b+c+d+e = 1$
If we assume that $c,d,e$ are fixed and that $a,b$ were varying then note the max of $ab$ happens when $a=b$ so we may conclude that $a=b$. Similarly we conclude that $d=e$.
Now, we want to maximize $c(a^2+d^2)$ where $2a+c+2d = 1$
Now notice that $a^2+d^2 = \frac{c^2-2c+1}{4} - 2ad$
If we replace this into the expression we see that we want to maximize $\frac{c^3-2c^2+c}{4} - 2acd$
Let $f(c) = c^3-2c^2+c$. Then
$$f'(c) = 3c^2 - 4c + 1 = (3c-1)(c-1)$$so it has either a local max or min at $c = \frac{1}{3}, 1$ but
$$f''(c) = 6c-4$$This is concave down at $c = \frac{1}{3}$ and concave up at $c=1$. Thus, $c$ has a local maximum at $\frac{1}{3}$
Then $f(\frac{1}{3}) = \frac{4}{27}$
But this means $\frac{c^3-2c^2+c}{4} - 2acd < \frac{c^3-2c^2+c}{4} \le \frac{1}{27}$. Yay
We can WLOG assume that the zero term is $x_7$.
Let $x_1 = a, x_2 = b, x_3 = c, x_4=d, x_5=e, x_6 = f$ for the convenience of my writing. We are trying to maximize
$abd+bce+cdf+efa$ where $\sum_{cyc} a = 1$
Now we will proceed with Lagrange Multipliers
(If the following seems to not make much sense then please refer to this handout: http://www.mit.edu/~evanchen/handouts/LM/LM.pdf)
So we let $f(a,b,c,d,e,f) = abd+bce+cdf+efa$ and let $g(a,b,c,d,e,f) = a+b+c+d+e+f$ Notice that
$$\nabla g = <1,1,1,1,1,1> \neq \vec{0}$$. Now let $U = (0,1)^6$ and then $\overline{U} = [0,1]^6$ where $\overline{U}$ is a closed set containing $U$.
Since $\overline{U}$ is bounded then the constraint set
$$\overline{S} = \{\textbf{x} \in \overline{U}: g(\textbf{x}) = 1\}$$is compact
Normally, we would have to check edge cases. But if $\textbf{x}$ did lie on an edge then it would have to have one of it's components equal to 0 which is not true right now.
So now we can apply Lagrange Multipliers
Note that $\nabla f(a,b,c,d,e,f) = (bd+ef, ad+ec, be+df, ab+cf, bc+fa, cd+ea) = \lambda \nabla g(a,b,c,d,e,f) = \lambda <1,1,1,1,1,1>$
Thus $bd+ef = ad+ec = be+df = ab+cf = bc+fa = cd+ea$
Now note that $bd+ef = be+df \implies b(e-d) = f(e-d)$ so either we have $e=d$ or $b=f$ or both.
Now, let's assume $d = e$ and $b \neq f$ Then notice $bc+fa = ab+cf$ or $b(a-c) = f(a-c) \implies a=c$
Then replace the c's with a's and f's with e's. Then by the first and fourth equation we have $e(b+f) = a(b+f)$ We know that both $b$ and $f$ are positive so $b \neq -f$ so $a=e$ which means $a=c=d=e$
Now replacing all $a,c,d,e$ with $a$ and comparing the first and second equation we get $(b+f)a = 2a^2$ and since $a \neq 0, b+f = 2a$
But $a+b+c+d+e+f = 6a = 1$ so $a =c=d=e = \frac{1}{6}$ at the maximum
Plugging this into $f$ gives $\frac{2d+2b}{36} = \frac{\frac{2}{3}}{36} = \frac{1}{54} < \frac{1}{27}$
If we had instead let $b=f$ in the first equation we still would have gotten $a=b=c=f$ and $d+e = 2a$ which would lead to the result.
Again, for the sake of convenience $x_1 = a$ and etc.
Again we will proceed with Lagrange multipliers (for which I will write down the constraints for practice's sake)
Lagrange Multiplier ConstraintsWe define $f(a,b,c,d,e,f,g) = abd+bce+cdf+deg+efa+fgb+gac$ and $g(a,b,c,d,e,f,g) = a+b+c+e+f+g$ (hmm abuse of variables much)
Note that $\nabla g = <1,1,1,1,1,1,1> \neq \textbf{0}$ ever and also note that $f$ and $g$ are continuous as are their partial derivatives
Now, define $U = (0,1)^7$ and $\overline{U} = [0,1]^7$ Since $\overline{U}$ is closed and bounded the constraint set
$$S = \{\textbf{x} \in \overline{U}: g(\textbf{x}) = 1 \}$$is compact, implying that it has a global maximum somewhere within it and let's call this maximum $\textbf{x}$
Again, we don't need to check edge cases because this assumes that a component in $\textbf{x}$ is zero but all the components are non-zero in this case.
$\nabla f = <bd+ef+gc, ad+ce+fg, be+df+ga, ab+cf+eg, bc+dg+fa, cd+ea+gb, de+fb+ac> = \lambda <1,1,1,1,1,1,1>$
So basically
$bd+ef+gc = ad+ce+fg = be+df+ga = ab+cf+eg = bc+dg+fa = cd+ea+gb = de+fb+ac$
Now since the original equation is cyclic we can WLOG say $c \ge b \ge f \ge a \ge g \ge d \ge e > 0$
Now subtract the second equation from the first and factor out to get
$$d(b-a) + e(f-c) + g(c-f) = d(b-a) + (c-f)(g-e) \ge 0 = 0$$. Thus, equality holds when $b=a$ and either $c=f$ or $g=e$
Now subtract the third equation from the second equation
$$e(c-b) + d(a-f) + g(f-a) = e(c-b)+(g-d)(f-a) \ge 0 = 0$$
The equality holds when $c=b$ and either $g=d$ or $f=a$
Regardless, $a=b=c$. Now the 2 results imply that either $a=b=c=f$ or $g=d=e$
Case 1: a=b=c=fThen plug this back into the original equation replacing all the $b,c,f$ with $a's$ and we get $a^2d + a^2e + a^2d + deg + a^2e+a^2g+a^2g = 2a^2(d+e+g)+deg$
Again, holding $a$ constant it's easy to see that this is maximized when $d=e=g$ as $d+e+g$ would be constant if $a$ was constant
Thus, replace all $e,g$ with $d$ to get $6a^2d + d^3$ and $3a+4d = 1$. This calls for more lagrange multipliers
More Lagrange Multiplier ConstraintsLet $f(a,d) = 6a^2d+d^3$ and $g(a,d) = 3a+4$ These are both continuous and their partial derivatives are continuous
Now let $U = (0,1)^2$ and $\overline{U} = [0,1]^2$ and then the constraints set $S$ is compact where
$$S = \{\mathbf{x} \in \overline{U}: g(\textbf{x}) = 1\}$$
Since neither are 0 we don't need to check edge cases.
So now $\nabla f = <12ad, 6a^2+2d^2> = \lambda <3,4>$
thus $\frac{12ad}{6a^2+2d^2} = \frac{3}{4}$ or $8ad = 3a^2+d^2 \implies (2a-d)^2-a^2 = 0 \implies (3a-d)(a-d) = 0$
So either $a = \frac{d}{3}$ or $a=d$ but from our ordering we have $a \ge d$ so $a > \frac{d}{3}$ which doesn't work. Thus $a=d$
If $a = d$ then $a=b=c=d=e=f=g=\frac{1}{7}$ giving an answer of $\frac{1}{49} < \frac{1}{27}$
Case 2: a=b=c, d=e=gNote that we still have $a=b=c$
Now we plug this back into the original equation with all the bs and cs replaced with as and all the es and gs replaced with ds.
$a^2d+a^2d+adf+d^3+adf+adf+a^2d = d^3+3a^2d+3adf$
Now notice this is $d^3 + 3ad(a+f)$ If $d$ is held constant then $a+f$ is also constant so in order to maximize the expression we are looking to maximize $a$. But remember that from the ordering we had $f \ge a$. Thus, $a$ achieves a maximum when $a=f$
Thus this is $a=b=c=f$ and $d=e=g$ and we can finish with Case 1.
So we have shown that if there are more than 3 non-zero terms then the expression is always going to be less than $\frac{1}{27}$ and if there are less than $3$ non-zero terms then the expression is always going to be 0
So we have finally proved that the answer is indeed $\frac{1}{27}$
With out loss of generality, we may assume $x_1x_2x_4\neq 0$.
If we fix $x_3$, $x_4$, $\cdots$, $x_7$ (viewing them as constant), and let $x_1$, $x_2$ vary (subject to the condition that $x_1 + x_2$ being a constant), then from $x_4\cdot f = (x_1x_4 + x_3x_5 + x_6x_7)(x_2x_4 + x_5x_6 + x_7x_3) - $ terms not involving $x_1$, $x_2$, $x_4$, we see that, when $f$ reaches its maximum, $x_1x_4 + x_3x_5 + x_6x_7 = x_2x_4 + x_5x_6 + x_7x_3$, namely,
$$ (x_1 - x_2)x_4 = (x_5 - x_7)(x_6 - x_3).$$
By similar argument (varying $x_3$ amd $x_6$, $x_5$ and $x_7$, respectively), we have $(x_6 - x_3)x_4 = (x_1 - x_2)(x_5 - x_7)$ and $(x_5-x_7)x_4 = (x_1-x_2)(x_6-x_3)$, at the maximum point.
Similar argument can be made for $x_1$ and $x_2$, we have $(x_2-x_4)x_1 = (x_5-x_6)(x_3-x_7)$, $(x_5-x_6)x_1 = (x_2-x_4)(x_3-x_7)$, $(x_3-x_7)x_1 = (x_2-x_4)(x_5-x_6)$, $(x_1-x_4)x_2 = (x_3-x_5)(x_7-x_6)$, $(x_3-x_5)x_2 = (x_7-x_6)(x_1-x_4)$, $(x_7-x_6)x_2=(x_1-x_4)(x_3-x_5)$, at the maximum point.
It is easy to check that, the only possible maximum points are those with $x_1=x_2=x_4$, $x_3=x_5=x_6=x_7$.
Let $x_1=x_2=x_4=a$, $x_3=x_5=x_6=x_7=b$, then we are required to maximize $a^3+6ab^2$ subject to the condition $3a+4b=1$. This is easy.