In my studies of dynamical systems I have just encountered this supposedly tough looking improper integral, which is (not really relevant for my predicament) the Melnikov function, with the integral as follows:
$$ M(t_0) = \int_{-\infty}^{\infty} \frac{(1-e^{2At\pi})e^{At\pi}}{(1+e^{2At\pi})^2} \cos{(\omega(t+t_0))} dt $$
where $ \omega > 0 $ is a constant and A is a non zero real constant. In both cases of positive and negative A I plugged that integral (a function of $t_0$) into Wolfram Mathematica and got compact expressions for answers, but I am truly unable to solve this integral analytically, so I would certainly appreciate the help on it, I have no idea where to begin but seeing as how the computer could solve it then I assumed it is possible to solve it analytically. I thank all helpers.
Hint. One may first assume that $A>0$. One may observe the expansion $$ \frac{(1-e^{2At\pi})e^{At\pi}}{(1+e^{2At\pi})^2}=-\frac{(1-e^{-2At\pi})e^{-At\pi}}{(1+e^{-2At\pi})^2}=\sum_{n=0}^\infty(-1)^{n+1}(2n+1) e^{-A(2n+1)\pi t}. $$ Then one gets $$ \begin{align} & \int_{-\infty}^{\infty} \frac{(1-e^{2At\pi})e^{At\pi}}{(1+e^{2At\pi})^2} \cos{(\omega(t+t_0))} dt \\\\&=\int_0^{\infty}\frac{(1-e^{-2At\pi})e^{-At\pi}}{(1+e^{-2At\pi})^2}\cos{(\omega(-t+t_0))} dt-\int_0^{\infty} \frac{(1-e^{-2At\pi})e^{-At\pi}}{(1+e^{-2At\pi})^2}\cos{(\omega(t+t_0))} dt \\\\&=2\sin{(\omega t_0)}\int_0^{\infty}\frac{(1-e^{-2At\pi})e^{-At\pi}}{(1+e^{-2At\pi})^2}\sin{(\omega t)} dt \\\\&=2\sin{(\omega t_0)}\sum_{n=0}^\infty (-1)^{n+1}(2n+1)\int_0^{\infty} e^{-A(2n+1)\pi t}\sin{(\omega t)}\:dt \\\\&=2\omega\sin{(\omega t_0)}\sum_{n=0}^\infty \frac{ (-1)^{n+1}(2n+1)}{A^2(2n+1)^2\pi^2+\omega ^2}, \end{align} $$ giving