Using Feynman's technique, I want to evaluate $$\int_0^{\infty}\frac{\cos{x}}{x^2+1} dx$$
I set
$$I(a)=\int_0^{\infty}\frac{\cos{ax}}{x^2+1} dx$$
which gives
$$I'(a)=\int_0^{\infty}\frac{-x\sin{ax}}{x^2+1} dx$$
$$I''(a)=\int_0^{\infty}\frac{-x^2\cos{ax}}{x^2+1} dx$$
However, when I try to form a differential equation, I get
$$I(a)-I''(a)=\int_0^{\infty}\cos{ax}\; dx$$
However, this integral doesn't converge and I'm stuck on how I can work my way around this. I know that to get the right answer, I need $I(a)-I''(a)=0$ but I can't get there. Can someone help me find the right way to do this question?