How do I know which function to substitute the variable when solving problems by the "Integration by substitution" method? In Calculus, we use the "Integration by Substitution method" to integrate variables that are otherwise difficult to do by the conventional method. What I don't understand  which function do we have to take as a substitute. Is there perhaps a different/faster way to integrate functions by a simple  method which will help solve functions quickly?
Can anyone please help me on this topic?
 A: You normally substitute the function which satisfies the given condition:
$u=f(x)$
$du=f'(x)dx$
In this way you simplify the integrand to  only $f(u)du$, and if you get some constant in front, you simply place them outside the integral sign.
One example is this:
$\int \sqrt{x}e^{ix}dx$
Here we take advantage of that x and its square root are related to one another by the square. So here we substitute $u^2=x \rightarrow u=\sqrt{x}$. Then $du=\frac{1}{2\sqrt{x}}dx$ .
So we get: $dx=2\sqrt{x}du$. Here you see that $\sqrt{x}$ already exists in the integrand, so that is included for expressing dx in form of du. You then get:
$2\int e^{iu^2}du$
Here you can use the Error function integral to solve it, while if you tried to solve the first integral using integration by parts, you would end up in a infinite cycle of integration and differentiation of the parts of the integral.
A: Excellent question.
You usually want to substitute which has properties which can with the pre-substituted expression lead to a more simpler expression.
With an Example:
Let's take the following example:
$$ \int \sqrt{1-x^2} dx$$
If I substitute $x=\sin u$, replacing $dx = \cos u du $, then I have:
$$ \int \sqrt{1-\sin^2 u } \cos u du$$
Now, $\sqrt{1-\sin^2 u } = \cos u$ by Trigonometric laws. This is the point here, we got a new simplification for this expression which wouldn't have been there if we only considered the original expression. Continuing:
$$ \int \cos^2 u du $$
If you know your trigonometric identities, then:
$$ \frac{\cos 2 u+1}{2} = \cos^2 u$$
We can substitute that in the integral and it would turn our problem into just integrating a $\cos 2u$ and $1$, which are things we already know to integrate.
