Does a function's limit when x goes to infinity must be zero for its integral to converge?
I had proved in my homework that if the function is non-negative, it's not necessarily true. Now I read a solution that uses this as a fact - For an improper integral to converge, function's limit must be zero.
I hadn't found it in my books and notebook, and I can't find a reliable place says it is.
any help would be appreciate, thanks
That is correct only if we know that $\lim_{x\to\infty} f(x)$ exists. A nonzero value of this limit (say, $L$) would make the antiderivative $F$ grow at linear rate ($\sim Lx$) which is not compatible with $F$ having a limit at infinity.
But it may well be that $\lim_{x\to\infty} f(x)$ fails to exist but the integral $\int_a^\infty f(x)\,dx$ converges. A popular example, described by David Mitra in a comment, looks like this: