I want to find the conditions such that $\int_{-\infty}^{\infty} \frac{e^{cx}}{1+e^{x}} dx$ converges.
I am considering as contour the rectangle with vertices $\pm R$, $\pm R + 2\pi i$.
\begin{align*} \left|\int_{R}^{R+2 \pi i} f(z) \, dz\right| &= \left|\int_{R}^{R+2 \pi i} \frac{e^{cz}}{1+e^{z}} \, dz\right| = \left|\int_{0}^{2 \pi i} \frac{e^{c(z+R)}}{1+e^{z+R}} \, dz\right| \\ &\leq \max_{0 \leq z \leq 2 \pi i} \left| \frac{e^{c(z+R)}}{1+e^{z+R}} \right| \cdot 2 \pi = \frac{e^{c(2 \pi i+R)}}{1+e^{2 \pi i+R}} \cdot 2 \pi \\ &= \frac{2 \pi}{1+e^{R}} e^{cR} e^{c \cdot 2 \pi i} \to 0 \qquad \text{ as } R \to \infty \text{ for } c < 1 \end{align*}
And in the same way
\begin{align*} \left|\int_{-R+2 \pi i}^{-R} f(z) \, dz\right| &= \left|\int_{-R + 2 \pi i}^{-R} \frac{e^{cz}}{1+e^{z}} \, dz\right| = \left|-\int_{0}^{2 \pi i} \frac{e^{c(z-R)}}{1+e^{z-R}} \, dz \right|\\ &\leq \max_{0 \leq z \leq 2 \pi i} \left|\frac{e^{c(z-R)}}{1+e^{z-R}}\right| \cdot 2 \pi \\ &= \frac{2 \pi}{1 + e^{-R}} e^{-cR} e^{c \cdot 2 \pi i} \to 0 \qquad \text{ as } R \to \infty \text{ for } c > 1 \end{align*}
So I am not be able to find values for the real parameter c such that the integral converges as the results $c > 1$ and $c < 1$ contradict each other. I am wondering what is going wrong.