<s>[INST] Integrate $\int x \sqrt{2 - \sqrt{1-x^2}}dx $ it seems that integration by parts with some relation to substitution...

$$
\int x \sqrt{2-\sqrt{1-x^2}}
= \frac{2}{5} \sqrt{2-\sqrt{1-x^2}} \cdot \sqrt{1-x^2}+\frac{8}{15}\sqrt{2-\sqrt{1-x^2}}+c
$$

How can I get that?
 [/INST] You don't need any integrations by parts for this. As others have suggested, if you substitute $u^2 = 1 -x^2$ and $2u\,du = -2x\,dx$ the integral becomes
$$-\int u\sqrt{2 - u}\,du$$
Now do another substitution $v = 2 - u$ and the integral becomes
$$\int (2-v)\sqrt{v}\,dv$$
$$= \int 2v^{1 \over 2} - v^{3 \over 2}\,dv$$
$$= {4 \over 3} v^{3 \over 2} - {2 \over 5} v^{5 \over 2} + C$$
Substituting back $v = 2 - u = 2 - \sqrt{1 - x^2}$ this becomes
$${4 \over 3} (2 - \sqrt{1 - x^2})^{3 \over 2} - {2 \over 5} (2 - \sqrt{1 - x^2})^{5 \over 2} + C$$
This is the final answer.
</s>