Maximizing $f(x, y) = \sum_{k = 1}^{n} x_k y_k$ when $\sum_{k=1}^{n} x_k^2 = 1$ and $\sum_{k=1}^{n} y_k^2 = 4$

61 Views Asked by At

I just applied Cauchy Schwarz inequality to find

$$-4 \leq |f(x, y)| \leq 4. $$

So I believe the maximum is $4$ and the minimum is $-4$. The maximum is attained when $x = (1, 1)$ and $y = (2, 2)$. The minimum can attained when $x = (-1 , -1)$ and $y = (2, 2)$.

Is this enough to prove that my bounds are optimal? If not, how can I do so?

2

There are 2 best solutions below

0
On

Cauchy-Schwarz actually gives you a bound of 2, not 4. In this case $x_i = \frac{1}{\sqrt{n}}$ and $y_i = \frac{2}{\sqrt{n}}$ suffice for the maximum, and negating all the $x_i$ produces the minimum.

0
On

Consider $n=2$: $$\sum_{k=1}^{2} x_k^2 = x_1^2+x_2^2=1; \quad \sum_{k=1}^{2} y_k^2 = y_1^2+y_2^2=4\\ 1\cdot 4=(x_1^2+x_2^2)(y_1^2+y_2^2)=(x_1y_1+x_2y_2)^2+(x_1y_2-x_2y_1)^2\ge (x_1y_1+x_2y_2)^2,$$ equality occurs for $x_1y_2-x_2y_1=0$, for example: $$\begin{align}(x_1,x_2,y_1,y_2)&=\pm\left(\frac1{\sqrt{2}},\frac1{\sqrt{2}},\sqrt{2},\sqrt{2}\right), \left(\frac1{\sqrt{2}},-\frac1{\sqrt{2}},-\sqrt{2},\sqrt{2}\right),\pm\left(\sqrt{\frac13},\sqrt{\frac23},\sqrt{\frac43},\sqrt{\frac83}\right).\end{align}$$

Hence: $$|x_1y_1+x_2y_2|\le 2 \Rightarrow f_{\text{min}} = -2; f_{\text{max}} = 2.$$