# Evaluate the indefinite integral integrate of (dx/(x^2-x+1))

You should use the following formula `(a-b)^2 = a^2 - 2ab + b^2`  to complete the square such that:

`x^2 - x = x^2 - 2*(1/2)x + 1/4 - 1/4`

`x^2 - x = (x-1/2)^2 - 1/4 `

`x^2 - x + 1 = (x-1/2)^2 - 1/4 + 1`

`x^2 - x + 1 = (x-1/2)^2 + 3/4`

Substituting `(x-1/2)^2 + 3/4`  for `x^2 - x + 1`  yields:

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

You should use the following substitution such that:

`x -1/2 = t => dx = dt`

`int 1/((x-1/2)^2 + 3/4) dx = int 1/(t^2 + (sqrt3/2)^2) dt`

`int 1/(t^2 + 3/4) dt = 2/sqrt3 arctan 2t/sqrt3 + c`

Substituting back `x -1/2`  for t yields:

`int 1/((x-1/2)^2 + 3/4) dx = 2/sqrt3 arctan 2(x -1/2)/sqrt3 + c`

Hence, evaluating the given indefinite integral yields `int 1/(x^2 - x + 1) dx = 2/sqrt3 arctan 2(x -1/2)/sqrt3 + c.`

Approved by eNotes Editorial Team