Here is the theorem about the validity of the method of substitution in evaluating definite integrals.Let be a continuous function on . Suppose that is a function satisfying and remains the same sign on . Then
Let me copy the proof from the textbook directly as follows.
Suppose is a primitive function of , i.e.
Hence, is a primitive function of . Then,
On reading the proof above, I puzzled that there is nothing to say about the condition that “the sign of remains the same over certain range" in the proof. But after looking into the proof carefully, the condition is actually used. Where? It is something about the following implication
What? The above is a must, isn’t it? No, man. We must add the condition about (as one of the ways) to ensure its validity. Caution: if , we cannot come up with the conclusion that always. F.6 boys, when we are discussing function, don’t forget to consider the domain. and may have different domains and hence they may represent different functions, and we cannot say immediately that !
I’d like to discuss this in details. Let me start with a simple example.
Let such that
Now, we use “substitution", let . How about the newly formed composite function (i.e. ), can we say that now? No, of course. is very free to assume any real real value, but is restricted on its domain  (if ) and can only assume values in .
Ok, let’s get moving to the situation of integration. Refer to Fig. 1 & 2 below
is assumed to be differentiable on , then is it true to say ?
No! At least, is defined on  (see Fig. 1) while is NOT defined for all , it is because, when varies from to , the value of is greater than (see Fig. 2) and is NOT defined for (see Fig. 1 again). If the condition “ remains the same sign on " is added, as shown in Fig. 4 below,
it is certain that for and hence .
Fine? Discussion ends? Not yet. I’d to add more. When the condition “ remains the same sign on " is satisfied, the method of substitution is valid. How about when the condition is NOT satisfied, will the method of substitution be failed? Under basic training in simple logic, we CANNOT say so.
I think that the condition “ remains the same sign on " is too strong! To ensure the validity of the method of substitution, it is not necessary to have the condition above, let me suggest an example below (for my poor mathematical skills, I just use figures to illustrate without rigorous real analysis treatment, sorry.)
Fig. 6 shows the graph of which is assumed to be differentiable over . Obviously, the so-called condition is not satisfied. However, in this case, we still have , can you see why?
Note that, in Fig. 6, , hence we have does not change signs over the intervals , and respectively and hence the validity of the method of substituion is confirmed; therefore
Summing up the three equations above, yielding
Yes, the method of substitution is valid even by using “ugly" differentiable functions like Fig. 7 below
The discussions above drove me to re-think about the condition “ remains the same sign on “, I think it is not quite necessary now; instead, I prefer using “, , is differentiable on and “. Do you agree?
Nelson gave me a note from mathematical analysis used in university, and I found that the way of presentation of the method of substitution is very clear (and clever), let me present here to round up my utterance:
Thereom (Change of Variable Formula): If is differentiable, is integrable on  and is continuous on , then .
Proof: Let . Then . So .