Generalizing $\frac{1}{1+a^2}+\frac{1}{1+b^2} \le \frac{2}{1+ab}$ for $a+b \leq 2$ Let $ a_1,a_2,\cdots,a_n$ $(n\ge 2)$ are positive reals such that $ a_1+a_2+\cdots+a_n\leq n.$ Prove that
$$\frac{1}{1+a^2_1}+\frac{1}{1+a^2_2}+\cdots+\frac{1}{1+a^2_n}\le \frac{n}{1+a_1a_2\cdots a_n}.$$
One can easily prove it for $n=2$ with simplifying. How would one generalize this ?
 A: 

lemma : The following function is concave on $]0,\frac{\pi}{4}]$ :$$f(x)=\cos^2(x)=\frac{1}{1+\tan^2(x)}$$


It's not hard to show using the second derivative or the definition of the convexity .Omitted.
Now we apply the Jensen's inequality to the function $f(x)$ we get for $0\leq a_i\leq \frac{\pi}{4}$ ($n$ real numbers) :
$$\sum_{i=1}^{n}\frac{1}{1+\tan^2(a_i)}\leq \frac{n}{1+\tan^2\Big(\frac{\sum_{i=1}^{n}a_i}{n}\Big)}$$
To prove your inequality we have to show :
$$\frac{n}{1+\tan^2\Big(\frac{\sum_{i=1}^{n}a_i}{n}\Big)}\leq \frac{n}{1+\prod_{i=1}^{n}\tan(a_i)}$$
Or :
$$\tan^2\Big(\frac{\sum_{i=1}^{n}a_i}{n}\Big)\geq \prod_{i=1}^{n}\tan(a_i)$$
But again with Jensen's inequality apply to $g(x)=\ln(\tan(x))$ wich is concave on $]0,\frac{\pi}{4}]$ we get :
$$\sum_{i=1}^{n}\ln(\tan(a_i))\leq n\ln\Big(\tan\Big(\frac{\sum_{i=1}^{n}a_i}{n}\Big)\Big)$$
Or :
$$\tan^n\Big(\frac{\sum_{i=1}^{n}a_i}{n}\Big)\geq \prod_{i=1}^{n}\tan(a_i)$$
But $a_i\leq \frac{\pi}{4}$ so : 
$$\tan^n\Big(\frac{\sum_{i=1}^{n}a_i}{n}\Big)\leq \tan^2\Big(\frac{\sum_{i=1}^{n}a_i}{n}\Big)$$
So we showed the following theorem : 


Let $0<x_i\leq 1$ be $n$ real numbers then we have : 
    $$\sum_{i=1}^{n}\frac{1}{1+x_i^2}\leq \frac{n}{1+\prod_{i=1}^{n}x_i}$$


Maybe it can give idea to others...
