I have a problem with this integral:
$$\int \frac{dx}{\sqrt{4x+x^2}}$$
I tried to transform it like this:
$$\int \frac{dx}{\sqrt{4x+x^2}}=\int \frac{dx}{\sqrt{x^2+4x+4-4}}=\int \frac{dx}{\sqrt{(x+2)^2-4}}$$
$u=x+2$ , $du=dx$ then
$$\int \frac{dx}{\sqrt{(x+2)^2-4}}=\int \frac{du}{\sqrt{u^2-4}}$$
Unfortunately I have no idea what I should do now. I think that I can use trig substitution, but I do not know how I can do it.
As suggested, we use $u=2\cosh z$, $du=2\sinh z\ dz$. Hence
$$\int \frac{du}{\sqrt{u^2-4}}=2\int \frac{\sinh z}{\sqrt{4\cosh^2 z-4}}dz=\int \frac{\sinh z}{\sqrt{\cosh^2 z-1}}$$
Now, recall the relation $\cosh^2 z-\sinh^2 z=1$; we have that $\sinh^2 z=\cosh^2 z-1$, so
$$\int \frac{\sinh z}{\sqrt{\cosh^2 z-1}}=\int \frac{\sinh z}{\sinh z}dz=\int dz=z+c$$
Let's come back to the original variable: $z=\cosh^{-1} \frac{u}{2}$, and $u=x+2$. So
$$\int \frac{dx}{\sqrt{4x+x^2}}=\cosh^{-1}\left(\frac{x+2}{2}\right)+c$$
Remembering that $\cosh^{-1} y=\ln\left(y+\sqrt{y^2-1}\right)$
$$\int \frac{dx}{\sqrt{4x+x^2}}=\ln\left(\frac{x+2}{2}+\sqrt{\frac{(x+2)^2}{4}-1}\right)+c=\ln\left(\frac{1}{2}\left(x+2+\sqrt{x^2+4x}\right)\right)+c=$$
$$=\ln \left(\frac{1}{2}\right)+\ln\left(x+2+\sqrt{x^2+4x}\right)+c$$
For all $c\in\mathbb{R}$.
Now $\ln \left(\frac{1}{2}\right)$ is a costant, so we can incorporate it in the $c$. So finally
$$\int \frac{dx}{\sqrt{4x+x^2}}=\ln\left(x+2+\sqrt{x^2+4x}\right)+c$$
If you don't know hyperbolic functions, notice that they're defined by
$$\cosh z:=\frac{e^z+e^{-z}}{2}$$ $$\sinh z:=\frac{e^z-e^{-z}}{2}$$