So in a comment on a now deleted post, dxiv wrote $\int \frac{1}{1-x^2}\ne \arctan(x) = \int \frac{1}{1+x^2}$. This is what's going on here. The integral of $\int \frac{1}{q(x)}$ where $q$ is a quadratic polynomial depends on whether its roots are real or complex. If its roots are real, $q$ factors as real polynomials and you can use partial fraction decomposition. If its roots are complex, you can complete the square and use the arctangent method. Now that's the core issue. Credit to dxiv for pointing it out.
Side note, whether the roots are real or complex depends on the discriminant of $q$. In this case the discriminant is $4^2+4^2\cdot 3=64 > 0$, so the roots are real, so you need to use partial fraction decomposition.
Side side note, there's actually a third case when the discriminant is 0, and $q$ has a double root. In this case, you can change variables to make $q=x^2$, then $\int \frac{1}{x^2} = \frac{-1}{x}$.