I'm just getting back into math after a long absence and wanted to start from the beginning with some of my weaknesses during undergrad: in this case, partial fraction decomposition. The problem I endeavor to solve is asking me to integrate $$\int_{-1}^{0} \frac{x^3 -4x +1}{x^2 - 3x + 2}dx$$ Now I have a general question about the nature of solving problems involving non-repeated irreducible quadratic denominators, like this one. The book I am following long with states that in this case we want to use the techniques of partial fractions and for each quadratic term ($ax^2 + bx + c$) we want to have a term $$\frac{Ax + B}{ax^2 + bx + c}$$ Which makes sense, however it then goes on to say that the general procedure for solving integrals with irreducible quadratic denominators is to complete the square to get the polynomial in a form like $(ax + b)^2 + c^2$ to then $u$-sub and utilize the following integral $\int \frac{dx}{x^2 + a^2} = \frac{1}{a}\tan^{-1}(\frac{x}{a}) +C$
My question is: Which one do I use and when? It is my suspicion that we use the method of partial fraction decomposition when there are more than one irreducible (nonrepeated) quadratic terms in the denominator, like say in the following integral: $$ \int \frac{x}{(x-2)(x^2 + 1)(x^2 + 4)}$$ And in cases where we have a solitary irreducible quadratic function (like the one we have here) we would use the method of completing the square, $u$-subbing then leveraging $\int \frac{dx}{x^2 + a^2}$ above. Since with one term in the denominator we wouldn't actually end up getting anywhere with our partial fraction method, we would simply return the same numerator when equating the undetermined coefficients to the original polynomial in the numerator. Is this correct thinking?