# How to formally justify that $\int o(x) \, dx\sim o(x^2)$?

I'm trying to evaluate the following limit:

$$\lim_{x\to 0}\frac{\sin\left(\int_{x^3}^{x^2}\Bigg(\int_0^t g(s^2) \, ds\right) \, dt\Bigg)}{x^8}$$

for $g:[-1,1]\to\mathbb{R}$ differentiable function such that $g(0)=0$, $g'(0)=1$.

I developed $g$'s taylor expansion near $0$ and found out that $g(x)=x+o(x)$ where $o(x)$ is a function such that $o(x)/x \to_{x\to 0}0$.

Now, intuitively $o'(x^n)\sim o(x^{n-1})$ and $\int o(x^n) \, dx\sim o(x^{n+1})$ but how to formally justify it? I feel that I don't understand Taylor's theorem good enough.

By the way, I calculated (using my unjustified intuitions) that the limit above exists and equals to $\frac{1}{12}$.

You can't differentiate little-o expressions and expect the right answer. (Standard counterexample: $x^n\sin(1/x)$ and variations over this theme.) However, it works with integration: Say that $f(x)=o(x)$ as $x\to0$. This means: For any $\varepsilon>0$, there is $\delta>0$ so that $\lvert f(x)\rvert\le\epsilon\lvert x\rvert$ whenever $\lvert x\rvert<\delta$.
Assuming $\epsilon$ is given and $\delta$ is chosen accordingly, whenever $\lvert x\rvert<\delta$ you find $$\left|\int_0^x f(t)\,dt\right|<\left|\int_0^x\lvert f(t)\rvert\,dt\right|<\left|\int_0^x\lvert \varepsilon t\rvert\,dt\right|=\tfrac12\varepsilon x^2,$$ and it follows that $$\left|\int_0^x f(t)\,dt\right|=o(x^2).$$