Why I cannot get the same answer if I do substitution with $x=a \cos\theta$ for $\int \sqrt{a^2-x^2}dx$ compared with substitution $x=a \sin\theta$? Why I cannot get the same answer if I do substitution with $x=a \cos\theta$ for $\int \sqrt{a^2-x^2}dx$ compared with substitution $x=a \sin\theta$?
$\int \sqrt{a^2-x^2}dx = \int \sqrt{a^2 - a^2 \cos^2 \theta} d\theta = \int a \sin\theta d\theta = \int a \sin\theta(-a \sin\theta)d\theta = -a^2 \int sin^2 \theta = -a^2[\frac{\theta}{2} - \frac{\sin(2\theta)}{4}]+C$
However, the correct answer seems to be $a^2(\frac{\theta}{2} + \frac{\sin(2\theta)}{4}) + C$
 A: Method$\#1:$
If $\theta=\arccos\dfrac xa=\dfrac\pi2-\arcsin\dfrac xa,$
$\cos\theta=\dfrac xa,0\le\theta\le\pi$
$$dx=-a\sin\theta\ d\theta\text{ and }\sqrt{a^2-x^2}=a\sin\theta$$
$$\int\sqrt{a^2-x^2}\ dx=-\int a^2\sin^2\theta\ d\theta=\dfrac{a^2}2\int(\cos2\theta-1)\ d\theta=\dfrac{a^2\sin2\theta}4-\dfrac{a^2\theta}2$$
Now $\sin2\theta=2\sin\theta\cos\theta=?$
Method$\#2:$
If $\theta=\arcsin\dfrac xa,$
$\sin\theta=\dfrac xa,-\dfrac\pi2\le\theta\le\dfrac\pi2$
$$dx=a\cos\theta\ d\theta\text{ and }\sqrt{a^2-x^2}=a\cos\theta$$
$$\int\sqrt{a^2-x^2}\ dx=\int a^2\cos^2\theta\ d\theta=\dfrac{a^2}2\int(\cos2\theta+1)\ d\theta=\dfrac{a^2\sin2\theta}4+\dfrac{a^2\theta}2$$
Now $\sin2\theta=2\sin\theta\cos\theta=?$
A: $I(x)$ integral done by two different methods yields $I_1(x), I_2(x)$. These two differ only  by a constant independent of $x$: $I_1(x)-I_2(x)=$Cosnstant, eventually.
In @lab Bhattacharjee 's answer above
$$I_2(x)=\frac{x}{2}\sqrt{a^2-x^2}-\frac{a^2}{2} \cos^{-1}(x/a)$$
and$$I_2(x)=\frac{x}{2}\sqrt{a^2-x^2}+\frac{a^2}{2} \sin^{-1}(x/a)$$
So $$I_1(x)-I_2(x)=\frac{a^2}{2}[-\cos^{-1}(x/a)-\sin^{-1}(x/a)]=-\frac{a^2\pi}{4}$$
