I was doing some homework and I stumbled upon this integral: $$ \int_{-\infty}^{\infty}dx \, \frac{\cos(x)-1+\frac{x^2}{2}}{x^4} $$ My first thoughts were:
- at $\pm\infty$ it should converge, since the order of the denominator is bigger.
- expanding in Taylor's series of the argument at $0$ should be: $\frac{1}{4!}+O(x^6)$. This means that the integral also converges near $0$, and the function is continuous (so there is an analytic continuation in $0$).
Im a little bit stuck because if the function is analytical its integral should be $0$? But this is not the case in the solution. Also, when adding two arcs (one at infinity and one around $0$) to close the loop, no other non-analytic points exists, so the residue theorem also says that the integral is $0$. What am I doing wrong? Thanks in advance for any help.