Example 1.5. Given the improper fraction $\frac{6 x^{3}+5 x^{2}+3 x-4}{x^{2}+4}$. It is necessary to represent it as the sum of a polynomial and a proper fraction.
Solution.

$$
\frac{6 x^{3}+5 x^{2}+3 x-4}{x^{2}+4}=\frac{6 x\left(x^{2}+4\right)+5 x^{2}-24 x+3 x-4}{x^{2}+4}=
$$

we added and subtracted $24 x$ in the numerator and grouped $6 x^{3}+$ $+24 x$, then, after grouping, we factored out the common factor $6 x$. To divide a sum by any expression, it is necessary to divide each term of the sum by this expression. Therefore, continuing the started transformations, we have:

$$
=\frac{6 x\left(x^{2}+4\right)}{x^{2}+4}+\frac{5 x^{2}-21 x-4}{x^{2}+4}=6 x+\frac{5 x^{2}-21 x-4}{x^{2}+4}=
$$

The remaining fraction is also improper. Continuing the equality and dividing the numerator by the denominator (as on the first step of division), we get:

$$
\begin{gathered}
=6 x+\frac{5\left(x^{2}+4\right)-21 x-20-4}{x^{2}+4}=6 x+\frac{5\left(x^{2}+4\right)}{x^{2}+4}-\frac{21 x+24}{x^{2}+4}= \\
=6 x+5-\frac{21 x+24}{x^{2}+4}
\end{gathered}
$$

The remaining fraction is already a proper one, and the division process ends here. Thus,

$$
\frac{6 x^{3}+5 x^{2}+3 x-4}{x^{2}+4}=6 x+5-\frac{21 x+24}{x^{2}+4}
$$

The above scheme for dividing a polynomial by a polynomial can be conveniently formalized by representing the division algorithm as a long division scheme. Within this scheme, the division considered above looks as follows:

![](https://cdn.mathpix.com/cropped/2024_05_22_0f84e17422d7c0df8d68g-016.jpg?height=122&width=424&top_left_y=332&top_left_x=395)

$$
\begin{aligned}
& \frac{5 x^{2}+20}{-21 x-24}
\end{aligned}
$$

Since integrating a polynomial is not particularly difficult, integrating rational fractions reduces to integrating proper rational fractions (hereafter referred to as a rational fraction).

The main idea of integrating rational fractions is to represent them as a sum of the simplest fractions of the following types:

1) $\frac{A}{x-a}$
2) $\frac{A}{(x-a)^{k}}, k>1(k-$ a positive integer);
3) $\frac{M x+N}{x^{2}+p x+q}$, where $D=p^{2}-4 q1$ (a positive integer);

$a, A, M, q, p$ - constants.

Each of the above simplest fractions is easily integrable: Consider the integration of fractions of types 1 and 2:

$$
\begin{aligned}
& \int \frac{A}{x-a} d x=A \int \frac{d(x-a)}{x-a}=A \ln |x-a|+C \\
& \int \frac{A}{(x-a)^{k}} d x=A \int(x-a)^{-k} d(x-a)= \\
& \quad=A \frac{(x-a)^{-k+1}}{-k+1}+C=\frac{A}{(1-k)(x-a)^{k-1}}+C .
\end{aligned}
$$

The calculation of integrals of fractions of type 3 is carried out by completing the square in the quadratic trinomial $x^{2}+p x+q$, that is,

$$
x^{2}+p x+q=x^{2}+2 \frac{p}{2} x+\frac{p^{2}}{4}+q-\frac{p^{2}}{4}=\left(x+\frac{p}{2}\right)^{2}+q-\frac{p^{2}}{4}
$$

and then introducing a new variable of integration $t$, related to the previous one by the equation $t=x+\frac{p}{2}$. Then $x^{2}+p x+q=t^{2}+a^{2}$, where $a=\sqrt{q-\frac{p^{2}}{4}},\left(q-\frac{p^{2}}{4}>0\right)$ and $d t=d\left(x+\frac{p}{2}\right)=\left(x+\frac{p}{2}\right)^{\prime} d x=d x$.

As a result, we get

$$
\begin{gathered}
\int \frac{M x+N}{x^{2}+p x+q} d x=\int \frac{M(t-p / 2)+N}{t^{2}+a^{2}} d t= \\
=\int \frac{M t}{t^{2}+a^{2}} d t+(N-M p / 2) \int \frac{d t}{t^{2}+a^{2}}= \\
=\frac{M}{2} \int \frac{d\left(t^{2}+a^{2}\right)}{t^{2}+a^{2}}+(N-M p / 2) \frac{1}{a} \operatorname{arctg} \frac{t}{a}= \\
=\frac{M