## Problem Statement

Find the indefinite integral:

$$
\int \frac{2 x^{2}-x+1}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)} d x
$$
## Solution

$$
\int \frac{2 x^{2}-x+1}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)} d x=
$$

Decompose the proper rational fraction into partial fractions using the method of undetermined coefficients:

$$
\begin{aligned}
& \frac{2 x^{2}-x+1}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)}=\frac{A x+B}{x^{2}-x+1}+\frac{C x+D}{x^{2}+1}= \\
& =\frac{(A x+B)\left(x^{2}+1\right)+(C x+D)\left(x^{2}-x+1\right)}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)}= \\
& =\frac{A x^{3}+A x+B x^{2}+B+C x^{3}-C x^{2}+C x+D x^{2}-D x+D}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)}= \\
& =\frac{(A+C) x^{3}+(B-C+D) x^{2}+(A+C-D) x+(B+D)}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)} \\
& \left\{\begin{array}{l}
A+C=0 \\
B-C+D=2 \\
A+C-D=-1 \\
B+D=1
\end{array}\right.
\end{aligned}
$$

Subtract the first equation from the third:

$$
\begin{aligned}
& \left\{\begin{array}{l}
A+C=0 \\
B-C+D=2 \\
-D=-1 \\
B+D=1
\end{array}\right. \\
& \left\{\begin{array}{l}
A+C=0 \\
B-C=1 \\
D=1 \\
B=0
\end{array}\right.
\end{aligned}
$$

$$
\begin{aligned}
& \left\{\begin{array}{l}
A+C=0 \\
-C=1 \\
D=1 \\
B=0
\end{array}\right. \\
& \left\{\begin{array}{l}
A=1 \\
C=-1 \\
D=1 \\
B=0
\end{array}\right. \\
& \frac{2 x^{2}-x+1}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)}=\frac{x}{x^{2}-x+1}-\frac{x-1}{x^{2}+1}
\end{aligned}
$$

Then

$$
\begin{aligned}
& \int \frac{2 x^{2}-x+1}{\left(x^{2}-x+1\right)\left(x^{2}+1\right)} d x=\int\left(\frac{x}{x^{2}-x+1}-\frac{x-1}{x^{2}+1}\right) d x= \\
& =\frac{1}{2} \cdot \int \frac{2 x-1+1}{x^{2}-x+1} d x-\frac{1}{2} \cdot \int \frac{2 x-2}{x^{2}+1} d x= \\
& =\frac{1}{2} \cdot \int \frac{2 x-1}{x^{2}-x+1} d x+\frac{1}{2} \cdot \int \frac{1}{x^{2}-x+1} d x-\frac{1}{2} \cdot \int \frac{2 x}{x^{2}+1} d x+\frac{1}{2} \cdot \int \frac{2}{x^{2}+1} d x= \\
& =\frac{1}{2} \cdot \int \frac{d\left(x^{2}-x+1\right)}{x^{2}-x+1} d x+\frac{1}{2} \cdot \int \frac{4}{4 x^{2}-4 x+4} d x-\frac{1}{2} \cdot \int \frac{d\left(x^{2}+1\right)}{x^{2}+1} d x+\int \frac{1}{x^{2}+1} d x= \\
& =\frac{1}{2} \cdot \ln \left(x^{2}-x+1\right)+\int \frac{d(2 x-1)}{(2 x-1)^{2}+3} d x-\frac{1}{2} \cdot \ln \left(x^{2}+1\right)+\operatorname{arctg} x= \\
& =\frac{1}{2} \cdot \ln \left(x^{2}-x+1\right)+\frac{1}{\sqrt{3}} \cdot \operatorname{arctg}\left(\frac{2 x-1}{\sqrt{3}}\right)-\frac{1}{2} \cdot \ln \left(x^{2}+1\right)+\operatorname{arctg} x+C
\end{aligned}
$$

Source — "http://pluspi.org/wiki/index.php/%D0%9A%D1%83%D0%B7%D0%BD%D0%B5%D1%86%D0%BE%D0%B2%20%D0%98%D0%BD%D1%82%D0%B5%D0%B3%D1%80%D0%B0%D0%BB%D1%8B%20%D0%97%D0%B0%D0%B4%D0%B0%D1%87%D0%B0%207-23" Categories: Kuznetsov's Integral Problems 7 | Integrals

- Last edited: 17:20, 21 April 2009.
- Content is available under CC-BY-SA 3.0.

Created by GeeTeatoo

## Problem Kuznetsov Integrals 7-24

## Material from PlusPi