# Thread:

1. ## Prove an inequality

Can anyone prove the following inequality:

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

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:

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

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$).
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 14, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9423511624336243, "perplexity_flag": "middle"}