Proper Rational Functions
A proper rational function is one in which the degree of the numerator
is less than that of the denominator.
\[ \text{e.g.}
\frac{3}{x+2}
\]
All others are termed improper.
These can be simplified using
long division
.
The degree of the numerator must be lower than that of the denominator. If not, divide first.
Example
\[
\frac{x^2 + 3x + 8}{x+5}
\]
So:
\[
\frac{x^2 + 3x + 8}{x+5} = x - 2
+
\frac{18}{x+5} \]
General Forms
\[
\text{Linear denominator}
\]
\[
\frac{a}{bx + c}
\qquad
b \ne 0,\;\; bx + c \ne 0
\]
\[
\text{Quadratic denominator}
\]
\[
\frac{ax + b}{cx^2 + dx + e}
\qquad
c \ne 0,\;\; cx^2 + dx + e \ne 0
\]
Partial fractions are decomposed components of a rational expression.
Example
\[
\frac{3}{x - 2} + \frac{4}{x + 1}
\]
\[
\text{are the partial fractions of}
\]
\[
\frac{7x - 5}{(x - 2)(x + 1)}
\]
Since:
\[
\begin{aligned}
\frac{3}{x - 2} + \frac{4}{x + 1}
&=
\frac{3(x + 1) + 4(x - 2)}{(x - 2)(x + 1)}
\\[1em]
&=
\frac{3x + 3 + 4x - 8}{(x - 2)(x + 1)}
\\[1em]
&=
\frac{7x - 5}{(x - 2)(x + 1)}
\end{aligned}
\]
The steps taken to find the partial fractions depend on the original function:
- Distinct linear factors
- Repeated linear factor
- Irreducible quadratic factor
Example
Express \( \frac{5x-3}{x^2+x-30} \) in partial fractions.
First,write the denominator in factorised form:
\[
\frac{5x - 3}{x^2 + x - 30}
=
\frac{5x - 3}{(x - 5)(x + 6)}
\]
Now set this equal to two partial fractions
\[
\frac{5x - 3}{(x - 5)(x + 6)}
=
\frac{A}{x - 5}
+
\frac{B}{x + 6}
\]
Thus
\[
\frac{5x - 3}{(x - 5)(x + 6)}
\;\equiv\;
\frac{A(x + 6) + B(x - 5)}{(x - 5)(x + 6)}
\]
This is an identity, so A and B can be found by comparing co-efficients
\[
5x - 3 = A(x + 6) + B(x - 5)
\]
Now pick values of x to find A and B
\[
\begin{aligned}
\text{Let } x &= -6 \\
-33 &= -11B \\
B &= 3
\end{aligned}
\]
\[
\begin{aligned}
\text{Let } x &= 5 \\
22 &= 11A \\
A &= 2
\end{aligned}
\]
Substitute back into equation
\[
\frac{5x - 3}{(x - 5)(x + 6)}
=
\frac{2}{x - 5}
+
\frac{3}{x + 6}
\]
Example
\[
\frac{7x - 1}{(x-1)(x+2)}
\]
Factorise the denominator:
\[
(x-1)(x+2)
\]
Set up partial fractions:
\[
\frac{7x - 1}{(x-1)(x+2)}
= \frac{A}{x-1} + \frac{B}{x+2}
\]
Multiply through:
\[
7x - 1 = A(x+2) + B(x-1)
\]
Compare coefficients:
\[
A + B = 7
\]
\[
2A - B = -1
\]
Solving gives:
\[
A = 2,\quad B = 5
\]
Final answer:
\[
\frac{7x - 1}{(x-1)(x+2)}
= \frac{2}{x-1} + \frac{5}{x+2}
\]
Repeated Factors in Partial Fractions
When the denominator contains a repeated linear factor such as
\((x - 1)^n\), the partial–fractions decomposition must include
one term for every power from 1 up to \(n\).
\[
\frac{1}{(x - 1)^n}
\;\longrightarrow\;
\frac{A_1}{x - 1}
+ \frac{A_2}{(x - 1)^2}
+ \cdots
+ \frac{A_n}{(x - 1)^n}
\]
Each power contributes a distinct algebraic form that cannot be
recreated by the others. Leaving any out would make it impossible
to match all possible numerators; adding more would be redundant.
\[
\frac{\text{function}}{(ax + b)^{2}}
=
\frac{A}{ax + b}
+
\frac{B}{(ax + b)^{2}}
\]
\[
\frac{\text{function}}{(ax + b)^{3}}
=
\frac{A}{ax + b}
+
\frac{B}{(ax + b)^{2}}
+
\frac{C}{(ax + b)^{3}}
\]
Example
\[
\frac{5x^{2} - 9x + 2}{(x - 2)(x - 1)^{2}}
=
\frac{A}{x - 2}
+
\frac{B}{x - 1}
+
\frac{C}{(x - 1)^{2}}
\]
Here, \((x - 1)^2\) is repeated, so we include both
\(\frac{B}{x - 1}\) and \(\frac{C}{(x - 1)^2}\).
Example
Express \( \frac{3x^2-11x+5}{(x-2)(x-1)^2} \) in partial fractions.
\[
\begin{aligned}
\frac{3x^{2} - 11x + 5}{(x - 2)(x - 1)^{2}}
&=
\frac{A}{x - 2}
+
\frac{B}{x - 1}
+
\frac{C}{(x - 1)^{2}}
\\[1.2em]
&=
\frac{
A(x - 1)^{2}
+
B(x - 2)(x - 1)
+
C(x - 2)
}{
( x - 2 )( x - 1 )^{2}
}
\end{aligned}
\]
So
\[
3x^{2} - 11x + 5
\;\equiv\;
A(x - 1)^{2}
+ B(x - 2)(x - 1)
+ C(x - 2)
\]
Now pick values of x to find A , B and C
\[
\begin{aligned}
\text{Let } x &= 1 \\[4pt]
3(1)^{2} - 11(1) + 5
&\equiv A(1 - 1)^{2} + B(1 - 2)(1 - 1) + C(1 - 2) \\[4pt]
3 - 11 + 5 &\equiv -C \\[4pt]
-3 &= -C \\[4pt]
C &= 3
\end{aligned}
\]
\[
\begin{aligned}
\text{Let } x &= 2 \\[6pt]
3(2)^{2} - 11(2) + 5
&\equiv A(2 - 1)^{2} + B(2 - 2)(2 - 1) + C(2 - 2) \\[6pt]
12 - 22 + 5 &\equiv A + 0 + 0 \\[6pt]
-5 &= A
\end{aligned}
\]
\[
\begin{aligned}
\text{Let } x &= 0 \\[6pt]
5 &= A + 2B - 2C \\[6pt]
5 &= -5 + 2B - 6 \\[6pt]
16 &= 2B \\[6pt]
B &= 8
\end{aligned}
\]
Substitute back into equation
\[
\frac{3x^{2} - 11x + 5}{(x - 2)(x - 1)^{2}}
\;=\;
\frac{-5}{x - 2}
\;+\;
\frac{8}{x - 1}
\;+\;
\frac{3}{(x - 1)^{2}}
\]
Example
\[
\frac{5x + 3}{(x+1)^2}
\]
Set up:
\[
\frac{5x + 3}{(x+1)^2}
= \frac{A}{x+1} + \frac{B}{(x+1)^2}
\]
Multiply through:
\[
5x + 3 = A(x+1) + B
\]
Compare coefficients:
\[
A = 5,\quad A + B = 3
\]
Thus:
\[
B = -2
\]
\[ \frac{5x + 3}{(x+1)^2} = \frac{5}{x+1} - \frac{2}{(x+1)^2} \]
Irreducible Quadratic Factor
Irreducible Quadratic Partial Fractions
When the denominator contains an irreducible quadratic
(a quadratic that cannot be factorised over the reals), the corresponding
partial–fractions term must use a linear numerator.
\[
\frac{1}{x^{2} - x + 5}
\;\longrightarrow\;
\frac{Ax + B}{x^{2} - x + 5}
\]
A constant alone is not general enough to match all possible expressions
that arise when recombining fractions. The linear numerator
is the most general form that fits.
Example
\[
\frac{7x - 3}{(x+1)(x^{2}+4)}
=
\frac{A}{x+1}
+
\frac{Bx + C}{x^{2}+4}.
\]
Rule of thumb:
Repeated linear factors → stack powers.
Irreducible quadratics → linear numerator.
Example
Express \( \frac{4x^2-4x+1}{(x-2)(x^2-x+1)} \) in partial fractions.
\[
\frac{4x^2-4x+1}{(x-2)(x^2-x+1)}
\]
Set up:
\[
\begin{aligned}
\frac{4x^{2} - 4x + 1}{(x - 2)(x^{2} - x + 1)}
&=
\frac{A}{x - 2}
+
\frac{Bx + C}{x^{2} - x + 1}
\\[1.2em]
&=
\frac{
A(x^{2} - x + 1)
+
(Bx + C)(x - 2)
}{
( x - 2 )( x^{2} - x + 1 )
}
\end{aligned}
\]
so
\[
4x^{2} - 4x + 1
=
A(x^{2} - x + 1)
+
(Bx + C)(x - 2)
\]
Now pick values of x to find A , B and C
\[
\begin{array}{l}
\text{Let } x = 2 \\[0.6em]
9 = 3A \\[0.6em]
A = 3
\end{array}
\]
\[
\begin{array}{l}
\text{Let } x = 0 \\[0.6em]
1 = A - 2C \\[0.6em]
2C = 2 \\[0.6em]
C = 1
\end{array}
\]
\[
\begin{array}{l}
\text{Let } x = 1 \\[0.6em]
1 = A - (B + C) \\[0.6em]
B = A - 1 - C \\[0.6em]
B = 1
\end{array}
\]
Giving
\[
\frac{4x^{2} - 4x + 1}{(x - 2)(x^{2} - x + 1)}
=
\frac{3}{x - 2}
+
\frac{x + 1}{x^{2} - x + 1}
\]
Integrating Rational Functions
Integrating Rational Functions
A rational function is a fraction in which both the numerator
and denominator are polynomials. To integrate one, the key strategy is to
rewrite it into simpler pieces whose integrals are already known.
If the degree of the numerator is greater than or equal to
the degree of the denominator, begin with polynomial division.
Otherwise, move straight to partial fractions.
Standard Integration Patterns
-
Simple linear factor:
\(\displaystyle \frac{A}{x - a} \;\longrightarrow\; A\ln|x - a|\)
-
Repeated linear factor:
\(\displaystyle \frac{A}{(x - a)^n} \;\longrightarrow\;
\frac{-A}{(n-1)(x - a)^{\,n-1}}\)
-
Irreducible quadratic:
\(\displaystyle \frac{Ax + B}{x^{2} + px + q}\)
splits into a logarithm (from the derivative-matching part)
and an arctangent (from the completed-square part).
Core idea:
Break the rational function into pieces whose integrals you already know.
Example
Find the integral:
\[
\int \frac{4x + 12}{x(x + 4)}\,dx
\]
First, find the partial fractions:
\[
\frac{4x + 12}{x(x + 4)}
=
\frac{A}{x}
+
\frac{B}{x + 4}
\]
\[
=
\frac{A(x + 4) + Bx}{x(x + 4)}
\]
\[
4x + 12 \;\equiv\; A(x + 4) + Bx
\]
\[
\begin{array}{l}
\text{Let } x = -4 \\[0.6em]
\Rightarrow\ -4 = -4B \\[0.6em]
\Rightarrow\ B = 1
\end{array}
\]
\[
\begin{array}{l}
\text{Let } x = 0 \\[0.6em]
12 = 4A \\[0.6em]
A = 3
\end{array}
\]
\[
\frac{4x + 12}{x(x + 4)}
=
\frac{3}{x}
+
\frac{1}{x + 4}
\]
Now integrate:
\[
\begin{array}{l}
\displaystyle \int \frac{4x + 12}{x(x+4)}\,dx
=
\int \left( \frac{3}{x} + \frac{1}{x+4} \right) dx
\\[1.2em]
=
3 \int \frac{1}{x}\,dx
\;+\;
\int \frac{1}{x+4}\,dx
\\[1.2em]
=
3\ln|x| + \ln|x+4| + C
\\[1.2em]
=
\ln\!\left| x^{3}(x+4) \right| + C
\\[1.2em]
\text{(letting } C = \ln K\text{)}
\\[0.6em]
=
\ln\!\left| K x^{3}(x+4) \right|
\end{array}
\]
Example
Find the integral:
\[
\int \frac{x}{(x+1)^{2}}\,dx
\]
\[
\frac{x}{(x+1)^{2}}
=
\frac{A}{x+1}
+
\frac{B}{(x+1)^{2}}
\]
\[
=
\frac{A(x+1) + B}{(x+1)^{2}}
\]
\[
x \;\equiv\; A(x+1) + B
\]
\[
\begin{array}{l}
\text{Let } x = -1 \\[0.6em]
-1 = B
\end{array}
\]
\[
\frac{x}{(x+1)^{2}}
=
\frac{1}{x+1}
-
\frac{1}{(x+1)^{2}}
\]
Now integrate:
\[
\begin{array}{l}
\displaystyle
\int \frac{x}{(x+1)^{2}}\,dx
=
\int \left(
\frac{1}{x+1}
-
\frac{1}{(x+1)^{2}}
\right) dx
\\[1.2em]
=
\int \frac{1}{x+1}\,dx
\;-\;
\int \frac{1}{(x+1)^{2}}\,dx
\\[1.2em]
=
\ln|x+1|
+
\frac{1}{x+1}
+
C
\end{array}
\]
Example
Find the integral:
\[
\int \frac{(2x - 1)}{(x-1)(x-2)(x+1)}\,dx
\]
\[
\begin{aligned}
\frac{2x - 1}{(x-1)(x-2)(x+1)}
&=
\frac{A}{x-1}
+
\frac{B}{x-2}
+
\frac{C}{x+1}
\\[1em]
&=
\frac{
A(x-2)(x+1)
+
B(x-1)(x+1)
+
C(x-1)(x-2)
}{
(x-1)(x-2)(x+1)
}
\end{aligned}
\]
\[
2x - 1 \;\equiv\;
A(x-2)(x+1)
\;+\;
B(x-1)(x+1)
\;+\;
C(x-1)(x-2)
\]
\[
\begin{aligned}
\text{Let } x = 2 \\[0.6em]
3 = 3B \\[0.6em]
B = 1
\end{aligned}
\]
\[
\begin{aligned}
\text{Let } x = 1 \\[0.6em]
1 = -2A \\[0.6em]
A = -\tfrac12
\end{aligned}
\]
\[
\begin{aligned}
\text{Let } x = -1 \\[0.6em]
-3 = 6C \\[0.6em]
C = -\tfrac12
\end{aligned}
\]
\[
\frac{(2x-1)}{(x-1)(x-2)(x+1)}
=
-\frac{1}{2(x-1)}
+
\frac{1}{x-2}
-
\frac{1}{2(x+1)}
\]
Now integrate:
\[
\begin{aligned}
\int \frac{(2x-1)}{(x-1)(x-2)(x+1)}\,dx
&=
\int \left(
-\frac{1}{2(x-1)}
+
\frac{1}{x-2}
-
\frac{1}{2(x+1)}
\right) dx
\\[1.2em]
&=
-\frac12 \int \frac{dx}{x-1}
\;+\;
\int \frac{dx}{x-2}
\;-\;
\frac12 \int \frac{dx}{x+1}
\end{aligned}
\]
\[
\begin{aligned}
&= -\tfrac12 \ln|x-1|
\;+\; \ln|x-2|
\;-\; \tfrac12 \ln|x+1|
\;+\; C
\\[1.2em]
&= \ln\!\left|
\frac{\,x-2\,}{
(x-1)^{1/2}(x+1)^{1/2}
}
\right| + C
\\[1.2em]
&= \ln\!\left|
\frac{\,x-2\,}{
\sqrt{x^2 - 1}
}
\right| + C
\end{aligned}
\]
\[
\begin{aligned}
\text{let } C &= \ln K
\\[0.8em]
\ln\!\left|
\frac{K(x-2)}{(x^{2}-1)^{1/2}}
\right|
\end{aligned}
\]
Example
Find the integral:
\[
\int \frac{x^{3} + x^{2} - 4x + 1}{x^{2} + x - 6}\,dx
\]
Get equation ready
\[
\frac{x^{3} + x^{2} - 4x + 1}{x^{2} + x - 6}
=
x
+
\frac{\,2x + 1\,}{x^{2} + x - 6}
\]
Process the remainder
\[
\begin{aligned}
\frac{2x + 1}{x^{2} + x - 6}
&=
\frac{A}{x - 2}
+
\frac{B}{x + 3}
\\[1.2em]
&=
\frac{A(x+3) + B(x-2)}{(x-2)(x+3)}
\end{aligned}
\]
\[
2x + 1 \;\equiv\; A(x + 3) + B(x - 2)
\]
\[
\begin{aligned}
\text{Let } x = -3 \\[0.6em]
-5 = -5B \\[0.6em]
B = 1
\end{aligned}
\]
\[
\begin{aligned}
\text{Let } x = 2 \\[0.6em]
5 = 5A \\[0.6em]
A = 1
\end{aligned}
\]
Put into integrable form
Now integrate:
\[
\begin{aligned}
\int \frac{x^{3} + x^{2} - 4x + 1}{x^{2} + x - 6}\,dx
&=
\int \left( x + \frac{1}{x-2} + \frac{1}{x+3} \right) dx
\\[1.2em]
&=
\int x\,dx
\;+\;
\int \frac{1}{x-2}\,dx
\;+\;
\int \frac{1}{x+3}\,dx
\\[1.2em]
&=
\frac12 x^{2}
\;+\;
\ln|x-2|
\;+\;
\ln|x+3|
\;+\; C
\\[1.2em]
&=
\frac12 x^{2}
\;+\;
\ln\!\left|(x-2)(x+3)\right|
\;+\; C
\\[1.2em]
&=
\frac12 x^{2}
\;+\;
\ln\!\left|x^{2} + x - 6\right|
\;+\; C
\end{aligned}
\]