Write the numerator of integrand as:
x=12(2x+1)−12
and note that:
ddx(x2+x+1)=2x+1
Then:
∫x√x2+x+1dx=12∫2x+1√x2+x+1dx−12∫dx√x2+x+1
∫x√x2+x+1dx=12∫d(x2+x+1)√x2+x+1dx−12∫dx√x2+x+1
∫x√x2+x+1dx=√x2+x+1−12∫dx√x2+x+1
Solve now the resulting integral by completing the square at the denominator:
12∫dx√x2+x+1=12∫dx√(x+12)2+34
12∫dx√x2+x+1=∫dx√(2x+1)2+3
Substitute now:
2x+1=√3tant with t∈(−π2,π2)
dx=√32sec2tdt
to have:
12∫dx√x2+x+1=√32∫sec2tdt√3tan2t+3
12∫dx√x2+x+1=12∫sec2tdt√tan2t+1
Use the trigonometric identity:
tan2t+1=sec2t
and as for t∈(−π2,π2) the secant is positive:
√tan2t+1=sect
Then:
12∫dx√x2+x+1=12∫sec2tdtsect
12∫dx√x2+x+1=12∫sectdt
12∫dx√x2+x+1=12ln|sect+tant|+C
and undoing the substitution:
12∫dx√x2+x+1=12ln∣∣
∣∣2x+1√3+√(2x+1)23+1∣∣
∣∣+C
12∫dx√x2+x+1=12ln∣∣∣(2x+1)+√(2x+1)2+3∣∣∣+C
12∫dx√x2+x+1=12ln∣∣2x+1+2√x2+x+1∣∣+C
Putting the partial solutions together:
∫x√x2+x+1dx=√x2+x+1−12ln∣∣2x+1+2√x2+x+1∣∣+C