Putting limit inside an integral to calculate $\int_0^\infty \frac{\sin x}{x}dx = \frac{\pi}{2}$ I'm trying to prove: $$\int_0^\infty \frac{\sin x}{x}dx = \frac{\pi}{2}$$
I have defined $\; I(a)= \int_0^\infty\frac{\sin x}{x}e^{-ax}dx\;$ for $a>0$, and I'm trying to show that: $$\frac{dI}{da}(a)=-\int_0^\infty \sin(x)  e^{-ax}dx$$
I started like this: $$\frac{dI}{da}(a)= \lim_{h \to 0} \frac{I(a+h)-I(a)}{h}=\lim_{h \to 0} \int_0^\infty \frac{\sin x}{x}\biggl(\frac{e^{-(a+h)x}-e^{-ax}}{h}\biggr)dx$$
Next I would like to put the limit inside the integral, and then I get what I want, but how can I justify this? Thanks
 A: You can use Fubini to calculate $I(a)$:
\begin{align}
\int^\infty_0 e^{-ax}\frac{\sin x}x\,dx&=\int^\infty_0 e^{-ax}\int^1_0\cos tx\,dt\,dx
\\&=\int^1_0\int^\infty_0 e^{-ax}\cos tx\,dx\,dt
\\&=\int^1_0\frac{a}{a^2+t^2}\,dt=\arctan\frac1a
\end{align}
Since $|\cos tx|\le1$, the double integral is absolutely convergent for any $a>0$.
As I said, this is not enough, we have to justify $\displaystyle I(0)=\lim_{a\to0+}I(a)$. We have 
$$I(0)-I(a)=\int^\infty_0\sin x\,\frac{1-e^{-ax}}x\,dx=\int^\infty_0\cos x\,\frac{1-(1+ax)\,e^{-ax}}{x^2}\,dx$$ by partial integration. Now, we can use the dominated convergence theorem, because $|\cos x|\le1$, and the fraction is $\ge0$ and $\le$ the minimum of $a^2$ and $x^{-2}$, i.e. dominated by an integrable function on $[0,\infty)$.
A: What you have done is possible only if the function is itegrable. Then because of linearity of derivation, integral and limit you can substitute them. This is possible since ${sinx\over x}{e^-ax}$ is integrable and bounded for $x\in [0,\infty)$ when $a\ge0$
