I don't really know what the title of this question should be, but here's my question:
Notation: $\ll $ and $\mathcal O$ is the usual "Big Oh" notation, see e.g. the "formal definitions" section of the wikipedia page https://en.wikipedia.org/wiki/Big_O_notation.
Take a continuous function $f\ll 1$ and write \[ E(x)=f(x)\log x-\int _2^x\frac {f(t)dt}{t}.\hspace {10mm}(1)\] Why does \[ E(x)\ll 1\] imply an asymptotic for $f$? (And $1$ could be replaced by something greater so long as it's a bit smaller than $\log x$). In fact it implies \[ f(x)=c+\mathcal O\left (\frac {1}{\log x}\right )\] where \[ c=c_f=\int _2^\infty \frac {E(x)dx}{x(\log x)^2}.\] Here is the argument:
Divide $(1)$ through by $x(\log x)^2$ and integrate. After switching around the double integral, this gives us \[ \int _2^X\frac {f(x)dx}{x\log x}-\int _2^X\frac {f(t)}{t}\left (\int _t^X\frac {dx}{x(\log x)^2}\right )dt=c-\int _X^\infty \frac {E(x)dx}{x(\log x)^2}.\] The inner $dx$ integral is \[ \frac {1}{\log t}-\frac {1}{\log X}\] so we are left with \[ \frac {1}{\log X}\int _{2}^X\frac {f(t)dt}{t}=c+\mathcal O\left (\frac {1}{\log x}\right )\] and now the claim follows from \[ f(X)=\frac {1}{\log X}\int _{2}^X\frac {f(t)dt}{t}+\mathcal O\left (\frac {|E(x)|}{\log X}\right ).\]
I'm not really sure what kind of answer I'm looking for, since obviously a proof says "why". But I just feel there's a hand-wavey intuition that I'm missing which supports the statement that \[ f(x)\log x\sim \int _2^x\frac {f(t)dt}{t}\implies f(x)\sim c.\]
I'm aware of "smoothing arguments" (if that's what happens here) when only sums are concerned. For example, I have no ill-feelings about statements like \[ \sum _{n\leq x}a_n\log (x/n)\sim c\hspace {5mm}\text { or }\hspace {5mm}\sum _{n\leq x}a_n(1-n/x)\sim c\] should imply the same for the unweighted sum. (Probably because statements like "for $n$ close to $x$ the weights become closer to constants"). But maybe it's really not the same thing and that's irrelevant.
I could provide context for the question but I feel it's a bit long already. It comes from something I was reading in number theory, so I'll tag that, but feel free to add or remove tags, or to demand more context.