Solution (source code)

= Solution

Choose the <trigonometric substitution> $x=\sin u$ with $-\pi/2\le u\le\pi/2$. The <cosine> is nonnegative there, so $\sqrt{1-x^2}=\cos u$ and $dx=\cos u\,du$. The <double-angle formula> then gives
$$
\int\sqrt{1-x^2}\,dx=\int\cos^2u\,du=\frac u2+\frac14\sin2u+C.
$$
Since $u=\arcsin x$ and $\sin2u=2x\sqrt{1-x^2}$,
$$
\boxed{\int\sqrt{1-x^2}\,dx=\frac12\left(\arcsin x+x\sqrt{1-x^2}\right)+C.}
$$
The formula is an <antiderivative> on $(-1,1)$ and has continuous endpoint values at $\pm1$.