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$?

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.
