Distribution of $W=\alpha X+\beta Y$ Let $\alpha X$ and $\beta Y$ be two variables which follow a Cauchy distribution:
$$
f_{\alpha X}(x)=\frac{1}{\alpha \pi\left(1+(x / \alpha)^{2}\right)}, \quad f_{\beta Y}(x)=\frac{1}{\beta \pi\left(1+(x / \beta)^{2}\right)}, \quad-\infty<x<\infty .
$$
Show that the distribution of $W=\alpha X+\beta Y$ is a Cauchy distribution.
We want to proof this by the Residue theorem.
First by the convolution product we get
$f_{W}(w)=\left(f_{\alpha X} * f_{\beta Y}\right)(w)=\int_{-\infty}^{\infty} \frac{1}{\alpha \pi\left(1+((w-x) / \alpha)^{2}\right)}\frac{1}{\beta \pi\left(1+(x / \beta)^{2}\right)}  d x$.
To calculate this integral, we introduce a path  $\gamma_{N}, N>0$, the contour given by the semicircle centered at 0 and of radius $N$ in the upper half-plane of the complex plane. We write $\gamma_{N} \cap \mathbb{R}=[-N, N]$ and $\gamma_{N} \cap \{z \in \mathbb{C} ; \operatorname{Im} z>0\}=: \gamma^{+}$. Let us consider the integral:
$I\left(\gamma_{N}\right)=\int_{\gamma_{N}} \frac{1}{\alpha \pi\left(1+((w-z) / \alpha)^{2}\right)}\frac{1}{\beta \pi\left(1+(z / \beta)^{2}\right)}  d z=\int_{\gamma_{N}} g(z) d z$.
We observe that g(z) has its poles in $w \pm i \alpha$ and $\pm i\beta$.
Residue in $z = w + \alpha i$:
$$f(z) = (z-w-\alpha i ) g(z) = ... = \frac{\alpha}{\pi^2\beta(z-w+\alpha i)(1 + (z/\beta)^2)}$$
Thus,$$
f(w+\alpha i ) = ... = \frac{\beta}{2\pi^2 i (\beta^2 + (w + \alpha i )^2)}$$
Residue in $z = \beta i$:
$$f(z) = (z-\beta i ) g(z) = ... =  \frac{\beta \alpha}{\pi^2(\alpha^2 + (w-z)^2)(z+ \beta i)}$$
Thus,
$$f(\beta i ) = ... = \frac{\alpha}{2i\pi^2(\alpha^2 + (w-\beta i)^2)}$$
Now if I compute
$2\pi i( f(w+\alpha i ) + f(\beta i ))$, I find something very strange and not something that looks like a Cauchy distribution.
Would be happy about some help.
 A: As @Kavi Rama Murthy mentioned, we can use the characteristic functions to find the solution. We can even solve a more general case.
Let's consider the set of independent distributions $X_1....X_n$ with the PDFs $f_k(x_k)=\frac{a_k}{\pi(a^2_k+x^2_k)},\, \,k=1,2,...n$. Let's suppose that all $a_1,...a_n>0$.
We want to find the PDF of $\,\Xi=c_1X_1+c_2X_2+...+c_nX_n$ (we also suppose that all $c_1, ...c_n>0$).
To find the PDF we have to integrate the product of $f_1(x_1)...f_n(x_n)$ over $x_1, ...x_n$, but with the imposed condition: $c_1x_1+c_2x_2+...+c_nx_n=\xi=\operatorname{const}$, what can be done via the Dirac' delta-function:
$$\Xi(\xi)=\int_{-\infty}^\infty..\int_{-\infty}^\infty dx_1...dx_n f_1(x_1)...f_n(x_n) \delta (c_1x_1+c_2x_2+...+c_nx_n-\xi) $$
We use the representation of delta-function $\delta(b-\xi)=\frac{1}{2\pi}\int_{-\infty}^\infty e^{is(b-\xi)}ds$. We also change (without justification) the order of integration to get
$$\Xi(\xi)=\frac{1}{2\pi}\int_{-\infty}^\infty dse^{-is\xi}\int_{-\infty}^\infty..\int_{-\infty}^\infty dx_1...dx_n f_1(x_1)e^{isc_1x_1}...f_n(x_n)e^{isc_nx_n} $$
$I(s)=\int_{-\infty}^\infty..\int_{-\infty}^\infty dx_1...dx_n f_1(x_1)e^{isc_1x_1}...f_n(x_n)e^{isc_nx_n}$ is so called the characteristic function of $\Xi$ distribution.
For the given $f_k(x_k)$ we have
$I(s)=I_1(s)...I_n(s)$, where $I_k(s)=\frac{a_k}{\pi}\int_{-\infty}^\infty \frac{e^{isc_kx_k}}{a_k^2+x_k^2}dx_k$ . This integral is well-known and can be obtained by means of integration in the complex plane (closing the contour in the upper-half-plane for $s>0$, and in the lower half-plane for $s<0$). For example, for $s>0$
$$I_k(s)=\frac{a_k}{\pi}2\pi i\frac{e^{-sc_ka_k}}{2ia_k}=e^{-sc_ka_k}$$
For $s\in R\,\,\,\, I_k(s)=e^{-|s|c_ka_k}$
$$I(s)=I_1(s)...I_n(s)=e^{-|s|(c_1a_1+c_2a_2+...+c_na_n)}$$
$$\Xi(\xi)=\frac{1}{2\pi}\int_{-\infty}^\infty dse^{-is\xi}I(s)=\frac{1}{\pi}\Re\int_0^\infty dse^{-is\xi-s(c_1a_1+...+c_na_n)}$$
$$\Xi(\xi)=\frac{1}{\pi}\frac{c_1a_1+...+c_na_n}{(c_1a_1+...+c_na_n)^2+\xi^2}$$
For our specific case $c_1=a_1; c_2=a_2; c_k=0, k=3,4,... n$
$$\Xi(\xi)=\frac{1}{\pi}\frac{a^2_1+a^2_2}{(a^2_1+a^2_2)^2+\xi^2}$$
