<s>[INST] Trouble solving $\int\sqrt{1-x^2} \, dx$ I am trying to learn how to solve integrals and I've got the hang out of a lot of examples, but I haven't got the slightest idea how to solve this example, this is how far I've got:
$$
\int\sqrt{1 - x^2} \, dx = x\sqrt{1-x^2} - 2\int\frac{x^2}{\sqrt{1-x^2}} \, dx
$$
Can you please help me solve it, and also some tips concerning the integration are welcome.
Thank you
 [/INST] subsititute $ x =sin\theta $, this gives, 
$ dx = cos\theta d\theta$
hence, $ \int \sqrt{(1-x^2)} dx  = \int (\sqrt{1 - sin^2\theta} ). cos\theta d\theta = \int cos^2 \theta d\theta $
Remember that, $cos(\alpha + \beta) =  cos \alpha .cos \beta - sin \alpha . sin \beta $, 
substituting, $\alpha = \beta = \theta$, 


*

*$ (cos^2\theta - sin^2\theta) = cos(2\theta)$, as well

*$ (cos^2\theta + sin^2\theta) = 1  $
Adding equation 1. and 2. yields, 
$2 cos^2 \theta = 1 + cos2\theta ~ \implies ~ cos^2\theta = \frac{1}{2}(1+cos2\theta)$
hence going  back to integral,
$\int cos^2\theta d\theta = \frac{1}{2}\int (1+cos2\theta) d\theta  = \frac{1}{2}(\theta + \frac{sin2\theta}{2}) + C$ 
By reverse substitution, $\theta = cos^{-1}x = arccos(x) $  and $sin2\theta = 2.sin\theta . cos\theta$
The solution of indefinite integral is ,
$ \int \sqrt{(1-x^2)} dx =  \frac{1}{2} ( \theta + \frac{2.sin\theta.cost\theta}{2} )+ C \implies \frac{1}{2}(\theta + sin\theta. cos\theta) + C $
$ \int \sqrt{(1-x^2)} dx \implies  \frac{1}{2}(arccos(x) + x\sqrt{1-x^2}) + C $
</s>