TITLE: Show that $\sum^{6}_{i=1} a_{i}=\frac{15}{2}$ and $ \sum^{6}_{i=1} a^{2}_{i}=\frac{45}{4} \implies \prod_{i=1}^{6} a_{i} \leq \frac{5}{2}$
QUESTION [21 upvotes]: Let $a_{i}$, $1 \leq i \leq 6,$ be real numbers such that 
$\displaystyle\hspace{1.2 in}\sum^{6}_{i=1} a_{i}=\frac{15}{2}\;\;$ and $\;\;\displaystyle\sum^{6}_{i=1} a^{2}_{i}=\frac{45}{4}$.
Prove that $\hspace{.15 in}\displaystyle\prod_{i=1}^{6} a_{i} \leq \frac{5}{2} $.

I was thinking if I consider the first summation and extended it, it going be pretty long which $a_{1}+a_{2}+a_{3}+a_{4}+a_{5}+a_{6}= \frac{15}{2}$ and the second one like $a^{2}_{1}+a^{2}_{2}+a^{2}_{3}+a^{2}_{4}+a^{2}_{5}+a^{2}_{6}= \frac{45}{4}$. But I do not think this is the shortest of doing that, I am wondering if someone would be able to give me a hint so I can think better than this. Thank you

REPLY [2 votes]: The feasible set $S$ is the transversal intersection of a $5$-sphere and a hyperplane in ${\mathbb R}^6$, hence a $4$-sphere, in particular: a smooth compact manifold. The function $p({\bf a}):=\prod_{i=1}^6 a_i$ assumes its maximum on $S$ in one or several conditionally stationary points of $p$. It follows that such maximum points will be brought to the fore using Lagrange's method. Therefore we  set up the "Lagrangian"
$$\Phi:=p-\lambda\sum_i a_i-\mu\sum_i a_i^2$$
and look at the equations
$${\partial \Phi\over\partial a_i}={p\over a_i}-\lambda -2\mu a_i=0\qquad(1\leq i\leq 6)\ .$$
Since at the maximum points all $a_i$ have to be $\ne0$ this implies
$$p-\lambda a_i-2\mu a_i^2=0\qquad(1\leq i\leq 6)\ .$$
This is saying that at the maximum points all $a_i$ are solutions of one and the same at most quadratic equation. It follows that at most two different values $a_i$ occur at such points. We therefore have to consider for $r\in\{0,1,2,3\}$ the equations
$$r a_1+(6-r)a_2={15\over2},\qquad r a_1^2+(6-r)a_2^2={45\over4}\ ,$$
and have to check which case leads to the largest value of $p$. This amounts to the analysis conducted by @robjohn in his "variational" answer. I won't repeat it here.