Antiderivative of $e^x/(1+2e^x)$ I know the solution is $$\dfrac{\ln\left(2\mathrm{e}^x+1\right)}{2}+C$$ However, the result I got was $$\dfrac{\ln\left(\mathrm{e}^x+0.5\right)}{2}+C$$ What I did was:
$$ \begin{align}
\int \frac {e^x}{1+2e^x}dx &= \int \frac {e^x}{2*(0.5+e^x)}dx \\
&= 0.5 \cdot \int \frac{e^x}{0.5 + e^x} dx \\
&= 0.5 \cdot (\ln|0.5 + e^x| + C). \end{align}$$
I know there are antiderivative calculators online that show the correct method step by step, but I can't understand what I did wrong. What's the mistake?
 A: Let $C = \ln 2$, a constant. Then they're equivalent.
What you did is correct; you just have a different value of $C$. This is why the "$+C$" is so important!
A: You can tell your answer is right by differentiating it and seeing what you get back. Indeed,
$$
\frac{d}{dx}\left(\frac{\ln(e^x+0.5)}{2}\right)
=\frac{1}{2}\frac{e^x}{e^x+0.5}
=\frac{e^x}{2e^x+1}.
$$
So you are correct. As the other answers point out, the two answers are the same up to a constant.
A: These answers are the same. Namely,
$$ \ln(2e^x + 1) = \ln(2(e^x + 0.5)) = \ln(2) + \ln(e^x + 0.5).$$
The added $\ln 2$ is absorbed by the $+ C$, and so we see that the two answers are the same up to an additive constant. There is no error.
A: The others have answered your question. Note that one runs into this often also when dealing with trig functions.For example $\int sinx cosx dx= sin^2(x)/2 + C$ if one chooses to make the substitution $u= sinx$, and  $\int sin(x)cosx dx= -cos^2(x)/2 + C$, if one chooses $u=cosx$. Both answers are correct, as of course their difference is a constant, since $sin^2(x)+cos^2(x) = 1.$
