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!
 A: HINT:
$$\frac{\tan^2y\sec y}{\sec y+1}=\frac{\sin^2y}{\cos^2y(1+\cos y)}=\frac{(1-\cos y)(1+\cos y)}{\cos^2y(1+\cos y)}$$
$$=\frac{1-\cos y}{\cos^2y}=\sec^2y-\sec y$$
See this
Finally, let $y=\arctan\dfrac x2\implies x=2\tan y$ and $-\dfrac\pi2\le y\le \dfrac\pi2\implies\sec y=\dfrac1{\cos y}\ge0$
$\sec y=+\sqrt{1+\tan^2y}=+\dfrac{\sqrt{x^2+4}}2$
A: $$I=\int \frac{\sqrt{x^2+4}}{\frac{x}{2}+1}dx \implies\frac I2=\int \frac{\sqrt{x^2+4}}{x+2}dx$$

Using Euler substitution
$$\sqrt{x^2+4}=x+t\iff x=\frac{4-t^2}{2t}\iff dx=\left(-\frac{2}{t^2}-\frac12\right)dt$$
$$\begin{align}\frac I2=\int \frac{\sqrt{x^2+4}}{x+2}dx
&=\int \frac{\frac{4-t^2}{2t}+t}{\frac{4-t^2}{2t}+2}\left(-\frac{2}{t^2}-\frac12\right)dt\\
&=-\int\frac{4+t^2}{4-t^2+4t}\left(\frac{t^2+4}{2t^2}\right)dt\\
&=-\int\frac{(4+t^2)^2}{2t^2(-t^2+4t+4)}dt\\
&=-\left[\int\left(-\frac{16}{t^2-4t-4}+\frac{2}{t^2}-\frac2t -\frac12\right)dt\right]\\
&=\int\frac{16}{t^2-4t-4}dt-\int\frac{2}{t^2}dt+\int\frac2t dt+\int\frac12dt\\
\end{align}$$

And using standard techniques we can arrive at 
$$\int\frac{16}{t^2-4t-4}dt=2\sqrt2\ln\left( \frac{-t+2+2\sqrt2 }{t-2+2\sqrt2}\right)+C_1$$
Now $$\frac I2=2\sqrt2\ln\left( \frac{-t+2+2\sqrt2 }{t-2+2\sqrt2}\right)+\frac{2}{t}+2\ln t+\frac t2+C$$
And $t=\sqrt{x^2+4}-x$ I hope you can take it from here!
A: 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}}}$
A: Hint: Take $t=\sec(x )$, write $\tan(x)$ in terms of $\sec(x)$ and evaluate.
