What is the Fourier Sine Transform of $\frac{1}{x(a^2+x^2)}$? (Please check my solution) My textbook says that the answer is $\frac{\pi}{2a^2}(1-e^{-as})$ while my answer is $\frac{1}{a^2}\sqrt{\frac{\pi}{2}}(1-\frac{e^{-as}}{2}+\frac{e^{as}}{2})$. Here is my solution:
\begin{align}
\hat{f_s} & = \sqrt{\frac{2}{\pi}} \int_0^\infty \frac{1}{t(a^2+t^2)} \sin{st}dt \\
 & = \sqrt{\frac{2}{\pi}} \int_0^\infty \frac{t}{a^2}[\frac{1}{t^2} -\frac{1}{(a^2+t^2)}] \sin{st}dt \\
 & = \frac{1}{a^2}\sqrt{\frac{2}{\pi}} \int_0^\infty [\frac{\sin{st}}{t} -\frac{t}{(a^2+t^2)} \sin{st}] dt \\
 & = \frac{1}{a^2}\sqrt{\frac{2}{\pi}} \left( \frac{\pi}{2} - \int_0^\infty \frac{t}{(a^2+t^2)} \sin{st} dt \right) 
\end{align}
Let this integral be $y$. Therefore,
\begin{align}
y & = \int_0^\infty \frac{t}{(a^2+t^2)} \sin{st} dt  \\
 & = \int_0^\infty \frac{1}{t}[1 -\frac{a^2}{(a^2+t^2)}] \sin{st}dt \\
 & = \int_0^\infty [\frac{\sin{st}}{t} -\frac{a^2}{t(a^2+t^2)} \sin{st}] dt \\
 & = \left( \frac{\pi}{2} - \int_0^\infty \frac{a^2}{t(a^2+t^2)} \sin{st} dt \right) 
\end{align}
Differentiating $y$ w.r.t. $s$ twice, we get
\begin{align}
y'' & = a^2\int_0^\infty \frac{t}{(a^2+t^2)} \sin{st} dt  \\
 & = a^2 y \\
\end{align}
This is a second order differential equation, whose solution is 
$$y= C_1e^{-as}+C_2e^{as}$$
Put $s=0$ in $y$ and $y'$, we get $C_1 = \frac{\pi}{4} = - C_2$. Thus, we get $$y = \frac{\pi}{4}(e^{-as}-e^{as})$$ or
$$\hat{f_s}=\frac{1}{a^2}\sqrt{\frac{2}{\pi}}\left(\frac{\pi}{2} - \frac{\pi}{4}(e^{-as}-e^{as})\right)$$ which is nothing but $$\hat{f_s}=\frac{1}{a^2}\sqrt{\frac{\pi}{2}}(1-\frac{e^{-as}}{2}+\frac{e^{as}}{2})$$

If you differentiate,
\begin{align}
   \left(-\frac{d^2}{ds^2}+a^2\right)\int_{0}^{\infty}\frac{1}{t(t^2+a^2)}\sin(st)dt 
  &= \int_{0}^{\infty}\frac{\sin(st)}{t}dt \\
  &=\int_{0}^{\infty}\frac{\sin(st)}{(st)}d(st) \\
  &=\int_{0}^{\infty}\frac{\sin(u)}{u}du=\frac{\pi}{2}.
\end{align}
Therefore, $f(s)=\int_{0}^{\infty}\frac{1}{t(t^2+a^2)}\sin(st)dt$ is a solution of
$$
               (-D^2+a^2)f=\frac{\pi}{2} \\
               D(-D^2+a^2)f=0.
$$
The general solution of this ODE is
$$
                 f(s)=Ae^{as}+Be^{-as}+C
$$
Plugging into the ODE gives $a^2C=\frac{\pi}{2}$.
And $f(0)=0$ gives
$$ A+B +C = 0 \\
     A+B = -\frac{\pi}{2a^2}
$$
Also, $t=au$ gives
$$
       f'(0) = \int_{0}^{\infty}\frac{1}{t^2+a^2}dt=\frac{1}{a}\int_{0}^{\infty}\frac{du}{1+u^2}=\frac{\pi}{2a} \\
          \implies A-B= \frac{\pi}{2a^2}.
