How can I calculate this integral? $$\int \frac1{x \cos x}\,dx$$
Actually I was lost in this differential equation $$y' = -\frac{(x+2) \sin y}{x \cos x}$$ so I'd be glad if you could help me evaluate either of these.
I have tried it through separable equation but I am unable to solve the integral stated above.
The residue theorem gives: $$ \frac{1}{\cos x}=\sum_{k\in\mathbb{Z}}\frac{(-1)^k}{x-(2k-1)\frac{\pi}{2}}\tag{1} $$ hence by multiplying both sides by $\frac{1}{x}$ and integrating termwise: