Positive integral for two functions

1. May 13, 2015

ChrisVer

I am feeling stupid today...so:
Is the following statement true?

$\int_{-\infty}^{+\infty} f(x) g(x) \ge 0$
if $f(x) \ge 0$ and $0< \int_{-\infty}^{+\infty} g(x) < \infty$ (integral converges)?

If yes, then how could I show that? (It's not a homework) I am trying to understand how the expectation value $E[XY] = <X,Y>$ for two variables $X,Y$ can indeed be that inner product. Which would need that $<X,X>=E[X^2] \ge 0 \Rightarrow \int_{-\infty}^{+\infty} x^2 g(x) dx \ge 0$. Here $f(x)=x^2 >0$ and $\int g(x) = 1$ (normalized pdf). Obviously it's true since all the negative values of the $X$ will become positive and so their expectation should be positive, but I'm trying to look in it mathematically.

Last edited: May 13, 2015
2. May 13, 2015

PeroK

Suppose f(x) is 0 where g(x) is +ve. Can you get a counterexample from that?

3. May 13, 2015

ChrisVer

If $f(x)=0$ then the equal sign holds...?

4. May 13, 2015

PeroK

I don't think you understood my idea. f(x) = 0 where g(x) is +ve and f(x) > 0 where g(x) is -ve.

It's not that hard to see.

5. May 13, 2015

ChrisVer

I see... those statements are not sufficient then.... :/