# `int x/sqrt(x^2-6x+5)` Complete the square and find the indefinite integral

`intx/sqrt(x^2-6x+5)dx`

Let's complete the square of the denominator of the integrand,

`=intx/sqrt((x-3)^2-4)dx`

Now apply integral substitution:`u=x-3`

`=>du=1dx`

`=int(u+3)/sqrt(u^2-2^2)du`

Now apply the sum rule,

`=intu/sqrt(u^2-2^2)du+int3/sqrt(u^2-2^2)du`

Now let's evaluate the first integral ,

`intu/sqrt(u^2-4)du`

Apply integral substitution:`v=u^2-4`

`=>dv=2udu`

`=int1/sqrt(v)(dv)/2`

Take the constant out and apply the power rule,

`=1/2(v^(-1/2+1)/(-1/2+1))`

`=1/2(2/1)v^(1/2)`

`=sqrt(v)`

Substitute back `v=u^2-4`

`=sqrt(u^2-4)`

Now let's evaluate the second integral,

`int3/sqrt(u^2-2^2)du`

Take the constant out,

`=3int1/sqrt(u^2-2^2)du`

Use the standard integral:`int1/sqrt(x^2-a^2)dx=ln|x+sqrt(x^2-a^2)|`

`=3ln|u+sqrt(u^2-2^2)|` ,

So add the result of the two integrals,

`sqrt(u^2-4)+3ln|u+sqrt(u^2-4)|`

Substitute back `u=x-3` and add a constant C to the solution,

`=sqrt((x-3)^2-4)+3ln|x-3+sqrt((x-3)^2-4)|+C`

`=sqrt(x^2-6x+9-4)+3ln|x-3+sqrt(x^2-6x+9-4)|+C`

`=sqrt(x^2-6x+5)+3ln|x-3+sqrt(x^2-6x+5)|+C`

Approved by eNotes Editorial Team