Let $n \geqslant 2$ be an integer and let $1<a_1 \le a_2 \le \dots \le a_n$ be $n$ real numbers such that $a_1+a_2+\dots+a_n=2n$. Prove that$$a_1a_2\dots a_{n-1}+a_1a_2\dots a_{n-2}+\dots+a_1a_2+a_1+2 \leqslant a_1a_2\dots a_n.$$
I feel something is very wrong with my solution, but I can't figure it out. We will proceed with induction. We shall show the base case of $2$ [which I'm not including as it is not of any concern]. Assume the statement is true for $n$, hence we need to show it's true for $n+1$, that is $$2+a_1+a_1 a_2+...+a_1 a_2...a_n \leq a_1 a_2 ...a_n a_{n+1}$$ Note that the LHS is less than or equal to $2a_1 a_2 ... a_n$ using induction hypothesis [ that is $a_1a_2\dots a_{n-1}+a_1a_2\dots a_{n-2}+\dots+a_1a_2+a_1+2 \leqslant a_1a_2\dots a_n$]. Now if we can show $$2a_1 a_2 ... a_n \leq a_1 a_2 ...a_n a_{n+1}$$ Which is equivalent to showing $$2 \leq a_{n+1}$$ Now notice, $$a_1+a_2+\dots+a_n+ a_{n+1}=2n+2$$ and $$a_1+a_2+\dots+a_n=2n$$ From these two equation, we can get $a_{n+1}=2$. So $2 \leq a_{n+1}$ is true and hence we are done. Where is this proof wrong?
Writing the induction hypothesis clearly would mean: given any sequence $a_1,...,a_n$ Such that:
$1 < a_1 \leq \ldots \leq a_n$
$a_1+...+a_n = 2n$
Then $2+a_1+\ldots+a_{n-1} \ldots a_1 \leq a_n\ldots a_1$
Now if you take a sequence $a_1,\ldots,a_{n+1}$ satisfying the two conditions for $n+1$, then you don't necessarily have that $a_1,\ldots,a_n$ satisfies the conditions for $n$. Specifically you don't control $a_1+...+a_n$
The structure of a proof by induction is, you have a statement $P(n)$, in this case $P(n)$ is that all increasing n-tuples of sum $2n$ of integers strictly greater than 1 satisfy the given inequality. You prove the base case, and that for all n bigger than 2, you suppose that $P(n)$ is true and you show $P(n+1)$.
So if you take any increasing (n+1)-tuple of sum $2n+2$ of integers strictly greater than 1, you have no idea what the first n values have as sum, since that is just the hypothesis (not the conclusion) of the induction statement...
Hence you can't use the induction hypothesis on them directly as you did.