analysis – a guess relation betwenn series and infinite integral convergence

Background: Our real analysis textbook says if function f is a non-negative decreasing function on range $(1,+infty)$, thus $int_{1}^{+infty}f(x),dx$ converges is equivalent to $sum_{n=1}^{infty}f(n)$ converges.

So I have thought about other properties f(x) may have such that infinite integral and sum have the same convergece like that above. I guess uniform continuity is a good candidate, and I’ve tried to find some functions such that this doesn’t hold but failed.

So If this is really true?Or for f(x) with some properties it doesn’t holds?
(I’ve tried searching this problem but no helpful papers or answers)