# Integrating rational functions with irreducible quadratic denominators; Which method to use and when?

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?

• You use both. Partial fractions will get you to integrals with either denominators of the form $(ax+b)^k$ and constant numerators, which can be solved by substitution; or fractions of the form $(Ax+B)/(q(x))^k$ where $k$ is an irreducible quadratic. You divide those into fractions of the form $Ax/(q(x))^k$ which can be solved by substitution, setting $u=q(x)$; and fractions of the form $B/(q(x))^k$. If $k=1$, you do substitution to get arctangent. If $k\gt 1$, you use a reduction formula Nov 23, 2022 at 19:22
• Ah yes, that makes sense. Thank you. I think I generated a lot of unnecessary confusion for myself as well because I misread the problem and, in my work, had the denominator written as $x^2 - 3x + 5$ Which obviously can't be factored into linear terms and gives a messy answer when using the other method. Once I realized that the solution was simple. Thank you for the clarification, though. Nov 23, 2022 at 19:34

The denominator in the first equation can be written as $$(x-1)(x-2)$$. So you should do a partial fraction decomposition. For your last integral you also start with a partial fraction decomposition, but then you need to separate things a little bit. Suppose $$ax^2+bx+c$$ is irreducible. Then we need to deal with $$Ax+B$$. The first thing is to make a substitution $$u=ax^2+bx+c$$, $$du=(2ax+b)dx$$. Then$$Ax+B=\frac A{2a}(2ax+b)+B-\frac{Ab}{2a}$$ Therefore $$\int\frac{Ax+B}{ax^2+bx+c}dx=\frac{A}{2a}\int\frac{2ax+b}{ax^2+bx+c}dx+\left(B-\frac{Ab}{2a}\right)\int\frac1{ax^2+bx+c}dx$$ The first integral is just $$\ln(ax^2+bx+c)$$, then you complete the square in the denominator and make another substitution. $$ax^2+bx+c=\left(\sqrt ax+\frac{b}{2\sqrt a}\right)^2+c-\frac{b^2}{4a}$$