Show that a function defined by an integral is differentiable Define $$g(a)=\int_{0}^{\infty}\frac{\sin(ax)}{x}e^{-x}dx,\ \ \ \ \ \ a\in\mathbb{R}$$
a) Show that $g(a)$ is differentiable and compute $g'(a)$.
b) Use this to compute $g(a)$.
I have tried various things involving convergence theorems, the definition of the derivative, partialintegration etc.. but i quickly get stuck.
I am looking for some good hints and tips on how to solve this problem (and if i still fail, a solution).
 A: Let $f(a,x)=\frac{\sin(ax)}{x}e^{-x}$. There is a theorem which is a consequence of Lebesgue dominated convergence theorem, stating that if there exists an integrable function $h$ such that $\forall x\geq 0$ and $\forall a\in\mathbb{R}$, $\left\vert\frac{\partial f(a,x)}{\partial a}\right\vert\leq h(x)$, then $g$ is differentiable and you can differentiate under the integral sign. Can you find such a function $h$ ?
A: The computation parts: 
Since the limits do not depend on $a$ then it is a simple derivative pattern
\begin{align}
g'(a) &= \frac{d}{da} \, \int_{0}^{\infty} \frac{\sin(ax)}{x} \, e^{-x} \, dx \\
&= \int_{0}^{\infty} e^{-x} \, \cos(ax) \, dx \\
&= \frac{1}{1+ a^{2}}.
\end{align}
Now integration with respect to $a$ yields
\begin{align}
g(a) &= \int^{a} \frac{du}{1+u^2} + c_{0} \\
&= \tan^{-1}(a) + c_{0}.
\end{align}
Returning to the original integral it is quickly determined that $g(0) = 0$, since $\sin(0) = 0$, and leads to $c_{0} = 0$. Hence,
$$ \int_{0}^{\infty} \sin(ax) \, e^{-x} \, \frac{dx}{x} = \tan^{-1}(a).$$

This may be extended to
\begin{align}
\int_{0}^{\infty} \sin(ax) \, e^{- b x} \, \frac{dx}{x} = \tan^{-1}\left(\frac{a}{b}\right).
\end{align}
If $b = a$ then
$$ \int_{0}^{\infty} \sin(ax) \, e^{- a x} \, \frac{dx}{x} = \int_{0}^{\infty} e^{-t} \, \sin(t) \, \frac{dt}{t} = \frac{\pi}{4}.$$
