My friend is tutoring high school mathematics, one of the skills is to let the integral as $I$ and then get $I = abc - I$ and then $I = abc/2$. For example, $$ I = \int e^x\cos{x} dx = eˣ \sin{x} - \int e^x \sin{x} dx = e^x\sin{x} + e^x\cos{x} - \int e^x\cos{x} = e^x(\sin{x} + \cos{x}) - I, $$ so $I = \frac{1}{2}e^x(\sin{x} + \cos{x}) + \text{constant}$.
However, this technique does not seem to be true in general, for example, let $g(x)$ be an even function, let $x=-u$, $$ I = \int g(x) dx = \int g(-u)d(-u) = \int g(u) (-du) = -\int g(u)du = -I, $$ so $2I = 0$. If we put $g(x) \equiv 1$, then we have $x = \int 1 dx = \text{constant}$, which is ridiculous.
I cannot spot the mistake in it. In my own thoughts, if we add the bounds this is clearly false because letting $x = -u$ changes the bounds so we do not have this issue. I think getting $I$ again is not the main issue, the issue is applying the Dummy Variable Rule in indefinite integrals.
Surely we have u-substitutions, but I think it is not true that $\int f(u)du = \int f(x)dx$ in general, is it the issue here?
I have not touched calculations of integrals for a long time, all we have are definite integrals, never seen indefinite integrals for a long time.
Any help would be appreciated.