I was attempting to solve the integral $$\int \frac{1}{x^4 + 1} \, dx$$ And I came to a stop. What I tried doing was writing it as $$\int \frac{1}{(x^2 + i)(x^2 - i)} \, dx$$ Which can be simplified using partial fractions, resulting in $$\frac{1}{(x^2 + i)(x^2 - i)} = \frac{Ax + B}{x^2 + i} + \frac{Cx + D}{x^2 - i}$$ Which simplifies to $$\frac{1}{(x^2 + i)(x^2 - i)} = \frac{Ax + B}{x^2 + i} + \frac{Cx + D}{x^2 - i}$$
After mutlipliying both sides, you get the result $1 = (Ax + B)(x^2 - i) + (Cx + D)(x^2 + i)$. And after expanding, you get: $$1 = (A + C) x^3 + (B + D) x^2 + (-A i + C i) x + (-B i + D i)$$ However, I tried solving for A, B, C, and D, and I could not get any result, more noticeably, I ran into a problem, as $- B i + D i = 1$, however wouldnt that indicate that that the real part is zero as there are only imaginary terms, in the LHS, yet the RHS has a real part equivalent to 1? I am very confused, and would appreciate any help possible.
Thank you to everyone who responded, especially SemiClassical for helping me realise my mistake. I finished the question and got the result: $$\int \frac{1}{x^4 + 1} \, dx = \frac{1}{2i} \left[ \frac{1}{2\sqrt{i}} \big( \ln(x - \sqrt{i}) - \ln(x + \sqrt{i}) \big) - \frac{1}{2\sqrt{-i}} \big( \ln(x - \sqrt{-i}) - \ln(x + \sqrt{-i}) \big) \right] + C$$
I understand it isn't a standard solution to the problem, but I am pretty sure it is a correct one.