This concept I have asked a few people, but none of them are able to help me understand, so hope that there's a hero can save me from this problem!!!
My question occurs during substitution process, for example, sometimes we let $x = π - u$. Then after some manipulation of numbers, we then let $x = u$ and integrate the guy that we want to integrate. That doesn't seem intuitive to me, isn't that we are changing the definition of x by omiting the rule of arithematic? $x = u \implies x = π - x$. Why that operation doesn't affect the integration result?
Here is a concrete example illustrate my question
$$ \int^{π}_{0} \frac{x\sin(x)}{(1+\cos^2(x))} dx $$ then we let $x = π - u \implies dx = -du$ $$= \int^{π}_{0} \frac{(π - u)\sin(u)}{(1+\cos^2(u))} du$$ $$= \int^{π}_{0} \frac{π\sin(u)}{(1+\cos^2(u))} du - \int^{π}_{0} \frac{u\sin(u)}{(1+\cos^2(u))} du$$ And here (downward) is the part that I don't understand!!! (the x in _x_sin(x) in RHS)
we then let $x = u$ $$\int^{π}_{0} \frac{x\sin(x)}{(1+\cos^2(x))} dx = \int^{π}_{0} \frac{π\sin(u)}{(1+\cos^2(u))} du - \int^{π}_{0} \frac{x\sin(x)}{(1+\cos^2(x))} dx$$
move the rightmost guy to LHS and integrate RHS, solve the problem.
$$2\int^{π}_{0} \frac{x\sin(x)}{(1+\cos^2(x))} dx = \int^{π}_{0} \frac{π\sin(u)}{(1+\cos^2(u))} du$$
Why can we let $x = u$? isn't that we have given it the value $pi - u$ in the beginning?
This is called, not in the most humble manner, the "abuse" of notations. Let us go step by step in understanding what happened.
First, for the integral $\int\limits_{0}^{\pi} \dfrac{x \sin x}{1 + \cos^2 x} \ dx$, we put $x = \pi - u$, where since $x$ varies from $0$ to $\pi$, $u$ varies from $\pi$ to $0$. And from the exact differential term $dx = -du$, we can reverse the limits of integration so that it becomes $\int\limits_{0}^{\pi} \dfrac{\left( \pi - u \right) \sin u}{1 + \cos^2 u} \ du$ (Here, some trigonometric formulae are also used). After this we split the numerator to obtain the two integrals.
Well, this was pretty easy! Now comes the step where problem arises. One of the two integrals is $\int\limits_{0}^{\pi} \dfrac{u \sin u}{1 + \cos^2 u} \ du$. Now, let us look what we got in this integral. First, the limits are from $0$ to $\pi$, just as the original integral. Next, the integrand is the same as the original integral except that we now have the variable $u$ instead of $x$.
But, when it comes to integration, it does not really matter what the variable's "name" is. What matters is that integrand and the limits of integrations. So, the integral will be the same if we call the variable as $u$ or $x$, or for that matter any other name!
Hence, we get $\int\limits_{0}^{\pi} \dfrac{u \sin u}{1 + \cos^2 u} \ du = \int\limits_{0}^{\pi} \dfrac{x \sin x}{1 + \cos^2 x} \ dx$.
In other words, we DO NOT "let $x = u$" in that step. Rather, we use facts from calculus to conclude the above mentioned equality. Since these two integrals are the same, it does not matter what variable we use and we rather replace $u$ by $x$ in the second integral to get the answer.