Let $f,g:\mathbb{R}\to\mathbb{R}$ be continuous functions such that:
- $f$ is periodic, with finitely many zeros in a period
- The average value of $f$ on a period is $0$
- $g$ is monotonic decreasing and $\lim_{x\to\infty}g(x)=0$
Prove that $$\int_c^{\infty}f(x)g(x)\, dx<\infty$$ for any finite $c$, where the integral is taken in the Reimann sense (in particular, it need only be conditionally convergent).
Note: Can the "finite zeros" requirement be dispensed with or replaced by something weaker? Is it really necessary for $g$ to be continuous?
[Original version] can't be quite right, because we could take one function to be $\sin x$ and the other to be $1/x$ where $\sin x>0$ and $1/x^2$ where $\sin x<0$.
Edit: with suitable adjustments to the hypotheses, one true version I could imagine would be a continuous analogue of the generalized "alternating decreasing" convergence: given $a_n$ positive and monotone decreasing to $0$, and given $b_n$ with partial sums $b_1+\ldots b_n$ bounded, summation by parts shows $\sum a_n b_n$ converges.