$$
Adding and subtracting the equations in $A$,$B$ gives
$$
                      A = 0, \;\; B=-\frac{\pi}{2a^2}
$$
Therefore
$$
       f(s) = C+Be^{-as} = \frac{\pi}{2a^2}(1-e^{-as}).
$$
Typically, the sin transform is $\sqrt{\frac{2}{\pi}}f(s)$, which would give
$$
         \sqrt{\frac{2}{\pi}}\int_{0}^{\infty}\frac{1}{t(a^2+t^2)}\sin(st)dt = \sqrt{\frac{\pi}{2}}\frac{1}{a^2}(1-e^{-as})
$$



Interchanging Differentiation and Integration: You can differentiate with respect to $s$ for $s > 0$ because the improper Riemann integral becomes an alternating series where the error term is bounded by the first neglected term in the series. So you get uniform convergence of the alternating series, its first derivative, and it's second derivative in $s$, provided $s$ remains bounded away from $0$ by any small amount. To be more precise,
\begin{align}
   \mathcal{S}\{f\}(s) & =\int_{0}^{\infty}\frac{1}{t(t^2+a^2)}\sin(st)dt \\
   & =
    \int_{0}^{\infty}\frac{1}{(u/s)((u/s)^2+a^2)}\sin(u)\frac{du}{s} \\
   & = s^2\int_{0}^{\infty}\frac{\sin(u)}{u(u^2+s^2a^2)}du \\
   & = s^2\sum_{n=1}^{\infty}(-1)^{n-1}\int_{(n-1)\pi}^{n\pi}\frac{|\sin(u)|}{u(u^2+s^2a^2)}du \\
   & = s^2\sum_{n=1}^{\infty}(-1)^{n-1}f_n(s)
\end{align}
This is an alternating series where $f_n(s) \ge 0$ for $n=1,2,3,\cdots$, and
$$
        \frac{2}{(n\pi)(n^2\pi^2+s^2a^2)}\le f_n(s) 
     \le\frac{2}{((n-1)\pi)((n-1)^2\pi^2+s^2a^2)} \\
          \implies    0 < f_{n+1}(s) \le f_{n}(s),\;\;\; n=1,2,3,\cdots.
$$
This gives you an alternating series for the improper integral, and, for any fixed $\delta > 0$, the series converges uniformly for $s \ge \delta > 0$ because the alternating series satisfies
$$
                \left|\sum_{n=1}^{\infty}(-1)^{n-1}f_n(s)-\sum_{n=1}^{N}(-1)^{n-1}f_n(s)\right| \le f_{N+1}(s) \rightarrow 0 \mbox{ uniformly for $s \ge \delta > 0$ as $N\rightarrow\infty$}.
$$
The functions $f_n(s)$ are infinitely differentiable in $s$, and
$$
   f_n'(s) = -2sa^2\int_{(n-1)\pi}^{n\pi}\frac{|\sin(u)|}{u(u^2+s^2a^2)^2}du
$$
So the series of derivatives of $f_n'(s)$ is also an alternating series which converges uniformly for $0 < \delta \le s < \infty$. You can do the same thing for second derivatives as well. By classical theorems of differentiation for such series,
$$
       \frac{d}{ds} \sum_{n}(-1)^nf_n(s)=\sum_{n}(-1)^nf_n'(s), \\
       \frac{d^2}{ds^2}\sum_{n}(-1)^nf_n(s)=\sum_{n}(-1)^nf_n''(s).
$$
The end result is that you may interchange differentiation and the improper Riemann integrals:
$$
    \frac{d}{ds}\mathcal{S}\{f\}(s)=\int_{0}^{\infty}\frac{1}{t(t^2+a^2)}\frac{d}{ds}\sin(st)ds \\
    \frac{d^2}{ds^2}\mathcal{S}\{f\}(s)=\int_{0}^{\infty}\frac{1}{t(t^2+a^2)}\frac{d^2}{ds^2}\sin(st)dt.
$$
