<s>[INST] Is this substitution to solve an integral correct? To solve the integral:
$\int\frac {x}{\sqrt{4-x^2}}\ dx$
I used the substitution:
$u = \sqrt{4-x^2}$
hence:
$\frac{du}{dx} = -\frac {x}{\sqrt{4-x^2}}$
$dx = -\frac {\sqrt{4-x^2}}{x}\ du$
So the integral becomes:
$\int\frac {x}{u}(-\frac {\sqrt{4-x^2}}{x})\ du$
$= \int\frac {x}{u}(-\frac {u}{x})\ du$
$= \int -1\ du$
$= -u+c$
$= -\sqrt{ 4-x^2}+c$
However the solution I have seen is:
Use the substitution $x = 2\sin(t)$, so $dx = 2\cos(t)\ dt$
So the integral becomes:
$\int \frac {2\sin(t)(2\cos(t))}{\sqrt{\cos(t)^2}}\ dt$
After some rearranging the integral becomes:
$\int 2\sin(t)\ dt$
Which gives:
$-2\cos(t)+c$
Then using $\sin(t) = \frac x2$:
$\cos(t)^2 = 1 - \sin(t)^2$
$\cos(t)^2 = 1 - \frac {x^2}{4} = \frac{4-x^2}{4}$
$\cos(t) = \frac{\sqrt{4-x^2}}{2}$
Which then gives the solution as:
$= -\sqrt{ 4-x^2}+c$
I feel like the method I used was more efficient as it didn't require the use of trig functions. I'm fairly confident my method is correct so why would the solution use trig functions? Was I just lucky that I decided $u = \sqrt{ 4-x^2}$ was a good substitution?
 [/INST] The two have more in common than they first seem to because $u=\sqrt{4-4\sin^2 t}=\cos t,\,du=-\frac{x}{2}dt$. A trigonometric substitution is so useful in such a variety of problems it's become a standard part of the toolkit.
</s>