I made a silly mistake in evaluating some integral by using a non-injective $u$-substitution. But why should $u$-substitutions be injective in the first place?
I reasoned in the following way: the formula $$ \int_{\phi(a)}^{\phi(b)}g(x)\ dx = \int_a^b g(\phi(t))\phi^\prime(t)\ dt $$ holds for a general $C^1$ function $\phi$, even if it is not injective. When you calculate an integral of the form $\int_a^b f(\phi(t))\ dt$, to use the formula above from right to left, you should find a function $f$ such that $$ f(\phi(t)) = g(\phi(t))\phi^\prime(t), $$ which do not exist if $\phi$ is not injective, i.e., $\phi(t) = 0$ for some $t$. This is why substitutions should be injective.
Is my reasoning correct? If so, I believe that if $\phi^\prime(t) = 0 \Rightarrow f(\phi(t)) = 0$, a function $g$ that satisfies the formula above may exist and $\phi$ should not necessarily be injective. Is this right?
I am often confused about the fact $\phi$ should be injective. Is there an intuitive way to interpret this fact, so that I always remember to take a $\phi$ that is injective?
I would be grateful if you could help me understand this matter.