I'm ultimately trying to solve $$I(\alpha) = \int_0^{\infty} \dfrac{\cos (\alpha x)}{x^2 + 1} dx$$
by using differentiation under the integral. I realize that this is most easily done using residues but I'm intending this problem to introduce my advanced calculus 2/differential equations students to some interesting techniques before they take real analysis.
Differentiating under the integral a first time leads to
$$I'(\alpha) = \int_0^{\infty} \dfrac{-x \sin (\alpha x)}{x^2 + 1} dx = - \dfrac{\pi}{2} + \int_0^{\infty} \dfrac{\sin (\alpha x)}{x(x^2 + 1)}dx$$
by making use of the Dirichlet integral and again to
$$I''(\alpha) = \int_0^{\infty} \dfrac{\cos (\alpha x)}{x^2 + 1} = I(\alpha)$$
To solve this second-order ODE we'll need two initial conditions. The integral for $I'(\alpha)$ leads to the incorrect result $I'(0) = 0$ but the rewritten version leads to the correct result of $I'(0) = -\dfrac{\pi}{2}$. I'm having trouble justifying this.
Any help or guidance is appreciated. I'll also settle for simpler arguments as to why $I'(0) \neq 0$.