Differentials and integrals: Integration techniques
Partial fraction decomposition
For rational functions, an effective approach is sometimes to rewrite a rational function as a sum of simpler rational functions. This method is known as partial fraction decomposition. A few examples illustrate this approach.
Example 1 \[\int \frac{1}{y(1-y)}\,\dd y\]
In partial fraction decomposition one first tries to find \(A\) and \(B\) such that \[\frac{1}{y(1-y)}=\frac{A}{y}+\frac{B}{1-y}.\] In order to find \(A\) and \(B\), we work out the right-hand side by bringing the terms under a common denominator: \[\begin{aligned}\frac{A}{y}+\frac{B}{1-y}&=\frac{A(1-y)}{y(1-y)}+\frac{B y}{y(1-y)}\\[0.25cm] &=\frac{A(1-y)+B y}{y(1-y)}\\[0.25cm] &=\frac{(B-A)y+A}{y(1-y)}\end{aligned}\] Thus, we get the equations \(B-A=0\) and \(A=1\). So \(A=1\) and \(B=1\), that is, \[\frac{1}{y(1-y)}=\frac{1}{y}+\frac{1}{1-y}\] Then the following reasoning is correct: \[\begin{aligned}\int\frac{1}{y(1-y)}\,\dd y&=\int\frac{1}{y}\,\dd y+\int\frac{1}{1-y}\dd y\\[0.25cm] &=\ln\bigl(|y|\bigr)-\ln\bigl(|1-y|\bigr)+c\end{aligned}\]
Not all denominators of rational functions can be split to some factors of degree 1 as above. Some polynomials have factors of degree 2 that cannot be further split into real factors. See the following examples to find out how to use partial fraction decomposition in such case.
Example 2 \[\int \frac{1}{x^3+4x}\,\dd x\]
In partial fraction decomposition one first tries to find \(A\) \(A\), \(B\) and \(C\) such that \[\begin{aligned}\frac{1}{x^3+4x} &= \frac{1}{x(x^2+4)}\\[0.25cm] &=\frac{A}{x}+\frac{Bx+C}{x^2+4}, \end{aligned}\] In order to find \(A\), \(B\) and \(C\), we work out the right-hand side by bringing the terms under a common denominator: \[\begin{aligned}\frac{x}{x^3+4x} &=\frac{A(x^2+4) + (Bx+C)x}{x^3+4x}\\[0.25cm]&=\frac{(A+B)x^2 +Cx + 4A}{x^3+4x}\end{aligned}\] Thus, we get the equations \(A+B = 0\), \(C = 0\), and \(4A = 1\). So \(A=\frac{1}{4}\), \(B=-\frac{1}{4}\), \(C=0\). We get \[\begin{aligned} \int \frac{1}{x^3+4x}\,\dd x &=\frac{1}{4}\int\frac{1}{x}\dd x -\frac{1}{4} \int \frac{x}{x^2+4}\dd x\\[0.25cm] &=\frac{1}{4}\ln|x| -\frac{1}{8}\ln(x^2+4)+c \end{aligned}\] In the second logarithmic term, we omit absolute value bars because \(x^2+4\) is always positive.
Example 3 \[\int \frac{2 x^2 - x + 4}{x^3 + 4x} \, \dd x\]
The method of partial fraction decomposition goes as follows: \[\begin{aligned}\int \frac{2 x^2 - x + 4}{x^3 + 4x}\, \dd x & = \int \frac{2 x^2 - x + 4}{x ( x^2 + 4)}\,\dd x\\[0.25cm] &= \int\left( \frac{1}{x} + \frac{x-1}{x^2+4}\right) \dd x \\[0.25cm] &= \int \left(\frac{1}{x} + \frac{x}{x^2+4} + \frac{-1}{x^2+4}\right) \dd x \\[0.25cm] &= \ln |x| + \frac{1}{2}\ln |x^2+4| - \frac{1}{2}\arctan (\tfrac{1}{2}x)\end{aligned}\]
In the first step, the denominator is factored. Note that #x^2 + 4# cannot be factored further. The second step is partial fraction decomposition; here, #A, B, C# are solved from \[\frac{2 x^2 - x + 4}{x ( x^2 + 4)} = \frac{A}{x} + \frac{B x + C}{x^2+4}\]
The calculation, which we omit, yields #A = 1, B = 1, C=-1#. Because #x^2+4# is a quadratic term, a linear term is in the denominator. Finally, the integral #\int \dfrac{x-1}{x^2+4},dx# is split into two integrals, namely #\int \dfrac{x}{x^2+4},\dd x # and #\int \dfrac{-1}{x^2+4}, \dd x#.
The first of these can be tackled using the substitution #u = x^2 + 4#: with #\dd u = 2x ,\dd x#, we get \[\int \frac{x}{x^2+4}\, \dd x = \int \frac{1}{2} \frac{1}{u}\, \dd u = \frac{1}{2}\ln |u| =
\frac{1}{2}\ln |x^2+4|\] The second can be simplified using the substitution #x = 2v#. Then, with #\dd x = 2, \dd v#, we see \[\begin{aligned} \int \frac{-1}{x^2+4}\, \dd x&= \int 2 \frac{-1}{4 v^2 + 4}\, \dd v\\[0.25cm] &= - \frac{1}{2}\int\frac{1}{v^2 + 1}\, \dd v\\[0.25cm] &= \frac{1}{2}\arctan (v)\\[0.25cm] &= \frac{1}{2}\arctan(\tfrac{1}{2}x)\end{aligned}\]
Another situation that can occur is that the denominator can be factorised to factors of degree 1 or 2 that occur more than once. See below for worked-out examples in that situation.
Example 4 The following is true: \[\frac{1}{x(x+1)^2} = \frac{1}{x} + \frac{-x - \frac{1}{2}}{(x+1)^2}\]
To find this, write #\dfrac{1}{x(x+1)^2} = \dfrac{A}{x} + \dfrac{Bx + C}{(x+1)^2}# and solve for #A, B, C#. Note that there remains a term with #(x+1)^2# in the denominator, where the power of the numerator is one less.
Example 5 Consider the function \[f(x) = \frac{x^4-1}{x(x+1)^2}\] The numerator contains a term of degree four (as the highest power), which is higher than the third-degree term that appears as the highest power in the denominator when factoring. To find the antiderivative of #f(x)#, we can first perform long division of the numerator by the denominator, rewriting #f(x)# as a polynomial plus a remainder term, which is a rational function with denominator #x(x+1)^2 = x^3 + 2x^2 + x# and a numerator with terms of degree less than 3. Specifically, \[\begin{aligned}x^4 - 1 &= x \left( x^3 + 2x^2 + x \right) - 2x^3 - x^2 &= \\[0.25cm] &= x \left( x^3 + 2x^2 + x\right) - 2 \left( x^3 + 2x^2 + x \right) + 3 x^2 +2 x\end{aligned}\] From this, we have: \[
\begin{aligned}\frac{x^4-1}{x (x+1)^2} &= x - 2 + \frac{ 3 x^2 +2 x}{x (x+1)^2}\\[0.25cm] &= x - 2 + \frac{3x + 2}{(x+1)^2}\\[0.25cm] &= x - 2 + \frac{3(x + 1) -1}{(x+1)^2}\\[0.25cm] &= x - 2 + \frac{3}{(x+1)}-\frac{1}{(x+1)^2}\end{aligned}\]
Example 6 \[ \int \frac{1}{x^3+2x^2}\dd x. \]
We can now split the fraction as follows: \[\begin{aligned} \frac{1}{x^3+2x^2} &= \frac{1}{x^2(x+2)}\\[0.25cm] & = \frac{A}{x} + \frac{B}{x^2} + \frac{C}{x+2}, \end{aligned}\] and we find the unknowns \(A\), \(B\), and \(C\) by working out the right-hand side by bringing the terms under a common denominator: \[\begin{aligned} \frac{1}{x^3+2x^2} &= \frac{Ax(x+2) + B(x+2) + Cx^2}{x^3 + 2x^2}\\[0.25cm] &\frac{(A+C)x^2 + (2A+B)x + 2B}{x^3+2x^2}. \end{aligned}\] Thus, we get the equations \(A+C = 0\), \(2A + B = 0\) and \(2B = 1\). That gives \(A=-\frac{1}{4}\), \(B = \frac{1}{2}\), and \(C=\frac{1}{4}\). We get \[\begin{aligned} \int\frac{1}{x^3+2x^2}\dd x &=-\frac{1}{4}\int\frac{1}{x}\dd x + \frac{1}{2}\int\frac{1}{x^2}\dd x + \frac{1}{4}\int\frac{1}{x+2}\dd x\\[0.25cm]& = -\frac{1}{4}\ln|x| - \frac{1}{2x} + \frac{1}{4}\ln|x+2| + c\end{aligned}\]