Help in two improper integrals
Let is use $$\int_{n\pi}^{\infty} \frac{\sin^2 t}{t^2} dt=\frac{\pi}{2}-\text{Ei}(2n \pi)$$ Then $$I_n=\int_{0}^{\infty} \frac{x^2 \sin^2 x}{x^2-n^2\pi^2} dx$$ $$=\frac{1}{4}\int_{0}^{\infty} dx \left(\frac{\sin^2 x}{(x-n\pi)^2}+\frac{\sin^2 x}{(x+n\pi)^2}+\frac{\sin^2 x}{4n\pi(x-n\pi)}-\frac{\sin^2 x}{4n\pi(x+n\pi)}\right)$$ $$I_n=\frac{1}{4}[\pi/2-\text{Ei}(2n\pi)+\pi/2+\text{Ei}(2n\pi)]+\int_{-n\pi}^{n\pi} \frac{\sin^2 t}{t}dt=\frac{\pi}{4} $$ Similarly $$J_n=\int_{0}^{\infty} \frac{x^2 \cos^2 x}{x^2-m^2\pi^2} dx, m=n+1/2$$ $$=\frac{1}{4}\int_{0}^{\infty} dx \left(\frac{\cos^2 x}{(x-m\pi)^2}+\frac{\cos^2 x}{(x+m\pi)^2}+\frac{\cos^2 x}{4m\pi(x-m\pi)}-\frac{\cos^2 x}{4m\pi(x+m\pi)}\right)$$ $$I_n=\frac{1}{4}[\pi/2-\text{Ei}(2m\pi)+\pi/2+\text{Ei}(2m\pi)]+\int_{-m\pi}^{m\pi} \frac{\sin^2 t}{t}dt=\frac{\pi}{4} $$