Being: $\ln f(x)=\log_ef(x)$
I started derivating $\ln\sqrt{\dfrac{e^{x^2}}{e^x+2}}$ but I get to a point that I don't know how to follow.
I try to get it by derivating the logarithm directly and by using the logarithmic properties such us: $\ln f(x)^n=n\ln f(x)$ and $\ln \frac{f(x)}{Q(x)}=\ln f(x)-\ln Q(x)$ but I don't get it.
By the time I have done this: \begin{align} f(x)&=\ln\sqrt{\dfrac{e^{x^2}}{e^x+2}}\\ &=\frac{\ln e^{x^2}-\ln (e^x+2)}{2}\\ &=\frac{x^2-\ln (e^x+2)}{2}\\ \text{And derivating:}\\ f'(x)&=\frac{1}{2}\left(\frac{d}{dx}x^2-\frac{d}{dx}\ln (e^x+2)\right)\\ &=x-\frac{1}{2}\left(\frac{e^x}{e^x+2}\right) \end{align}
So I finally get this:
$f'(x)=x-\dfrac{e^x}{2e^x+4}$
But WolframAlpha says that $f'(x)=\frac{x(x^2-5)}{x^2-4}$
If I'm wrong, what do I do wrong? And if I'm right, how can I get from $x-\dfrac{e^x}{2e^x+4}$ to $\dfrac{x(x^2-5)}{x^2-4}$