If $f(x)=o(g(x))$ prove that $\int_a^x f(t)dt=C+o\left(\int_a^x g(t)dt\right)$ I have a big doubt. @Did gave me a doubts in his comment in this post.
Is it true that (if $f$ and $g$ are integrable), that $$f(x)=o(g(x))\implies \int_a^t f(x)dx=o\left(\int_a^t g(x)dx\right) \ \ ?$$
For me it was always true since for example
$$\frac{1}{1+x}=1-x+o(x)\implies \ln(1+t)=\int_0^t\frac{1}{1+x}dx=t-\frac{t^2}{2}+o(t^2).$$
Now I tried to prove it as :

Suppose $f(x)=o_{x=0}(g(x))$. Let $\varepsilon>0$. There is $\delta>0$ s.t. $$|x|<\delta\implies |f(x)|\leq \varepsilon|g(x)|,$$
and thus,  $$|t|<\delta\implies \int_0^t|f(x)|dx\leq \varepsilon \int_0^t |g(x)|dx.$$
Unfortunately, I only get $$\int_0^t|f(x)|dx=o\left(\int_0^t |g(x)|dx\right),$$
but not 
$$\int_0^t f(x)dx=o\left(\int_0^t g(x)dx\right),$$
so maybe I'm wrong ? 
 A: If $g$ is non negative then as $\left| \int_0^t f \right| \leq \int_0^t |f|$ then you obtain your result.
If it is not the case consider for example:


*

*$f(x)=x^{1+\alpha} \left| \sin\left( \frac{1}{x} \right) \right|$

*$g(x)=x \sin\left( \frac{1}{x} \right)$


Then for $\alpha >0$, $f(x)=o(g(x))$.
More over:
$$\int_0^t g(x) dx =\int_\frac{1}{t}^\infty \frac{\sin(u)}{u^3} du$$
$$\int_0^t f(x) dx =\int_\frac{1}{t}^\infty \frac{|\sin(u)|}{u^{3+\alpha}} du$$
to estimate the integrals notice that:
$$\int_{k \pi}^{(k+1) \pi} \frac{\sin(u)}{u^3}=(-1)^k\int_0^\pi \frac{\sin(s)}{(k \pi+s)^3} du$$
so:
$$\int_\frac{1}{t}^\infty \frac{\sin(u)}{u^3} \sim 2\sum_{k =\frac{1}{\pi t}}^\infty \frac{(-1)^k}{(k \pi)^3}$$
Similarly, as:
$$\int_{k \pi}^{(k+1) \pi} \frac{|\sin(u)|}{u^{3+\alpha}}=\int_0^\pi \frac{\sin(s)}{(k \pi+s)^{3+\alpha}} du$$
we have:
$$\int_\frac{1}{t}^\infty \frac{\sin(u)}{u^3} \sim 2\sum_{k =\frac{1}{\pi t}}^\infty \frac{1}{(k \pi)^{3+\alpha}}$$
Now as the first series is an alternating series and the second one a Riemann series you can show that:
$$\left|\int_0^t g(x) dx \right| \leq C t^3$$
$$\left|\int_0^t f(x) dx \right| \geq c t^{2+\alpha}$$
so wuth any $\alpha < 1$ you obtain a counterexample.
