Wrong proof of $\int \frac{ dt}{(2 - \cos 2t)} = 0$ $I = \int \frac{dx}{(1+e^{\sin x})(2 - \cos 2x)}$
Let's put $x= -t$ . We get $I = \int \frac{-dt}{(1+e^{\sin (-t)})(2 - \cos 2t)} = \int \frac{ e^{\sin t}(-dt)}{(1+e^{\sin t})(2 - \cos 2t)}$
$ = -\int \frac{ (1+e^{\sin t})dt}{(1+e^{\sin t})(2 - \cos 2t)}+ I $.
This gives $\int \frac{ dt}{( 2 - \cos 2t)} = 0$. This is not true.
Can anyone please tell me where  I made mistake ?
 A: I try to follow your work but on $\displaystyle I=\int xdx$.
Let $x=1+t$. Then $\displaystyle I=\int (1+t)dt=\int dt+\int tdt=\int dt+I$ and hence $\displaystyle \int dt=0$.
This is obviously wrong again.
The problem is that $\displaystyle \int tdt=\frac{t^2}2+\textrm{constant}$ and  $\displaystyle \frac{t^2}{2}=\frac{(x-1)^2}{2}$ but not $\displaystyle \frac{x^2}2$.
$\displaystyle\int xdx\ne \int tdt$.
Similarly, $\displaystyle \int \frac{ e^{\sin t}(-dt)}{(1+e^{\sin t})(2 - \cos 2t)}\ne\int \frac{ e^{\sin x}(-dx)}{(1+e^{\sin x})(2 - \cos 2x)}$
A: $$I_1 = \int \frac{dx}{(1+e^{\sin (x)})(2 - \cos (2x))}$$ make $x=-t$ to make
$$I_2 = -\int \frac{e^{\sin (t)}}{\left(1+e^{\sin (t)}\right) (2-\cos (2 t))}\,dt=-\int \frac{e^{\sin (x)}}{\left(1+e^{\sin (x)}\right) (2-\cos (2 x))}\,dx$$
$$I_1-I_2=\int\frac{dx}{2-\cos (2 x)}=\frac{\tan ^{-1}\left(\sqrt{3} \tan (x)\right)}{\sqrt{3}}$$
A: The factor $2-\cos2x$ is irrelevant to the question, as is the sine, and I drop them.
$$I:=\int\frac{dx}{1+e^x}=-\int\frac{dt}{1+e^{-t}}=-\int\frac{e^tdt}{1+e^t}$$
is correct.
But then it is wrong that
$$\color{red}{\int\frac{dx}{1+e^x}=\int\frac{dt}{1+e^t}}$$ because we have set $t:=-x$ !
This is more obvious if we work with definite integrals,
$$\int_0^z\frac{dx}{1+e^x}=-\int_0^{-z}\frac{dt}{1+e^{-t}}=\int_{-z}^0\frac{e^tdt}{1+e^t}$$
which we may not combine to
$$\int_0^z\frac{dt}{1+e^t}.$$
