It is in general a good idea to divide any polynomial that we have to work with through by its leading coefficient; this almost always makes it simpler to work with. So:
int1/sqrt(4x^2+16x+8)dx=1/2int1/sqrt(x^2+4x+2)dx∫1√4x2+16x+8dx=12∫1√x2+4x+2dx
Complete the square:
1/2int1/sqrt((x+2)^2-2)dx12∫1√(x+2)2−2dx
Make a substitution to cause the square root to vanish via a trig identity. In this case we'll use x+2=sqrt(2)secthetax+2=√2secθ. We could also use csccsc (which would be similar) or, straying into hyperbolic functions, coshcosh (which would be easier).
As x=-2+sqrt(2)secthetax=−2+√2secθ, dx/(d theta)=sqrt(2)secthetatanthetadxdθ=√2secθtanθ, and so our integral becomes
1/2int1/sqrt(2sec^2theta-2)*sqrt(2)secthetatanthetad theta12∫1√2sec2θ−2⋅√2secθtanθdθ
Recalling the identity tan^2theta=sec^2theta-1tan2θ=sec2θ−1, we obtain
1/2int1/(sqrt(2)tantheta)*sqrt(2)secthetatanthetad theta12∫1√2tanθ⋅√2secθtanθdθ
which simplifies considerably to become
1/2intsectheta d theta12∫secθdθ
The integral of secxsecx is ln|secx+tanx|ln|secx+tanx|. Two demonstrations of this are given here: https://www.math.ubc.ca/~feldman/m121/secx.pdf
So we get
1/2ln|sectheta+tantheta|+C12ln|secθ+tanθ|+C
Transform back to our original variable, xx:
1/2ln|(x+2)/sqrt(2)+sqrt((x+2)^2/2-1)|+C12ln∣∣
∣∣x+2√2+√(x+2)22−1∣∣
∣∣+C
Rearrange a little to obtain a simpler form:
1/2ln|(x+2)/sqrt(2)+sqrt(((x+2)^2-2)/2)|+C12ln∣∣
∣∣x+2√2+√(x+2)2−22∣∣
∣∣+C
1/2ln|x+2+sqrt((x+2)^2-2)|-1/2lnsqrt(2)+C12ln∣∣∣x+2+√(x+2)2−2∣∣∣−12ln√2+C
Note that the -1/2lnsqrt(2)−12ln√2 term is a constant and can therefore be folded into the integration constant CC
1/2ln|x+2+sqrt(x^2+4x+2)|+C12ln∣∣x+2+√x2+4x+2∣∣+C
If we wished to write this in the same style as the original question formula, we could use the same observation about the integration constant to add 1/2ln212ln2 without changing the answer:
1/2ln|x+2+sqrt(x^2+4x+2)|+C12ln∣∣x+2+√x2+4x+2∣∣+C
1/2ln|x+2+sqrt(x^2+4x+2)|+1/2ln2+C12ln∣∣x+2+√x2+4x+2∣∣+12ln2+C
1/2ln|2(x+2)+sqrt(4x^2+16x+8)|+C12ln∣∣2(x+2)+√4x2+16x+8∣∣+C
It's arguable whether it's better to write it so that the expression inside the root matches that in the original integral or so that it is a simpler expression. I think I prefer our first answer myself:
1/2ln|x+2+sqrt(x^2+4x+2)|+C12ln∣∣x+2+√x2+4x+2∣∣+C
It's more elegant.