Is this definite integral positive?

I should say not. Counterexample: \begin{align*} f(x)&=\left\{ \begin{array}{ll} -1/(10x^2), \; &x\in(-\infty,-1) \\ -1, \; &x\in[-1,0) \\ 0, \; &x=0 \\ 1, \; &x\in(0,1] \\ 1/(10x^2), \; &x\in(1,\infty) \end{array}\right\}, \\ g(x)&=\left\{\begin{array}{ll} 0,\;&x\in(-\infty,-1)\cup(0,1)\cup(2,\infty) \\ 1/2, &x\in[-1,0] \\ 1, &x\in[1,2] \; \end{array}\right\}. \end{align*}

If you replace the $\displaystyle \int_{-\infty}^0g(x)\,dx<\int_{0}^{\infty}g(x)\,dx$ condition with the (stronger) condition $g(-x)<g(x)\;\forall\,x>0,$ then you have the following: \begin{align*} \int_{-\infty}^{\infty}f(x)\,g(x)\,dx&= \int_{-\infty}^{0}f(x)\,g(x)\,dx+\int_{0}^{\infty}f(x)\,g(x)\,dx \\ &=-\int_{\infty}^0 f(-x)\,g(-x)\,dx+\int_{0}^{\infty}f(x)\,g(x)\,dx \\ &=\int_{0}^{\infty} f(-x)\,g(-x)\,dx+\int_{0}^{\infty}f(x)\,g(x)\,dx \\ &=-\int_{0}^{\infty} f(x)\,g(-x)\,dx+\int_{0}^{\infty}f(x)\,g(x)\,dx \\ &=\int_{0}^{\infty} f(x)\,(-g(-x))\,dx+\int_{0}^{\infty}f(x)\,g(x)\,dx. \\ \end{align*} Now, if you have $g(-x)<g(x)\;\forall\,x>0,$ it follows that $-g(-x)>-g(x),$ whence you get \begin{align*} \int_{-\infty}^{\infty}f(x)\,g(x)\,dx&= \int_{0}^{\infty} f(x)\,(-g(-x))\,dx+\int_{0}^{\infty}f(x)\,g(x)\,dx \\ &>-\int_{0}^{\infty} f(x)\,g(x)\,dx+\int_{0}^{\infty}f(x)\,g(x)\,dx \\ &=0. \end{align*}

See tomasz's answer for a slightly less strict condition on $g(x)$.


If for almost all positive $x$ you have $g(x)\geq g(-x)$ and that there is a non-null set of $x$ such that $g(x)\neq g(-x)$, then this integral will always be positive.

No other hypothesis on $g$ will suffice (for all $f$). If $g(x)=g(-x)$ almost everywhere, then the integral is clearly zero. Otherwise, suppose $A\subseteq [0,\infty)$ is a set of positive measure such that for $x\in A$ we have $g(x)< g(-x)$. We may assume without loss of generality that for all $x\in A$ we have $g(-x)>g(x)+1/n$ for some positive integer $n$.

Now, take for $f$ an odd function such that $f(x)=2n/\lvert A\rvert$ for $x\in A$ and $f(x)<\left(\int_{-\infty}^\infty \lvert g(t)\rvert\,\mathrm{d}t\right)^{-1}$ for positive $x\notin A$.

Then $\int_{A\cup -A} f(t)g(t)\,\mathrm{d}t<-2$ and $\left\lvert \int_{(A\cup -A)^c} f(t)g(t)\,\mathrm{d}t\right\rvert\leq 1$.