Determine if the following series is convergent or divergent: $S=\sum_{k=1}^\infty (-1)^{k+1}  \frac{k}{k^{2}+1}$
Now, I started by saying: 
consider, 
$\sum_{k=1}^\infty \left\lvert   \frac{k}{k^{2}+1} \right\rvert$ ,
if this converges, that means S converges (or if this diverges, S diverges).
Then I let:
$ f(x)=\frac{k}{k^{2}+1}$, 
$ f'(x)=\frac{1-k^2}{(k^{2}+1)^2}$, which is less than or equal to 0 for all x in domain.
now, I thought I could do the integral test since it f(x) is greater than 0, and it is a decrease function on D.
$\int\frac{k}{k^{2}+1}dx=[0.5ln(x^2+1)]^\infty_1$ which means f(x) is divergent since $ ln(\infty) $  tends towards infinity.
Now, the answer is that it is convergent, but what is wrong with my method?
 A: This series is convergent because:
$$\frac{k}{k^2+1}\leq\frac{k}{k^2}=\frac{1}{k}$$
And by the Leibnitz-Kriterium is this series convergent.
So you found a convergent direct comparison test. I do not know if the expression "direct comparison test" is correct. It is called Majorantenkriterium in german.  
Your method is correct for the term:
$$\left|\frac{k}{k^2+1}\right|$$
But you have an alternating series!
A: $$\frac{k}{k^2+1}=\frac{1}{k}-\frac{1}{k(k^2+1)}\\
\sum(-1)^{k+1}\frac1k-\sum(-1)^{k+1}\frac{1}{k(k^2+1)}$$
The first sum is conditionally convergent, which means it converges so long as you don't rearrange the order of the terms.  The second sum is absolutely convergent, which means it converges to the same value no matter what order you sum them in.
So the total is conditionally convergent.
A: The series
$$\sum_{k\geq 1}\frac{(-1)^{k-1}k}{k^2+1}$$
is conditionally convergent by Leibniz' criterion, since the function $k\to\frac{k}{k^2+1}$ is decreasing towards zero, that is the same as stating that the function $k\to k+\frac{1}{k}=2\cosh(\log k)$ is increasing and unbounded.
We can also write the sum in integral form by exploiting:
$$\frac{k}{k^2+1}=\int_{0}^{+\infty}e^{-kx}\cos x\, dx, $$
from which:
$$\sum_{k\geq 1}\frac{(-1)^{k-1}k}{k^2+1}=\color{red}{\int_{0}^{+\infty}\frac{\cos x}{1+e^x}\,dx} $$
and the RHS of the last identity is clearly convergent. Exploting the digamma function, we have:
$$\sum_{k\geq 1}\frac{(-1)^{k-1}k}{k^2+1}=\frac{1}{2}\,\text{Re}\left(\psi\left(\frac{2+i}{2}\right)-\psi\left(\frac{1+i}{2}\right)\right)=0.269610502708\ldots$$
