The process of decomposing a [[Rational Function]] to make it easier to work with (for example, to [[Integration|Integrate]]).
Let $f(x)= \frac{P(x)}{Q(x)}$ be a [[Rational Function]], with $\op{deg}(P(x)) < \op{deg}(Q(x))$.
## Method 1
$Q(x)$ is a product of distinct [[Linear]] [[Factor|Factors]].
$\huge
\begin{align}
\let N &= \deg(Q(x)) \\
\\
Q(x) &= (a_{1}x+b_{1})(a_{2}x+b_{2})\cdots(a_{N}x+b_{N})\\
&=
F_\ba{Q,1}
+F_\ba{Q,2} + \cdots
F_\ba{Q,N}
\end{align}
$
$P(x)$ is some [[Polynomial]]:
$\huge \begin{align}
P(x)=c_{0} + c_{1}x^1 + \cdots
\end{align} $
We can write the rational function as:
$\huge \begin{align}
\frac{P(x)}{Q(x)} &=
\frac{A_{1}}{(a_{1}x+b_{1})} +
\frac{A_{2}}{(a_{2}x+b_{2})} +
\cdots
\frac{A_{N}}{(a_{N}x+b_{N})} +
\\
&=
\frac{A_{1}}{F_\ba{Q,1}}+
\frac{A_{2}}{F_\ba{Q,2}}+\cdots
\frac{A_{N}}{F_\ba{Q,N}}
\end{align}$
for some constants $A_1, \dots, A_N$.
$ \huge
\begin{align}
\\
\frac{P(x)}{Q(x)} &=
\frac{
\sum_{n}^{N}{
A_{n} \prod_{i=1}^{N - 1}{F_\ba{Q ,
1+\pa{\pa{n+i}\, \op{mod}\, N}
}}
}}{
F_\ba{Q,1}+
F_\ba{Q,2}+\cdots
F_\ba{Q,N}
}\\
P(x)&= \sum_{n}^N A_{n}F_\ba{Q,n}
\end{align}
$
>[!example]
>$\huge \begin{align}
>
>\frac{x+4}{3x^2-2x-1} &=
>
>\frac{x+4}{\pa{3x+1}\pa{x-1}}
>\\
>&=
>\frac{A}{3x+1} +
>\frac{B}{x-1} \\
>&=
>\frac{A(x-1) + B(3x+1)}{(3x+1)(x-1)} \\
>\\
>\frac{\color{pink}x+4}{\pa{3x+1}\pa{x-1}} &=
>\frac{\color{pink}A(x-1) + B(3x+1)}{(3x+1)(x-1)} \\
>
>x+4 &=A(x- 1)+B(3x+1)\\
> &= Ax-A+3Bx+B\\
>x+4&=(A+3B)x+B-A \\
>
>&\therefore
>\\
>
>1&=A+3B\\
>4 &=B-A\\
>\end{align}$
>
>You can then solve the system of linear equations:
>$\huge \begin{align}
>B &=4+A \\
>\\
>1&=A+3(4+A) \\
>1&=A+12+3A \\
>-11 &=4A \\
>A &= -\frac{11}{4} \\
>\\
>B &= 4-\frac{11}{4}
>\\&= \frac{5}{4}
>\\
>\end{align}$
>$\huge \begin{align}
>
>\frac{x+4}{3x^2-2x-1} &=
>\boxed{
>\frac{ -\frac{11}{4} }{3x+1} +
>\frac{ \frac{5}{4} }{x-1}} \\
>\end{align}$