Dropping the "positive" and "decreasing" conditions in the integral test I know the Integral test is the following theorem:

Assume $f$ is continuous, positive, and decreasing on [$1, \infty$).
If $\int_1 ^{\infty}f(x)\,dx$ exists and is finite, then $\sum f(n)$ converges and vice versa.

I am searching for counterexamples to this test if:
(i)
the condition positive is dropped;
(ii) the condition decreasing is dropped.
 A: $\sin^2(\pi n)$ converges as a summation, but not as an integral.
Edit:  As Nico points out, you can make this strictly positive by adding $1/n^2$.
A: When you drop the "decreasing" condition, both directions fail even with the "positive" condition!
$
\def\l{\left}
\def\r{\right}
\def\lfrac#1#2{{\large\frac{#1}{#2}}}
\def\nn{\mathbb{N}}
\def\rr{\mathbb{R}}
$

$\sum_{n=1}^\infty \l( \sin(nπ)^2 + \lfrac1{n^2} \r) = \color{blue}{\lfrac{π^2}{6}}$ but $\int_1^\infty \l( \sin(nπ)^2 + \lfrac1{n^2} \r)\ dn = \color{red}{\infty}$.
$\sum_{n=1}^\infty \lfrac1{n^4 \sin(nπ)^2+1} = \color{red}{\infty}$ but $\int_1^\infty \lfrac1{n^4 \sin(nπ)^2+1}\ dn < \color{blue}{\lfrac{π^2}{6}}$.

To derive the above inequality, note the following for any $k \in \nn_+$ and $n \in [k,k+1]$:


*

*$\int_k^{k+1} \lfrac1{n^4 \sin(nπ)^2+1}\ dn < \int_k^{k+1} \lfrac1{(k^4-1) \sin(nπ)^2+1}\ dn = \int_{-\frac12}^\frac12 \lfrac1{(k^4-1) \sin(xπ)^2+1}\ dx = \lfrac1{k^2}$.
[To get the last integral, use the substitution $t = \tan(xπ)$.]
A: There can't be a convergent series or integral that's negative and decreasing, since it would by definition be above a given absolute value for sufficiently large n or t.  So for negative, decreasing, and continuous, it's trivially true.
For decreasing, there's no reason you can't have a continuous (albeit not differentiable) function like a saw, with lines running to $\frac{1}{x^2}$ at integers, and 2 at the halfway points between integers.  That would be a counterexample, since the integral between any two positive integers would never drop below 1, so the integral wouldn't converge, even though the series would.
A: Given a sequence $(f(n))_n$ such that $\sum_1^\infty f(n)$ converges, you can extend $f$ to  a continuous real function that does just about anything you want on each $[n,n+1].$
For example for each $n,$ let $f(x)$ be linear on $[n,n+1/2]$ and linear on $[n+1/2, n]$ with $f(n+1/2)$ large enough  that $\int_n^{n+1}f(x)\;dx>1.$ Then $\int_1^{\infty}f(x)\;dx=\infty.$ Of course $f$ is not monotonic.
