Calculus – Integration – Rational functions
Using the integrals \(\displaystyle\int\frac{1}{x+a}\,dx=\ln|x+a|+C\),
\[\int\frac{1}{x^2+a^2}\,dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)+C\quad\text{en}\quad \int\frac{x}{x^2+a^2}\,dx=\frac{1}{2}\ln(x^2+a^2)+C=\ln\sqrt{x^2+a^2}+C,\]we are able to evaluate integrals of many rational functions, quotients of polynomials, by using partial fractions.
Examples:
1) \(\displaystyle\int_0^2\frac{dx}{x^2+3x+2}\). Note that
\[\frac{1}{x^2+3x+2}=\frac{1}{(x+1)(x+2)}=\frac{A}{x+1}+\frac{B}{x+2}=\frac{A(x+2)+B(x+1)}{(x+1)(x+2)}=\frac{(A+B)x+2A+B}{(x+1)(x+2)}.\]This implies that \(A+B=0\) and \(2A+B=1\). Hence: \(A=1\) and \(B=-1\). Finally we then have:
\[\int_0^2\frac{dx}{x^2+3x+2}=\int_0^2\left(\frac{1}{x+1}-\frac{1}{x+2}\right)\,dx=\bigg[\ln(x+1)-\ln(x+2)\bigg]_0^2=\ln(3)-\ln(2).\]2) \(\displaystyle\int_0^1\frac{x+1}{x^2+5x+6}\,dx\). Note that
\[\frac{x+1}{x^2+5x+6}=\frac{x+1}{(x+2)(x+3)}=\frac{A}{x+2}+\frac{B}{x+3}=\frac{A(x+3)+B(x+2)}{(x+2)(x+3}=\frac{(A+B)x+3A+2B}{(x+2)(x+3)}.\]This implies that \(A+B=1\) and \(3A+2B=1\). Hence: \(A=-1\) and \(B=2\). Finally we then have:
\[\int_0^1\frac{x+1}{x^2+3x+2}\,dx=\int_0^1\left(\frac{2}{x+3}-\frac{1}{x+2}\right)\,dx=\bigg[2\ln(x+3)-\ln(x+2)\bigg]_0^1=5\ln(2)-3\ln(3).\]3) \(\displaystyle\int_{-1}^1\frac{dx}{x^2-9}\). Note that
\[\frac{1}{x^2-9}=\frac{1}{(x+3)(x-3)}=\frac{A}{x-3}+\frac{B}{x+3}=\frac{(A(x+3)+B(x-3)}{x^2-9}=\frac{(A+B)x+3A-3B}{x^2-9}.\]This implies that \(A+B=0\) and \(3A-3B=1\). Hence: \(A=\frac{1}{6}\) and \(B=-\frac{1}{6}\). Finally we then have:
\[\int_{-1}^1\frac{dx}{x^2-9}\,dx=\tfrac{1}{6}\int_{-1}^1\left(\frac{1}{x-3}-\frac{1}{x+3}\right)\,dx =\tfrac{1}{6}\bigg[\ln|x-3|-\ln(x+3)\bigg]_{-1}^1=-\tfrac{1}{3}\ln(2).\]4) \(\displaystyle\int_1^2\frac{2x^2-2x-2}{2x^3+3x^2-2x}\,dx\). Note that \(2x^3+3x^2-2x=x(2x^2+3x-2)=x(x+2)(2x-1)\) and therefore
\[\frac{2x^2-2x-2}{2x^3+3x^2-2x}=\frac{2x^2-2x-2}{x(x+2)(2x-1)}=\frac{A}{x}+\frac{B}{x+2}+\frac{C}{2x-1} =\frac{A(x+2)(2x-1)+Bx(2x-1)+Cx(x+2)}{x(x+2)(2x-1)}.\]This implies that \(2x^2-2x-2=A(x+2)(2x-1)+Bx(2x-1)+Cx(x+2)=(2A+2B+C)x^2+(3A-B+2C)x-2A\) and therefore \(2A+2B+C=2\), \(3A-B+2C=-2\) and \(-2A=-2\). Hence: \(A=1\), \(B=1\) and \(C=-2\).
It is also possible like this: \(2x^2-2x-2=A(x+2)(2x-1)+Bx(2x-1)+Cx(x+2)\) is an equality in two polynomials. These polynomials must be equal for an infinite number of values of \(x\), which implies that they must be equal for all \(x\in\mathbb{R}\) (so also for values for which the denominators of the fractions become zero). For \(x=0\) we then have that \(-2=-2A\) and therefore \(A=1\). For \(x=-2\) we then have that \(10=10B\) or equivalently \(B=1\). For \(x=\frac{1}{2}\) we then have that \(-\frac{5}{2}=\frac{5}{4}C\) and therefore \(C=-2\).
Finally we then have:
\[\int_1^2\frac{2x^2-2x-2}{2x^3+3x^2-2x}\,dx=\int_1^2\left(\frac{1}{x}+\frac{1}{x+2}-\frac{2}{2x-1}\right)\,dx =\bigg[\ln(x)+\ln(x+2)-\ln(2x-1)\bigg]_1^2=3\ln(2)-2\ln(3).\]5) \(\displaystyle\int_1^2\frac{2}{x(x^2+1)}\,dx\). Now we obtain
\[\frac{2}{x(x^2+1)}=\frac{A}{x}+\frac{Bx+C}{x^2+1}=\frac{A(x^2+1)+Bx^2+Cx}{x(x^2+1)}=\frac{(A+B)x^2+Cx+A}{x(x^2+1)}.\]This implies that \(A+B=0\), \(C=0\) and \(A=2\). Hence: \(B=-2\). Now we have:
\[\int_1^2\frac{2}{x(x^2+1)}\,dx=\int_1^2\left(\frac{2}{x}-\frac{2x}{x^2+1}\right)\,dx=\bigg[2\ln(x)-\ln(x^2+1)\bigg]_1^2=3\ln(2)-\ln(5).\]6) \(\displaystyle\int_0^1\frac{2}{(x+1)(x^2+1)}\,dx\). Now we obtain
\[\frac{2}{(x+1)(x^2+1)}=\frac{A}{x+1}+\frac{Bx+C}{x^2+1}=\frac{A(x^2+1)+Bx(x+1)+C(x+1)}{(x+1)(x^2+1)}=\frac{(A+B)x^2+(B+C)x+A+C}{(x+1)(x^2+1)}.\]This implies that \(A+B=0\), \(B+C=0\) and \(A+C=2\). Hence: \(A=C=1\) and \(B=-1\). Now we have:
\[\int_0^1\frac{2}{(x+1)(x^2+1)}\,dx=\int_0^1\left(\frac{1}{x+1}-\frac{x}{x^2+1}+\frac{1}{x^2+1}\right)\,dx=\bigg[\ln(x+1)-\tfrac{1}{2}\ln(x^2+1)+\arctan(x)\bigg]_0^1=\tfrac{1}{2}\ln(2)+\tfrac{1}{4}\pi.\]7) \(\displaystyle\int_0^1\frac{1}{(x+1)^2(x+2)}\,dx\). Now we obtain
\begin{align*} \frac{1}{(x+1)^2(x+2)}&=\frac{A(x+1)+B}{(x+1)^2}+\frac{C}{x+2}=\frac{A(x+1)(x+2)+B(x+2)+C(x+1)^2}{(x+1)^2(x+2)}\\[2.5mm] &=\frac{(A+C)x^2+(3A+B+2C)x+2A+2B+C}{(x+1)^2(x+2)}. \end{align*}This implies that \(A+C=0\), \(3A+B+2C=0\) and \(2A+2B+C=1\). Hence: \(A=-1\) and \(B=C=1\). Now we have:
\[\int_0^1\frac{1}{(x+1)^2(x+2)}\,dx=\int_0^1\left(-\frac{1}{x+1}+\frac{1}{(x+1)^2}+\frac{1}{x+2}\right)\,dx=\bigg[-\ln(x+1)-\frac{1}{x+1}+\ln(x+2)\bigg]_0^1=\tfrac{1}{2}-2\ln(2)+\ln(3).\]8) \(\displaystyle\int_0^1\frac{2}{(x+1)^2(x^2+1)}\,dx\). Now we obtain
\begin{align*} \frac{2}{(x+1)^2(x^2+1)}&=\frac{A(x+1)+B}{(x+1)^2}+\frac{Cx+D}{x^2+1}=\frac{A(x+1)(x^2+1)+B(x^2+1)+Cx(x+1)^2+D(x+1)^2}{(x+1)^2(x^2+1)}\\[2.5mm] &=\frac{(A+C)x^3+(A+B+2C+D)x^2+(A+C+2D)x+A+B+D}{(x+1)^2(x^2+1)}. \end{align*}This implies that \(A+C=0\), \(A+B+2C+D=0\), \(A+C+2D=0\) and \(A+B+D=2\). Hence: \(A=B=1\), \(C=-1\) and \(D=0\). Now we have:
\[\int_0^1\frac{2}{(x+1)^2(x^2+1)}\,dx=\int_0^1\left(\frac{1}{x+1}+\frac{1}{(x+1)^2}-\frac{x}{x^2+1}\right)\,dx=\bigg[\ln(x+1)-\frac{1}{x+1}-\tfrac{1}{2}\ln(x^2+1)\bigg]_0^1=\tfrac{1}{2}\ln(2)+\tfrac{1}{2}.\]Last modified on April 24, 2021
Teaching

