Example 1. Find $\int \frac{7 x^{3}-4 x^{2}-32 x-37}{(x+2)(2 x-1)\left(x^{2}+2 x+3\right)} d x$.
Solution. The integrand is a proper rational fraction $(n=3, m=4)$, which we will represent as the sum of three simpler fractions:

$$
\begin{aligned}
& \frac{7 x^{3}-4 x^{2}-32 x-37}{(x+2)(2 x-1)\left(x^{2}+2 x+3\right)}=\frac{A}{x+2}+\frac{B}{2 x-1}+\frac{C x+D}{x^{2}+2 x+3}= \\
& \quad=\frac{A(2 x-1)\left(x^{2}+2 x+3\right)+B(x+2)\left(x^{2}+2 x+3\right)+(C x+D)(x+2)(2 x-1)}{(x+2)(2 x-1)\left(x^{2}+2 x+3\right)}
\end{aligned}
$$

In the numerator of the right-hand side, we expand the brackets and combine like terms. From the equality of the numerators of the original and the sought fraction, as well as from the equality of their coefficients at the same powers, we obtain a linear system of equations to determine the unknown coefficients $A, B, C$ and $D$:

$$
\left\{\begin{array}{rl}
x^{3} & 2 A+B+2 C=7 \\
x^{2}: & 3 A+4 B+3 C+2 D=-4 \\
x: 4 A+7 B-2 C+3 D=-32 \\
x^{0}: & -3 A+6 B-2 D=-37
\end{array}\right.
$$

Solving this system (for example, by the Jordan-Gauss method), we get $A=3, B=-5, C=3, D=-1$.
We return to the integral. Term-by-term integration leads to the answer:

$$
\begin{aligned}
& \int \frac{\left(7 x^{3}-4 x^{2}-32 x-37\right) d x}{(x+2)(2 x-1)\left(x^{2}+2 x+3\right)}=3 \int \frac{d x}{x+2}-5 \int \frac{d x}{2 x-1}+ \\
& +\int \frac{3 x-1}{x^{2}+2 x+3} d x=\left\{\int \frac{3 x-1}{x^{2}+2 x+3} d x=\frac{3}{2} \int \frac{2 x+2-\frac{2}{3}-2}{x^{2}+2 x+3} d x=\right. \\
& =\frac{3}{2} \int \frac{d\left(x^{2}+2 x+3\right)}{x^{2}+2 x+3}-4 \int \frac{d(x+1)}{(x+1)^{2}+2}= \\
& \left.=\frac{3}{2} \ln \left(x^{2}+2 x+3\right)-\frac{4}{\sqrt{2}} \operatorname{arctg} \frac{x+1}{\sqrt{2}}+C\right\}= \\
& =3 \ln |x+2|-\frac{5}{2} \ln |2 x-1|+\frac{3}{2} \ln \left(x^{2}+2 x+3\right)-\frac{4}{\sqrt{2}} \operatorname{arctg} \frac{x+1}{\sqrt{2}}+C \\
& \text { Example 2. Find } I=\int \frac{x^{2}+5 x-2}{(x-1)(x+1)^{2}} d x
\end{aligned}
$$

the rational function: $\frac{x^{2}+5 x-2}{(x-1)(x+1)^{2}}=\frac{A}{x-1}+\frac{B}{x+1}+\frac{C}{(x+1)^{2}}=$ $=\frac{A(x+1)^{2}+B(x-1)(x+1)+C(x-1)}{(x-1)(x+1)^{2}}$.

From the system

$$
\left\{\begin{array}{l}
x^{2}: A+B=1 \\
x^{\mathrm{I}}: 2 A+C=6 \\
x^{0}: A-B-2=-2
\end{array}\right.
$$

we get: $A=1, B=0, C=3$ and $I=\int \frac{d x}{x-1}+3 \int \frac{d x}{(x+1)^{2}}=\ln |x-1|-$ $-\frac{3}{x+1}+C$.