Let $f,g : [0,\infty) \to \mathbb{R}$ be smooth functions such that
$f(0)=g(0)=0$
$\int_0^{\epsilon} f(x)g(x)dx >0$ for any small $\epsilon>0$.
Then, I would like to investigate about the sign of $f(x)$ and $g(x)$ near $x=0$. Is it possible to conclude that there exists some $\epsilon'>0$ such that $f(x)g(x) \geq 0$ for $x \in [0,\epsilon']$ ?
Sadly, the answer is false.
We have several ways of constructing counterexamples. I post a seemingly complicated, but intuitive way of construction. The idea is to glue an alternating series of rescaled bump functions, such that the negative bumps are extremely smaller than adjacent positive bumps.
We choose $f(x)=x$. The choice of $g$ will be technical.
Let $\psi\in C^\infty_c(\mathbb{R})$ be a non-negative bump function supported on $[1,2]$ such that $\psi([4/3,5/3])=\{1\}$.
We choose
$$g(x)=\sum_{j=1}^{\infty}2^{-2^j}\psi(2^{2j}x)-\sum_{j=1}^{\infty}2^{-10^j}\psi(2^{2j+1}x).$$
You can check smoothness of $g$ by direct calculation. Naively speaking, although we are attaching shrinking copies of unit bump function $\psi$, the size shrinks extremely faster than the shrinking support, so we have that.
You can also check that $g$ is negative on intervals $[\frac{4}{3}2^{-2j-1},\frac{5}{3}2^{-2j-1}]$, in particular $g$ is not non-negative on any interval of the form $[0,\epsilon]$.
Since $g$ is negative on the intervals $[\frac{4}{3}\cdot2^{-2j-1},\frac{5}{3}2^{-2j-1}]$, so we have $\int_0^t f(x)g(x)dx>0$ for every $t>0$ once we showed for $j\in\mathbb{N}$: $$\int_{\frac{4}{3}2^{-2j}}^{\frac{5}{3}2^{-2j}}x2^{-2^j}\psi(2^{2j}x)dx>\int_{\frac{4}{3}2^{-2j-1}}^{\frac{5}{3}2^{-2j-1}}x2^{-10^j}\psi(2^{2j+1}x)dx,$$and this is just change of variable ($d(2x)$).