An Inequality problem relating $\prod\limits^n(1+a_i^2)$ and $\sum\limits^n a_i$ 
Let $(a_1,\space a_2,\space \cdots, \space a_n) \in \mathbb R^n_+$ such that $\displaystyle \prod^n_{i=1 }a_i = 1$. Prove that $$\displaystyle \prod^n_{i=1} (1+a_i^2) \le \cfrac {2^n}{n^{2n-2}}\left (\sum^n_{i=1} a_i\right)^{2n-2}$$


I have not solved the problem completely, but I have found how to reduce it to an easier-looking problem, in two variables instead of $n$. I use  the Lagrange multiplier method. Perhaps someone else can fill the blanks.
Let $\Omega=\lbrace (x_1,x_2, \ldots ,x_n) | x_i >0 \ (1 \leq i\leq n) \rbrace$, and let $M>0$. Consider the following optimization problem on $\Omega$ :
Maximize $f (x_1,x_2, \ldots ,x_n)$ subject to $g(x_1,x_2, \ldots ,x_n)=h(x_1,x_2, \ldots ,x_n)=0$, where
$$
\begin{array}{lcl}
f (x_1,x_2, \ldots ,x_n) &=& (1+x_1^2)(1+x_2^2) \ldots (1+x_n^2) \\
g(x_1,x_2, \ldots ,x_n) &=& x_1+x_2+ \ldots +x_n-M \\
h(x_1,x_2, \ldots ,x_n) &=& x_1x_2 \ldots x_n-1 \\
\end{array}
$$
The set $K_M=\lbrace (x_1,x_2, \ldots ,x_n) | g(x_1,x_2, \ldots ,x_n)=h(x_1,x_2, \ldots ,x_n)=0\rbrace$ is closed and bounded in the open set $\Omega$. So $f$ attains a minimum on $K_M$ at a point $p$, and we then know that Lagrange multipliers exist, i.e. there are two constants $\lambda$ and $\mu$ such that 
$$
\frac{\partial f}{\partial x_k}(p)=\lambda \frac{\partial g}{\partial x_k}(p)+\mu \frac{\partial h}{\partial x_k} \ (1 \leq k \leq n) 
$$
In other words,
$$
(1) \ 2x_k\prod_{j\neq k}(1+x_j^2)=\lambda+\mu(\prod_{j\neq k}x_j)  \ (1 \leq k \leq n) 
$$
Now (1) is a linear system of $n$ equations in two unknowns $\lambda$ and $\mu$. If $i$ and $j$ are indices such that $x_j \neq x_i$, using the $i$-th and the $j$-th equation we can solve for $\lambda$ and $\mu$ :
$$
(2) \  \lambda=\frac{2(x_i+x_j)}{(x_i^2+1)(x_j^2+1)}\frac{A}{B}, \ \  \ \mu=\frac{x_ix_j(x_ix_j-1)}{(x_i^2+1)(x_j^2+1)}\frac{A}{B} \ (\text{where} \ A=\prod_{j=1}^{n}(1+x_j^2), B= \prod_{j=1}^{n}x_j)
$$
Since (2) must hold for all pairs of indices $i,j$ with $x_i \neq x_j$, we deduce that either $\lbrace x_k \rbrace$ has at most two elements, or $n=3$ and $x_1x_2+x_1x_3+x_2x_3=1$.
Now this latter case is impossible since it would imply
$$
(x_1-x_2)^2+(x_1-x_3)^2+(x_2-x_3)^2=2((x_1+x_2+x_3)^2-(x_1x_2+x_1x_3+x_2x_3
))=0
$$
and hence all the $x_i$ would be equal to $1$ (as $x_1x_2x_3=1$),contradicting  $x_1x_2+x_1x_3+x_2x_3=1$.
So $\lbrace x_k \rbrace$ consists of at most two elements $a$ and $b$ (with possibly $a=b$). Denoting the number of occurrences by $n_a$ and $n_b$, we thus have $n_a+n_b=n$ and 
$$
\begin{array}{l}
f(x_1, \ldots ,x_n)=(1+a^2)^{n_a}(1+b^2)^{n_b}, \\
1=x_1x_2x_3 \ldots x_n=a^{n_a}b^{n_b}, \\
 x_1+x_2+ \ldots+x_n=n_aa+n_bb 
\end{array}
$$
It seems that new ideas are needed at this point to finish the solution.
