How can blind substitution in differential equation lead to error? In differential equations,we sometime require to substitute for some variable to get a simplified expression but sometimes the substitutions are too complicated,for example substitute $x=a\operatorname{sin}^2\theta$ or suppose $y=a\operatorname{exp}(\phi)$ blindly without seeing the domain of $x,y$.What is the guarantee that we can apply a particular substitution there?I have seen that sometimes it may happen that blindly substituting can change the result and lead you to a wrong result.So how to actually understand whether we can use these substitutions there or not?
  Also it happens sometimes that we calculate blindly to simplify an expression and suppose divide by an expression that can be zero.Then we change the solution of the differential equation,right.Can someone help me to understand why actually we do those manipulations.I am looking for some rigorous explanation behind the calculations we keep on doing blindly.
 A: The most common example I see is trigonometric substitution, mainly with definite integrals (people forget about absolute values).
For example, a substitution $x=\cos\theta\, $ in the following integral gives
$$\int \sqrt{1-x^2} \, dx = -\int |\sin \theta|\sin\theta \, d\theta$$
Where many students would just ignore the absolute value.
Another problem would be the range of the function you are integrating. In the previous example, all values of $x$ in the domain of the integrand are defined and exist by the substitution $x=\cos\theta$, and all values of the integrand are assumed to be achievable by the substitution. However if I were to try the same with
$$\int_0^3 x dx$$
I cannot make the same substitution, since $x=\cos\theta$ cannot represent the function $f(x) = x$ on this interval. However, if it were the interval $0\le x \le a$, where $a\le 1$, we can.
For examaple, 
$$\int_0^{1/2} x dx = \int_{\pi/2}^{2\pi/3} \cos\theta (-\sin\theta) d\theta =\dfrac{1}{8}$$
Note the interval was chosen carefully, but can be different.
