<s>[INST] Evaluating $\displaystyle4\int \frac{\tan^2x\:\sec\:x}{\sec\:x\:+1}dx$ I was solving following integral

$$\int \frac{\sqrt{x^2+4}}{\frac{x}{2}+1}dx$$

I think I need do a trigonometric substitution but I eventually end up with
$$4\int \frac{\tan^2x\:\sec\:x}{\sec\:x\:+1}dx$$
And then I get stuck.... Help!
 [/INST] Hint:
$z=\sec x+1 \implies dz=\sec x\tan x\  dx$
$\sec x=z-1 \implies \tan x=\sqrt{z(z-2)}$
$\therefore \displaystyle\int \frac{\tan^2x\sec x}{\sec x+1}dx=\displaystyle\int \frac{\sqrt{z(z-2)}}{z}dz=\displaystyle\int {\sqrt{\dfrac{z-2}{z}}}dz$
$\dfrac{z-2}{z}=\theta^2 \implies z-2=z\theta^2 \implies z(1-\theta^2)=2 \implies z=\dfrac{2}{1-\theta^2} \implies dz=\dfrac{4\theta}{(1-\theta^2)^2}d\theta$
${\color{blue}{\boxed{\therefore \displaystyle\int {\sqrt{\dfrac{z-2}{z}}}dz=4\displaystyle\int \dfrac{\theta^2}{(1-\theta^2)^2}d\theta=4\displaystyle\int \dfrac{1-(1-\theta^2)}{(1-\theta^2)^2}d\theta=4\displaystyle\int \dfrac{d\theta}{(1-\theta^2)^2}-4\displaystyle\int \dfrac{1}{1-\theta^2}d\theta}}}$
</s>