When solving the following integral by substitution, I can get two different solutions (one is wrong) depending on the substitution. I'm not sure why the second option produces the incorrect solution. $$\int_0^{\frac12}\sqrt{1-x^2}\;dx$$
Option 1: Let $x=\sin(u)$.
Therefore $\;\sqrt{1-x^2}=\cos(u)\;$ and $\;dx=\cos(u)\,du\;$ which gives: $$\int_0^{\frac\pi6}\cos^2(u)\;du=\frac{\sqrt3}8+\frac{\pi}{12}$$
Option2: Let $x=\cos(u)$.
Therefore $\;\sqrt{1-x^2}=\sin(u)\;$ and $dx=-\sin(u)\,du$ which gives: $$\int_0^{\frac\pi3}-\sin^2(u)\;du=\frac{\sqrt3}8-\frac{\pi}6$$
$\mathbf{My\;question\;is}$: What is wrong with the second option?
The second solution's limit went wrong.
$x = cos(u),u = \arccos(x) \in[\frac{\pi}{3},\frac{\pi}{2}] $
$$\int_\frac\pi2^{\frac\pi3}-\sin^2(u) =\frac{\sqrt3}8+\frac{\pi}{12} $$.