Lời giải:
Ta có:
\(P=\int \frac{2xdx}{(x+1)(x^2+1)^2}=\int \frac{2x(x-1)dx}{(x^2-1)(x^2+1)^2}\)
\(=\int \frac{x(x-1)}{x^2+1}\left(\frac{1}{x^2-1}-\frac{1}{x^2+1}\right)dx\)
\(=\int \frac{x(x-1)}{(x^2+1)(x^2-1)}dx-\int \frac{x(x-1)}{(x^2+1)^2}dx=M-N\)
Xét M
\(M=\int \frac{x(x-1)}{(x^2+1)(x^2-1)}dx=\int \frac{x(x-1)}{2}\left(\frac{1}{x^2-1}-\frac{1}{x^2+1}\right)dx\)
\(=\int \frac{x}{2(x+1)}dx-\int \frac{x(x-1)}{2(x^2+1)}dx\)
\(=\frac{1}{2}\int (1-\frac{1}{x+1})dx-\frac{1}{2}\int (1-\frac{x+1}{x^2+1})dx\)
\(=\frac{1}{2}\int dx-\frac{1}{2}\int \frac{d(x+1)}{x+1}-\frac{1}{2}\int dx+\frac{1}{2}\int \frac{(x+1)dx}{x^2+1}\)
\(=-\frac{1}{2}\ln |x+1|+\frac{1}{2}\int \frac{(x+1)dx}{x^2+1}\)
Xét N
Đặt \(\left\{\begin{matrix} u=x-1\\ dv=\frac{xdx}{(x^2+1)^2}\end{matrix}\right.\Rightarrow \left\{\begin{matrix} du=dx\\ v=\int \frac{xdx}{(x^2+1)^2}=\frac{1}{2}\int \frac{d(x^2+1)}{(x^2+1)^2}=\frac{-1}{2(x^2+1)}\end{matrix}\right.\)
\(\Rightarrow N=\frac{1-x}{2(x^2+1)}+\int \frac{1}{2(x^2+1)}dx\)
Do đó: \(P=M-N=-\frac{1}{2}\ln |x+1|+\frac{x-1}{2(x^2+1)}+\frac{1}{2}\int \frac{xdx}{x^2+1}\)
\(=\frac{-1}{2}\ln |x+1|+\frac{x-1}{2(x^2+1)}+\frac{1}{4}\int \frac{d(x^2+1)}{x^2+1}\)
\(=\frac{-1}{2}\ln |x+1|+\frac{x-1}{2(x^2+1)}+\frac{1}{4}\ln |x^2+1|+c\)