Suppose I have a continuous function $f(x)$ that is non-increasing and always stays between $0$ and $1$, and it is known that


$$ \int\_0^t f(x) dx = \log t + o(\log t), \qquad t \to \infty.$$


Unfortunately one has no control over the error term $o(\log t)$ (other than what is implied by the above asymptotic behaviour and the properties of $f$). My question is whether it is possible to conclude that


$$ f(t) = \frac{1}{t} + o(t^{-1}), \qquad t \to \infty.$$


**Update:** thanks to Raziel's response, the claim above does not hold in general and the problem is related to de Haan theory (which I am not very familiar with). I would therefore like to ask if it is still possible to find some $C > 0$ such that for $t$ sufficiently large,


$$ \frac{1}{Ct} \le f(t) \le \frac{C}{t}.$$


---------*Old follow-up question below; please ignore*---------


If this is possible, a follow-up question is whether the claim can be extended to $f$ that has countably many jumps (and continuous otherwise). Of course I will still be assuming that $f(x) \in [0,1]$ and the function is non-increasing, which in particular means that the jumps are negative and the size of the jump at $x\_i$ (if any) is bounded by $f(x\_i)$.


(One may start by proposing a solution to the toy problem with $f$ being differentiable if it simplifies the problem and offers any useful insights.)



Differentiating an integral that grows like log asymptotically
The answer is no, even in the smooth case. Take for example:


$$
f(x) = \frac{2}{x} + \frac{\cos(\log(x))}{x}
$$


Alter it on a small neighborhood of $0$ in such a way that there is no singularity there, preserving smoothness (this will be irrelevant for the asymptotics). This function is decreasing and, for $t$ sufficiently large, we have


$$
\int\_0^t f(x) dx = C + 2\log(t) + \sin(\log(t)) = 2\log(t) + o(\log(t))
$$


The monotone density theorem mentioned in the comments does not work in general if your r.h.s. is simply a slowly varying function (as any function asymptotic to $\log(t)$). You want your r.h.s. to be a **de Haan function**. The specific result you may want to use is Theorem 3.6.8 here:


*Bingham, N. H.; Goldie, C. M.; Teugels, J. L.*, Regular variation., Encyclopedia of Mathematics and its Applications, 27. Cambridge etc.: Cambridge University Press. 512 p. £ 20.00/pbk (1989). [ZBL0667.26003](https://zbmath.org/?q=an:0667.26003).


