TITLE: Differentiating an integral that grows like log asymptotically
QUESTION [8 upvotes]: 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.)

REPLY [7 votes]: The post by Raziel shows that the answer to the original question is no. The OP then asked, in a comment to that post, if one one still conclude that $f(t)\asymp\frac1t$ (as $\to\infty$); as usual, $a\asymp b$ means here that $\limsup|\frac ab+\frac ba|<\infty$.  
Let us show that the answer is still no. E.g., for $j=0,1,\dots$ let $t_j:=e^{j^2}$, 
\begin{equation}
 c_j:=\frac{\ln t_{j+1}-\ln t_j}{t_{j+1}-t_j}\sim\frac{2j}{t_{j+1}} \tag{1}
\end{equation}
(as $j\to\infty$), and 
\begin{equation}
 f(x):=c_j\quad\text{for}\quad x\in[t_j,t_{j+1}),  
\end{equation}
with $f:=c_0=\frac1{e-1}$ on $[0,t_0)$. 
Let also $F(t):=\int_0^t f(x)\,dx$. 
Then $f$ is nonincreasing, $0<f\le1$, $F(t_j)=c_0+\ln t_j\sim c_0+\ln t_{j+1}=F(t_{j+1})$, whence  $F(t)\sim\ln t$ (as $t\to\infty$), whereas $f(t_{j+1}-)=c_j$ is much greater than $\frac1{t_{j+1}}$, by (1). 
We also see that $f(t_j)=c_j$ is much less than $\frac1{t_j}$, again by (1). 
The only condition missed here is the continuity of $f$, as $f$ is not left-continuous at $t_{j+1}$ for $j=0,1,\dots$. This omission is quite easy, but tedious, to fix by  approximation. For instance, one can replace the above $f$ on every interval $[t_{j+1}-c_02^{-j},t_{j+1}]$ by the linear interpolation of $f$ on the same interval. Then instead of the value $c_0+\ln t_{j+1}$ of $F(t_{j+1})$ we will have $b_j+\ln t_{j+1}\sim c_0+\ln t_j=F(t_j)$ for some $b_j\in[0,c_0]$, and instead of $f(t_{j+1}-)=c_j$ being much greater than $\frac1{t_{j+1}}$, we will have that $f(t_{j+1}-c_0)=c_j$ is much greater than $\frac1{t_{j+1}-c_0}$.