My question is inspired by this one : Integral of the multiplication of two funtions
I wanted to find a counter example when $f>0$, but we have all latency we want for $g$.
Because when $f$ annulates or is negative on a small interval then it is easier to find a counter example by making $g^+,g^-,g^0$ disagree with $f$ values.
So here is the precise question :
- given a function $f$ such that $f>0$ and continuous and $\displaystyle 0<\int_0^\infty f(t)dt<+\infty$
- can we find $g$ such that $\displaystyle 0<\int_0^\infty g(t)dt<+\infty$ but $\displaystyle \int_0^\infty f(t)g(t)dt\le 0$ ?
There is no special requirements on $g$, it can be piecewise or we can smoothen it later.
My attempt at a solution is given below.
Sketch: Since $\int_0^\infty f(t)dt<+\infty$, the measure of $[f\leq 1/n]$ for each $n$ is infinite. So for any $n$ we can find a closed set $S_n$ disjoint of $[0,1]$ with measure 1 i.e. $|S_n|=1$ such that $f\leq 1/n$ on $S_n$.
Let $m>0$ be the minimum of $f$ on $[0,1]$, define $g(x)= -\frac{2}{m},\,\forall x \in [0,1]$. Therefore $\int_{0}^{1}fg \leq -2$.
Now define $g=\sqrt{n}$ on $S_n$ and zero elsewhere.
Claim: We can find $n$ such that $\int_{0}^{\infty}fg \leq -1$ and $0<\int_{0}^{\infty}g <\infty$.
Proof: First notice $\int_{0}^{\infty}fg =\int _{0}^{1}fg +\int_{S_n}fg\leq -2+\frac{1}{\sqrt{n}}$
Also, $\int_{0}^{\infty}g =\int _{0}^{1}g +\int_{S_n}g=-\frac{2}{m}+\sqrt{n}$. Now, it is evident that such an $n$ exists. $\blacksquare$