Find the antiderivative of $\displaystyle \frac{e^{\frac{x}{2}}}{e^x+2e^{\frac{x}{2}}+5}$.
The book suggests a switch of variables. Let $t=e^{\frac{x}{2}}$. And so $x=2\ln(t)$. The antiderivative transforms into:
$$\displaystyle \int \frac{2}{t^2+2t+5} \mathrm dt$$ Here is my first doubt.Where came from the $2$ in the numerator?
Then,
$$\displaystyle 2\int \frac{1}{t^2+2t+5} \mathrm dt=2\int \frac{1}{(t+1)^2+4} \mathrm dt$$
And finally my main doubt. How can one obtain,
$$\frac{1}{2} \int\frac{1}{1+(\frac{t+1}{2})^2} \mathrm dt$$
The antiderivative is $\displaystyle \tan^{-1}\frac{1}{2}(e^{\frac{x}{2}}+1)+C$ which is different from what Wolfram presents.The Wolfram result was: $$-\tan^{-1}(\frac{2}{e^{\frac{x}{2}}+1})+C$$
Thanks for the help.
First doubt: from $x=2\ln(t)$ you get $dx=2dt/t$, and here comes out the $2$.
Second doubt:from $(t+1)^2+4$, you get $4[\frac{(t+1)^2}{4}+1]=4[(\frac{t+1}{2})^2+1]$
Third doubt: take into account the known relation $\arctan(x)+\arctan(1/x)=\pi/2$ for $x>0$.