Does the existence of $\lim_{n \to \infty}\int_1^n f(x)dx $ imply convergence of$\int_1^\infty f(x)dx$ if $f$ is decreasing? Prove or provide counter example:
If $f$ is monotonically decreasing and if $\lim_{n \to \infty}\int_1^n f(x)dx $ exists ($n$ denotes a positive integer), then the integral $\int_1^\infty f(x)dx$ converges.
I was wondering if $f$ is positive then from the integral test the partial sums of $\sum_{k=1}^n f(k)$ are bounded above implying convergence of $\sum f(n)$, therefore convergence of$\int_1^\infty f(x)dx$ (If I got it right).
A) Is there an example of $f$ being nonpositive decreasing  and  $\lim_{n \to \infty}\int_1^n f(x)dx $ exists?
B) The existence of $\lim_{n \to \infty}\int_1^n f(x)dx $ always implies that $\int_1^\infty f(x)dx$ converges (for any continuous function)?
 A: If $\int_1^{\infty} f(x)\,dx$ converges, that is, $\lim\limits_{y\to\infty} \int_1^y f(x)\,dx$ where $y\in [1,\infty)$ exists, then of course the limit of the "subsequence" $\int_1^n f(x)\,dx$ exists, and is the same. This direction holds without any conditions on $f$ (other than integrability over all intervals $[1,y]$, which is required for the statement to even make sense).
If $f$ is nonnegative, then
$$I(y) = \int_1^y f(x)\,dx$$
is a monotonically increasing (not necessarily strictly) function. A monotonic function $M \colon [1,\infty) \to \mathbb{R}$ has a limit at $\infty$ if and only if it is bounded, and since $M(y)$ lies between $M(n)$ and $M(n+1)$ (inclusive) for $y \in [n,n+1]$, boundedness of $M$ is then equivalent to boundedness of the sequence $\bigl(M(n)\bigr)_{n\in \mathbb{N}\setminus \{0\}}$.
Thus for nonnegative $f$ (that is integrable over all intervals $[1,n]$), convergence of $\int_1^{\infty} f(x)\,dx$ is equivalent to convergence of the sequence $\bigl(\int_1^n f(x)\,dx\bigr)_{n\in \mathbb{N}\setminus \{0\}}$.
If $f$ is monotonically decreasing, then $\int_1^y f(x)\,dx$ exists for all $y \in [1,\infty)$, and nonnegativity of $f$ is a necessary condition for the convergence of $\int_1^{\infty} f(x)\,dx$. For if there is a $z \in [1,\infty)$ with $c = f(z) < 0$, then for $x > z$ we have $f(x) \leqslant c$ and hence
$$\int_1^y f(x)\,dx = \int_1^z f(x)\,dx + \int_z^y f(x)\,dx \leqslant \int_1^z f(x)\,dx + (y-z)\cdot c \tag{$\ast$}$$
for $y \geqslant z$, and the right hand side of $(\ast)$ is not bounded from below.
Thus the answer to A) is "no". [Assuming that "existence of the limit" means existence in $\mathbb{R}$. If $\pm \infty$ are allowed as limits, then $\lim\limits_{n\to \infty} \int_1^n f(x)\,dx = -\infty$ for every monotonically decreasing $f \colon [1,\infty) \to \mathbb{R}$ that attains a negative value somewhere, as follows from $(\ast)$.]
The answer to B) is also negative, to deduce the convergence of $\int_1^{\infty} f(x)\,dx$ from the existence of $\lim\limits_{n\to\infty} \int_1^n f(x)\,dx$ we need additional assumptions like decay conditions ($\lim_{x\to\infty} f(x) = 0$ suffices then) or nonnegativity. Consider $f(x) = \sin (2\pi x)$. Then
$$\int_1^n f(x)\,dx = 0$$
for all $n \in \mathbb{N}$, so $\lim\limits_{n\to\infty} \int_1^n f(x)\,dx$ exists. But
$$\int_1^{n + \frac{1}{2}} f(x)\,dx = \frac{1}{\pi}$$
for all $n \in \mathbb{N}$, so $\lim\limits_{y\to\infty} \int_1^y f(x)\,dx$ doesn't exist.
