`int (x^2 + x + 1)/(x^2 + 1)^2 dx` Evaluate the integral

`int (x^2+x+1)/(x^2+1)^2 dx`

To solve, apply partial fraction decomposition.

To express the integrand as sum of proper rational functions, set the equation as follows:

`(x^2+x+1)/(x^2+1)^2=(Ax+B)/(x^2+1)+(Cx+D)/(x^2+1)^2`

Multiply both sides by the LCD.

`x^2+x+1=(Ax+B)(x^2+1) + Cx + D`

`x^2+x+1=Ax^3+Bx^2+Ax+B+Cx+D`

`x^2+x+1=Ax^3+Bx^2+(A+C)x+B+D`

Express the left side as a polynomial with degree 3.

`0x^3+x^2+x+1=Ax^3+Bx^2+(A+C)x+B+D`

For the two sides to be equal, the two polynomials should be the same. So set the coefficients of the polynomials equal to each other.

x^3:

`0=A`     (Let this be EQ1.)

x^2:

`1=B `     (Let this be EQ2.)

x:

`1=A+C`     (Let this be EQ3.)

Constant:

`1=B+D`     (Let this be EQ4.)

In the equations, the values of A and B are already known. So only the values of C and D have to be solved. To do so, plug-in the value of A to EQ3.

`1=A+C`

`1=0+C`

`1=C`

Also, plug-in the value of B to EQ4.

`1=B+D`

`1=1+D`

`0=D`

So the partial fraction decomposition of the integrand is:

`(x^2+x+1)/(x^2+1)^2=(0x+1)/(x^2+1)+(1x+0)/(x^2+1)^2=1/(x^2+1)+x/(x^2+1)^2`

Taking the integral of it result to:

`int (x^2+x+1)/(x^2+1)^2 dx`

`= int (1/(x^2+1)+x/(x^2+1)^2) dx`

`= int 1/(x^2+1)dx + int x/(x^2+1)^2dx`

For the first integral, apply the formula int 1/(u^+a^2)=1/a tan^(-1) u/a+C.

For the second integral, apply u-substitution method.

`u=x^2+1`

`du=2x dx`

`(du)/2=xdx`

`= int 1/(x^2+1)dx + int 1/u^2 * (du)/2`

`= int 1/(x^2+1)dx +1/2 int u^(-2) du`

`= tan^(-1)x -1/2u^(-1)+C`

`= tan ^(-1)x - 1/(2u)+C`

Substitute back `u=x^2+1` .

`= tan ^(-1)x - 1/(2(x^2+1))+C`

Therefore, `int (x^2+x+1)/(x^2+1)^2dx= tan ^(-1)x - 1/(2(x^2+1))+C` .

Approved by eNotes Editorial Team