I am having trouble understanding this derivation of the characteristic function of the Cauchy distribution. Specifically the last step
I noticed identity $x^{2}+a^{2} = (x-ai)(x+ai)$ and plugged it in to $p(x)$, giving me
splitting the term $p(x)$ as:
$$p(x)=\frac{a}{\pi(x-ai)(x+ai)}$$
I then split $p(x)$ into two terms, as:
$$\frac{a}{\pi} \left ( \frac{1}{(x-ai)(x+ai)} \right ) = \frac{a}{\pi} \left ( \frac{A}{(x-ai)} + \frac{B}{(x+ai)} \right )$$
where $A$ and $B$ are constants (I used this approach a while back but forgot the name). To find these terms, I multiply the denominator for each term, giving me
$$1 = A(x+ai) + B(x-ai) = Ax + Bx + Aai-Bai$$
Given that $A=B$, I get $1=Ax + Bx = 2Ax $ and get $A=1/2x$. After plugging this in for $A$ and $B$ I get
$$p(x) = \frac{a}{2x\pi} \left ( \frac{1}{(x-ai)} + \frac{1}{(x+ai)} \right )$$
If I plug in $p(x)$ and equate it to the solution I get
$$\frac{a}{2\pi x} \left ( \frac{1}{x-ai} + \frac{1}{x+ai}\right ) = \frac{1}{2\pi i} \left [ \frac{1}{x-ia} - \frac{1}{x+ia} \right ]$$
But I don't see how these terms are equal and I'm not entirely sure that I've done the correct approach. Apologies if I'm getting the terminology wrong or if the result if super simple. I'm trying to teach myself some stat mech from Kardar and I don't work with characteristic functions or imaginary numbers much, so this derivation is giving me trouble.
Start from your equation $1 = A(x+ai) + B(x-ai) = Ax + Bx + Aai-Bai$.
Left hand side is a constant that does not depend on $x$. So all terms in r.h.s. containing $x$ should annihilate. Therefore $$A+B=0,$$ $$A=-B,$$ $$-2Bai=1,$$ $$B=-\frac{1}{2ai}$$ and $$A=\frac{1}{2ai}.$$