Derive Cauchy-Bunyakovsky by taking expected value In my notes, it is said that taking expectation on both sides of this inequality $$|\frac{XY}{\sqrt{\mathbb{E}X^2\mathbb{E}Y^2}}|\le\frac{1}{2}\left(\frac{X^2}{\mathbb{E}X^2}+\frac{Y^2}{\mathbb{E}Y^2}\right)$$ can lead to the Cauchy-Bunyakovxky (Schwarz) inequality $$\mathbb{E}|XY|\le\sqrt{\mathbb{E}X^2\mathbb{E}Y^2}$$ I am not really good at taking expected values, may anyone guide me how to go about it?
Note: I am familiar with the linearity and monotonicity of expected values, what I am unsure about is the derivation that leads to the inequality, especially when dealing with double expectation.
Thanks.

You can simplify your inequality as follows, for the left side:
$|\frac {XY}{\sqrt{EX^{2}EY^{2}}}|=\frac {|XY|}{\sqrt{EX^{2}EY^{2}}}$
for the right side, take the expectation:
$\frac{1}{2}E\left( \frac{X^2}{EX^2}+\frac{Y^2}{EY^2}\right)= \frac{1}{2} E \left( \frac{X^2 EY^2+X^2 EY^2}{EY^2 EX^2} \right)$
Now, $E(X^2 EY^2+X^2 EY^2)=2*EX^2EY^2 $ using the fact that $E(EY^2)=E(Y^2)$ 
Plug in and you get the result.
