This idea came to me while looking at the following graph of $f=\frac{1}{x}$:

Now, the definite integral of $f$ from $1$ to $n$ is smaller than $f(1)+f(2)...f(n)$, from the graph above. But since the definite integral from $1$ to $n$ is $\log(n)$, which as we take the limit of $n$ to $\infty$, $\log(n)$ goes to $\infty$ as well. Hence the infinte series $f(1)+f(2)+f(3)...$ goes to $\infty$, that is diverges.
Thinking about this gave me an idea, to extend this to any function $h$, not discontinuous on an infinte number of points, satisfying the following conditions:
- $h(n)\geq h(x) \text{ whenever } n>x>n+1 $
- $h(x) > 0$
- $\lim_{x\to\infty}\int^x_a h(x)\, dx = \infty $
Then, $\sum_{i=a}^{\infty}h(i)$ diverges, where is $a$ and $n$ are natural numbers and $n\geq a$. The problem is I cannot prove it, I have not studied analysis or series. I don't know how to prove it without analysis, using proven theorems.
So, I ask here that is my test correct? I hope so, but there are so weird continuous functions that it doesn't give me any confidence. If you have a not-so-tough proof, it would be very appreciated. If it is so, how can I generalize this or relax the conditions?
Yes. This is called the integral test, and proofs of it are in almost any calculus book, but are little more than what you've mentioned.