I assume w.r.t. x...
I=int(x^2+1)/sqrt(x^2+4)dxI=∫x2+1√x2+4dx
Substitute x=2tanwx=2tanw. Then dx/(dw)=2sec^2wdxdw=2sec2w and
I=int(1+4tan^2w)/sqrt(4+4tan^2w)*2sec^2wdwI=∫1+4tan2w√4+4tan2w⋅2sec2wdw
I=int(1+4tan^2w)/(2secw)*2sec^2wdwI=∫1+4tan2w2secw⋅2sec2wdw
I=int(1+4tan^2w)secwdwI=∫(1+4tan2w)secwdw
I=intsecw+4secwtan^2wdwI=∫secw+4secwtan2wdw
I=intsecw+4secw(sec^2w-1)dwI=∫secw+4secw(sec2w−1)dw
I=int-3secw+4sec^3wdwI=∫−3secw+4sec3wdw
The integral of secxdxsecxdx is ln|secx+tanx|ln|secx+tanx|; see
https://socratic.org/questions/what-is-the-integral-of-sec-x
The integral of sec^3xdxsec3xdx is 1/2secxtanx+1/2ln|secx+tanx|12secxtanx+12ln|secx+tanx|; see
https://socratic.org/questions/what-is-the-integral-of-sec-3-x
So
I=-3ln|secw+tanw|+2secwtanw+2ln|secw+tanw|+CI=−3ln|secw+tanw|+2secwtanw+2ln|secw+tanw|+C
I=-ln|secw+tanw|+2secwtanw+CI=−ln|secw+tanw|+2secwtanw+C
Substitute back for our original variable xx, using tanw=x/2tanw=x2
and secw=sqrt(1+x^2/4)secw=√1+x24:
I=-ln|sqrt(1+x^2/4)+x/2|+xsqrt(1+x^2/4)+CI=−ln∣∣∣√1+x24+x2∣∣∣+x√1+x24+C
I=-ln(1/2|x+sqrt(x^2+4)|)+x/2sqrt(x^2+4)+CI=−ln(12∣∣x+√x2+4∣∣)+x2√x2+4+C
I=-ln|x+sqrt(x^2+4)|+x/2sqrt(x^2+4)+CI=−ln∣∣x+√x2+4∣∣+x2√x2+4+C
where we have absorbed the factor inside the log into the integration constant in order to make our expression similar to the question expression.