#int(5x+7)/(x^2+4x+8)dx# can be written as
#int5/2*(2x+4)/(x^2+4x+8)dx-int3/(x^2+4x+8)dx#
= #5/2int(2x+4)/(x^2+4x+8)dx-3int1/(x^2+4x+8)dx#
= #5/2ln|x^2+4x+8|-3int1/((x+2)^2+4)dx#
- (as #d/dx(x^2+4x+8)=2x+4#)
= #5/2ln|x^2+4x+8|-12int1/(((x+2)/2)^2+1)dx#
Now let #(x+2)/2=tantheta# or #1/2dx=sec^2thetad theta# and then
#int1/(((x+2)/2)^2+1)dx=int1/sec^2thetaxx2sec^2thetad theta#
= #int2d theta=2theta=2tan^(-1)(x/2+1)#
Hence #int(5x+7)/(x^2+4x+8)dx#
= #5/2ln|x^2+4x+8|-24tan^(-1)(x/2+1)#