I have a question that asks to calculate the following integral:
$$ \int_0^\infty {\frac{w\cdot \sin w}{4a^2+w^2}dw} $$
In the official solution they used partial fraction decomposition in order to later use Plancherel's identity:
$$ \frac{w\cdot \sin w}{4a^2+w^2} = $$ $$ \frac{\sin w}{w}\cdot\frac{w^2}{w^2+4a^2} = $$ $$ \frac{\sin w}{w}(1-\frac{4a^2}{w^2+4a^2}) = $$ $$ \frac{\sin w}{w} - \frac{\sin w}{w} \cdot \frac{4a^2}{w^2+4a^2} $$
And then used Plancherel's identity.
But I didn't understand how to expand to partial fraction and in particular I didn't understand this equation: $$ \frac{\sin w}{w}\cdot\frac{w^2}{w^2+4a^2} = \frac{\sin w}{w}(1-\frac{4a^2}{w^2+4a^2}) $$
Can you please explain how to expand the integrand into partial fraction?
Consider the function:
$$I(a)=\int_0^\infty {\frac{w\cdot \sin (w)}{w^2+4\cdot a^2}\text{d}w},\space a>0$$
Rewrite the integrand as follows:
$$\frac{w\cdot \sin (w)}{w^2+4\cdot a^2}=\frac{w}{w}\cdot\frac{w\cdot \sin (w)}{w^2+4\cdot a^2}=\frac{\sin(w)}{w}\cdot\frac{w^2}{w^2+4\cdot a^2}=\frac{\sin(w)}{w}\cdot\frac{w^2+4\cdot a^2-4\cdot a^2}{w^2+4\cdot a^2}=\frac{\sin(w)}{w}\cdot\left(\frac{w^2+4\cdot a^2}{w^2+4\cdot a^2}-\frac{4\cdot a^2}{w^2+4\cdot a^2}\right)=\frac{\sin(w)}{w}\cdot\left(1-\frac{4\cdot a^2}{w^2+4\cdot a^2}\right)=\frac{\sin(w)}{w}-\frac{\sin(w)}{w}\cdot\frac{4\cdot a^2}{w^2+4\cdot a^2}$$
Then:
$$I(a)=\int_0^\infty {\frac{\sin (w)}{w}\text{d}w}-\int_0^\infty {\frac{\sin(w)}{w}\cdot\frac{4\cdot a^2}{w^2+4\cdot a^2}\text{d}w}$$
The left-hand integral is known as a Dirichlet integral and it can be derived that it evaluates to $\frac{\pi}{2}$:
$$I(a)=\frac{\pi}{2}-\int_0^\infty {\frac{\sin(w)}{w}\cdot\frac{4\cdot a^2}{w^2+4\cdot a^2}\text{d}w}$$
Let $w\mapsto 2\cdot a\cdot w$:
$$I(a)=\frac{\pi}{2}-\int_0^\infty {\frac{\sin(2\cdot a\cdot w)}{2\cdot a\cdot w}\cdot\frac{4\cdot a^2}{(2\cdot a\cdot w)^2+4\cdot a^2}\cdot(2\cdot a\space\text{d}w)}=\frac{\pi}{2}-\int_0^\infty {\frac{\sin(2\cdot a\cdot w)}{ w}\cdot\frac{1}{w^2+1}\text{d}w}$$
Recognize that the integrand is a continuous and continuously differentiable function and differentiate with respect to $a$ under the integral sign:
$$I'(a)=\frac{\text{d}}{\text{d}w}\left[\frac{\pi}{2}-\int_0^\infty {\frac{\sin(2\cdot a\cdot w)}{ w}\cdot\frac{1}{w^2+1}\text{d}w}\right]=-\int_0^\infty {\frac{\partial}{\partial a}\frac{\sin(2\cdot a\cdot w)}{ w}\cdot\frac{1}{w^2+1}\text{d}w}=-2\cdot\int_0^\infty {\frac{w}{w}\cdot\frac{\cos(2\cdot a\cdot w)}{w^2+1}\text{d}w}=-2\cdot\int_0^\infty {\frac{\cos(2\cdot a\cdot w)}{w^2+1}\text{d}w}$$
Recognize that the integrand is a continuous and continuously differentiable function and differentiate with respect to $a$ under the integral sign:
$$I''(a)=-2\cdot\frac{\text{d}}{\text{d}a}\int_0^\infty {\frac{\cos(2\cdot a\cdot w)}{w^2+1}\text{d}w}=-2\cdot\int_0^\infty {\frac{\partial}{\partial a}\frac{\cos(2\cdot a\cdot w)}{w^2+1}\text{d}w}=4\cdot\int_0^\infty {\frac{w\cdot\sin(2\cdot a\cdot w)}{w^2+1}\text{d}w}$$
Consider the original expression for $I(a)$:
$$I(a)=\int_0^\infty {\frac{w\cdot \sin (w)}{w^2+4\cdot a^2}\text{d}w}$$
Let $w\mapsto 2\cdot a\cdot w$:
$$I(a)=\int_0^\infty {\frac{2\cdot a\cdot w\cdot \sin(2\cdot a\cdot w)}{(2\cdot a\cdot w)^2+4\cdot a^2}\cdot(2\cdot a\space\text{d}w)}=\int_0^\infty {\frac{w\cdot \sin(2\cdot a\cdot w)}{w^2+1}\text{d}w}$$
Recognize that
$$I''(a)=4\cdot I(a)\Rightarrow I''(a)-4\cdot I(a)=0$$
Solving the differential equation yields
$$I(a) = \text{c}_{1}\cdot e^{2\cdot a} + \text{c}_{2}\cdot e^{-2\cdot a}$$
Differentiate with respect to $a$ on both sides:
$$I'(a) = 2\cdot\left(\text{c}_{1}\cdot e^{2\cdot a} - \text{c}_{2}\cdot e^{-2\cdot a}\right)$$
According to the closed form of $I(a)$, as $a$ approaches $0$, $I(a\rightarrow 0)=\text{c}_{1}+\text{c}_{2}$.
According to the integral form of $I(a)$, as $a$ approaches $0$, $I(a\rightarrow 0)=\frac{\pi}{2}-\int_0^\infty {0\space\text{d}w}=\frac{\pi}{2}$.
According to the closed form of $I'(a)$, as $a$ approaches $0$, $I'(a\rightarrow 0)=2\cdot(\text{c}_{1}-\text{c}_{2})$.
According to the integral form of $I'(a)$, as $a$ approaches $0$, $I'(a\rightarrow 0)=-2\cdot\int_0^\infty {\frac{1}{w^2+1}\text{d}w}=-2\cdot\frac{\pi}{2}=-\pi$.
It can be derived that $\text{c}_{1}=0$ and $\text{c}_{2}=\frac{\pi}{2}$.
Then,
$$I(a)=\int_0^\infty {\frac{w\cdot \sin (w)}{w^2+4\cdot a^2}\text{d}w}=\frac{\pi}{2}\cdot e^{-2\cdot a},\space a>0$$