let be the operator on $L^2(\mathbb{R})$ define by $$ T[f](x)=f(-x) $$ and I tried to determinate the adjoint with a change of variables: $$ (T^*g,f)=(g,Tf)=\int_{\mathbb{R}}g(x)f(-x)\,dx=[y=-x; dx=-dy] = -\int_{\mathbb{R}}g(-y)f(y)\,dy=(-Tg,f) $$
but I read in my notes that $T$ is self-adjoint because $\int_{\mathbb{R}}g(x)f(-x)\,dx= \int_{\mathbb{R}}g(-x)f(x)\,dx$, and in general $\int_Rh(x)=\int_Rh(-x)$.
Where is the mistake?
Note that $$ (g,Tf)=\int_{-\infty}^\infty g(x)f(-x)\,dx=-\int_{\infty}^{-\infty} g(-y)f(y)\,dy \int_{-\infty}^{\infty} g(-y)f(y)\,dy=(Tg,f), $$ and hence $T$ is indeed self-adjoint.