I want to prove that $$ \int_0^\infty x^3\frac{\sin\frac{\pi x}{2}\sinh\frac{\pi x}{2}}{\cos\pi x+\cosh\pi x}(J_0(x)+I_0(x))dx=0,\tag{1} $$ where $J_0(x)$ and $I_0(x)$ are Bessel function and modified Bessel function of the first kind.
What I know? This $$ \int_0^\infty x^{4n-1}\frac{\sin\frac{\pi x}{2}\sinh\frac{\pi x}{2}}{\cos\pi x+\cosh\pi x}dx=0,\,\,\,\,\, n\in\mathbb{N},\tag{2} $$ and this $$ J_0(x)+I_0(x)=\sum_{n=0}^\infty a_nx^{4n}.\tag{3} $$ However the trouble is I don't know how to combine $(2)$ and $(3)$ rigorously to get $(1)$. For example this is not true: $$ \int_0^\infty x^3\cos x^2\frac{\sin\frac{\pi x}{2}\sinh\frac{\pi x}{2}}{\cos\pi x+\cosh\pi x}dx=0.\,\,\,\,\,(\text{wrong})\tag{4} $$
Q: Explain rigorously why $(1)$ is true and $(4)$ is wrong.
Note. I believe closed forms of $(1)$ and $(4)$ can be derived by residue theorem. However in answering this question I want to avoid explicit calculations and understand how to get from $(2)$ and $(3)$ to $(1)$ and also to understand why the same reasoning fails in case of $(4)$.