I know we can anti-differentiate something like this using tan^-1 : 1/(x^2+4), but is there a way to expand this using partial fractions?
Let's mess around with this a bit. This IS spesh after all.
If we expand 1/(x^2-m^2), we find that this is equal to 1/2m*(1/(x-m)-1/(x+m))
So if we let m=ai, then our fraction becomes 1/(x^2+a^2)=1/2ai*(1/(x-ai)-1/(x+ai))
Integrating, we get -i/2a*ln((x-ai)/(x+aoi)) plus a constant.
On the other hand, we know that we can integrate 1/(x^2+a^2) to give 1/a*arctan(x/a)
When x=0, both sides are meant to equal zero. So I'm going to multiply the log term by a factor of something as that's what adding a constant does.
We eventually get LHS=-i/2a*ln((ai-x)/(ai+x))=1/a*arctan(x/a)
Or arctan(x/a)=-i/2ln((ai-x)/(ai+x))
If you want the meaning of what the natural log of a complex number means, use the identity e^ix=cis x, easily proven by showing that both sides satisfy dy/dx=iy and y(0)=1. AKA rewrite a complex number rcis t in the form re^it. Then if z=re^it, ln z=ln(r)+it. Note that this means the natural log is multivalued; the principal value of the log corresponds to the one with the principal value of the argument.
Just thought I'd say this.