# Finding factors in order to use U sub

1. Apr 21, 2014

### TheKShaugh

1. The problem statement, all variables and given/known data

$$\displaystyle{\int}\dfrac{x}{\sqrt{x^2+x+1}}~dx = \displaystyle{\int}\dfrac{(x+\frac 1 2)-\frac 1 2}{\sqrt{(x+\frac 1 2)^2+(\frac {\sqrt 3} 2)^2}}~dx$$

2. Relevant equations

Given.

3. The attempt at a solution

The solution is given, but I'm not sure how it was found. Is there a method for finding those factors or is it trial and error/intuition?

2. Apr 21, 2014

### Staff: Mentor

There is a method. They are completing the square in the quadratic in the denominator.
x2 + x + 1 = x2 + x + (1/4) + (1 - 1/4)
= (x + 1/2)2 + 3/4
= (x + 1/2)2 + (√(3)/2)2

Then they are working with the numerator to get it as you see it in the expression on the right of what you posted.