IfFirst off, if you're doing an indefinite integral, $I$ is a function, so let's write $I(x)$. InSecond, as pointed out, once we make a substitution in your firstsecond example, it is always awe no longer have the same function of $x$, so no problem arises$I()$. But
So in your second example, under the overall assumption that $u=-x$ and being stricter about functions, you'd getbe making the argument
$$I(x) = .... = I(u) = I(-x)$$$$I(x) = .... = J(u) = J(-x)$$
and you can't bringwhere $J()$ is the name introduced for the new function we have after substitution.
Now in some cases we do have $I$ back$J(-x) = I(x)$ and we can do the "bring over to the other sideside" trick and get $2I$.
(Confession: I haven't fully thought this through, so I'm not sure it's a 100% valid explanation of what's happeningfinal answer for $I$. But in the cases where the trick goes bad we can see that $I$ being a function$J(-x)$ is definitely an issue - I'm just not sure if it's pointingequal to a problem with the argument, or just notation$I(x)$ , or a combination ofand the twotrick wasn't permitted in the first place.)