Solution:
Complete the square:
x2+4x+6=(x+2)2+(2)2
Put x+2=t, so that dx=dt.
∫x2+4x+6dx=∫t2+(2)2dt
We know that
∫x2+a2dx=2xx2+a2+2a2logx+x2+a2+C
Here a2=2, so
∫t2+2dt=2tt2+2+22logt+t2+2+C
Substituting back t=x+2,
∫x2+4x+6dx=2x+2x2+4x+6+logx+2+x2+4x+6+C