I found an interesting integral to try to evaluate, $$\int \frac{2^x}{2^{2x}-4}dx$$ I am not sure if my result is correct, I can verify it by taking $\frac d{dx}$ of my result which takes me back to the original integrand, but when I check it with Mathematica it seems that it is incorrect. What I did was quite straight forward, $$\int \frac{2^x}{2^{2x}-4}dx\;=\;\frac 14 \int \frac{2^x}{2^x-1}dx$$ Let $u=2^x-1$ so $\ln u = \ln(2^x-1)$ and take the derivative $$\frac 1u du \,=\, \frac {2^x\ln 2}{2^x-1}dx$$ So $du=2^x\ln 2dx$ and I get an integral of the form $\int \frac 1u du$ which yields $$\int \frac{2^x}{2^{2x}-4}dx\;=\;\frac {\ln|2^x-1|}{4\ln2}+C$$ Taking the derivative to verify this result I get $$\frac d{dx} \left[\frac {\ln|2^x-1|}{4\ln2}+C\right]\,=\,\left(\frac 1{4\ln2}\right) \frac d{dx}\ln|2^x-1|$$ $$=\, \frac {2^x\ln2}{4\ln2(2^x-1)}\,=\,\frac {2^x}{2^{2x}-4}$$ Which is the original integrand.
My question comes from the fact that when I differentiate $\frac {\ln|2^x-1|}{4\ln2}+C$ with Mathematica, I get $$\frac d{dx}\left[\frac {\ln|2^x-1|}{4\ln2}+C\right] \,=\, \frac {2^{x-2}}{2^x-1}$$ and also a different result for the indefinite $x$-integral, for which Mathematica says $$\int \frac{2^x}{2^{2x}-4}dx\,=\,\frac {\ln|2-2^x|}{4\ln2}-\frac {\ln|2+2^x|}{4\ln2}+C$$ What am I doing wrong? I know I should be able to get back to the original integrand by taking the derivative of my result but then if I make the same mistake in both directions won't this cause me to miss the correct result anyway? Thanks for the help!