# evaluate the integral:∫(x^2+x+1)/(x^2+1)dx

### 2 Answers | Add Yours

*Note that log here is the natural logarithm - by log(u) i mean ln(u).

We first perform long division on the integrand to get:

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

We then integrate the sum:

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

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

Then, we do substitution to solve the second integral. Let `u = 1+x^2` . This means that `du = 2xdx` and `xdx = (du)/2` . Substituting all these:

`int dx + int 1/(2u) du`

`int dx + (1/2) int (1/u) du`

The integrals are now easy to evaluate: `int dx = x +C_1` , while `1/2 int 1/u du = 1/2 log(u)+C_2.`

Therefore, we have:

`x + 1/2 log(u) + C` where C is the integration constant.

Plugging back `u = x^2 + 1` :

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