How does Wolfram Alpha come up with the substitution $x = 2\sin u$? Integration/Analysis I have to integrate 
$$
\int_0^2 \sqrt{4-x^2} \, dx
$$
I looked at the Wolfram Alpha step by step solution, and first thing it does is it substitutes
$x = 2\sin(u)\text{ and } \,dx = 2\cos(u)\,du$
How does it know to substitute $2\sin(u)$ for $x$?
 A: This is a common substitution technique known as Trig substitution, you substitute $x$ with a trigonometric function.
Typically, when something is in the form $\sqrt{a-x^2}$, you substitute $x=\sqrt a\sin u$ 
A: This is based on the fact that the usual parametric equation of the curve $x^2 + y^2 = R^2$ is $X = R\sin t, Y = R\cos t$.
You want to make a change of variables, to make the integrand look simpler (that is the point of the change of variables). So you would like to simplify $$
\sqrt{4 - x^2}
$$and in particular get rid of the $\sqrt.$. So you look for a function $t$ such as $$
y(t)^2 = 4-x(t)^2
$$
has a simple form. And you get
$$
x(t) = 2\sin t, y(t) = 2\cos t
$$
for the right domain of integration.
A: Theóphile's comment is a good answer. I will give another.
The $\sqrt{4-x^2}$ and indeed anything of the form $\sqrt{a^2-b^2}$ --- think $\sqrt{x^2-b^2}$ or $\sqrt{a^2-x^2}$ --- or $x^2+b^2$ can be considered --- via Pythagoras --- as sides of a right-angled triangle. 
In this example we have $\sqrt{2^2-x^2}=b\Rightarrow b^2+x^2=2^2$ so that we have a right-angled-triangle with sides $x$, $b=\sqrt{2^2-x^2}$ and hypotenuse $2$. 
Draw this triangle. Now choose an angle $\theta$ in the triangle so that you can write 
$$\sec/\tan/\sin\theta=\frac{x}{2}.$$
In this case we have $\sin \theta=\frac{x}{2}$.
Now, using the triangle you sketched,
$$\cos\theta=\frac{\sqrt{4-x^2}}{2}\Rightarrow \sqrt{4-x^2}=2\cos\theta.$$
We can also get a handle on $dx$ no problem.
When we eventually antidifferentiate, our answer will be in terms of $\theta$. We can find any of the trig ratios in terms of $x$ using our triangle and $\theta$... well $\theta$ is than angle whose sine is $\frac{x}{2}$ so
$$\theta=\sin^{-1}\left(\frac{x}{2}\right).$$
... not that it arises in this question.
