I have this integral: $$ \int \frac{1}{(1+x^2)(1+(z-x)^2)} {\rm d}x $$ and I want to perform partial fraction decomposition in this form $$ \int \left( \frac{Ax + B}{1+x^2} + \frac{Cx + D }{1+(z-x)^2} \right) {\rm d}x $$ but I can't get the right coefficients A, B, C, D. Is this the right way to do it?
Edit: My mistake was in expanding the brackets $$ (Ax+B)(1+(z-x)^2)+(Cx+D)(1+x^2)=1 $$ particularly, instead of $Axz^2$ I arrived to $Az^2$ and then I was trying to solve completely dfferent system of equations.