# Math Help - Prove an inequality

1. ## Prove an inequality

Can anyone prove the following inequality:

$
\sum_{i=1}^N y_{i}^2/n_{i} - \frac{\left(\sum_{i=1}^N y_{i}\right)^2}{n} \ge 0,
$

where $n=\sum_{i=1}^N n_{i},\ \ n_{i} \ge 0$, and $y_{i}$ is a real quantity (can be both negative or positive)?

It appears that the inequality is valid (even used random numbers), but can't see how to prove it.

2. Originally Posted by puch7524
Can anyone prove the following inequality:

$
\sum_{i=1}^N y_{i}^2/n_{i} - \frac{\left(\sum_{i=1}^N y_{i}\right)^2}{n} \ge 0,
$

where $n=\sum_{i=1}^N n_{i},\ \ n_{i} \ge 0$, and $y_{i}$ is a real quantity (can be both negative or positive)?

It appears that the inequality is valid (even used random numbers), but can't see how to prove it.
This inequality gets really messy really quickly. So I will prove the special case $N=2$. I am sure you can use the same method to generalize it to more terms but it just is so messy.
---
First, I think you meant $n_i >0$.

Thus, we have to show:
$\frac{y_1^2}{n_1}+\frac{y_2^2}{n_2} \geq \frac{(y_1+y_2)^2}{n_1+n_2}$

Rewrite as,
$\frac{y_1^2}{n_1}+\frac{y_2^2}{n_2} \geq \frac{y_1^2}{n_1+n_2}+\frac{y_2^2}{n_1+n_2}+ 2\cdot \frac{y_1y_2}{n_1+n_2}$

Multiply by $n_1n_2(n_1+n_2)>0$:

$n_2(n_1+n_2)y_1^2+n_1(n_1+n_2)y_2^2 \geq y_1^2n_1n_2+y_2^2n_1n_2+2y_1y_2n_1n_2$

Open and cancel,

$n_2^2y_2^2 + n_1^2y_2^2 \geq 2y_1y_2n_1n_2$

This is the AM-GM inequality.
Which is true.

(Or you can write $(n_1y_1 - n_2y_2)^2 \geq 0$).