\[ \int x^2 \left (-\sqrt {1-x}-\sqrt {1+x}\right ) \left (\sqrt {1-x}+\sqrt {1+x}\right ) \, dx \]
Optimal antiderivative \[ -\frac {2 x^{3}}{3}-\frac {\arcsin \left (x \right )}{4}+\frac {x \sqrt {-x^{2}+1}}{4}-\frac {x^{3} \sqrt {-x^{2}+1}}{2} \]
command
integrate(x**2*(-(1-x)**(1/2)-(1+x)**(1/2))*((1-x)**(1/2)+(1+x)**(1/2)),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \frac {x^{4}}{4} - \frac {x^{3}}{3} - \frac {\left (x + 1\right )^{4}}{4} + \frac {2 \left (x + 1\right )^{3}}{3} - \frac {\left (x + 1\right )^{2}}{2} - 4 \left (\begin {cases} \frac {x \sqrt {1 - x} \sqrt {x + 1}}{4} + \frac {\operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )}}{2} & \text {for}\: \sqrt {x + 1} > - \sqrt {2} \wedge \sqrt {x + 1} < \sqrt {2} \end {cases}\right ) + 8 \left (\begin {cases} \frac {x \sqrt {1 - x} \sqrt {x + 1}}{4} - \frac {\left (1 - x\right )^{\frac {3}{2}} \left (x + 1\right )^{\frac {3}{2}}}{6} + \frac {\operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )}}{2} & \text {for}\: \sqrt {x + 1} > - \sqrt {2} \wedge \sqrt {x + 1} < \sqrt {2} \end {cases}\right ) - 4 \left (\begin {cases} \frac {x \sqrt {1 - x} \sqrt {x + 1}}{4} - \frac {\left (1 - x\right )^{\frac {3}{2}} \left (x + 1\right )^{\frac {3}{2}}}{3} - \frac {\sqrt {1 - x} \sqrt {x + 1} \left (- 5 x - 2 \left (x + 1\right )^{3} + 6 \left (x + 1\right )^{2} - 4\right )}{16} + \frac {5 \operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )}}{8} & \text {for}\: \sqrt {x + 1} > - \sqrt {2} \wedge \sqrt {x + 1} < \sqrt {2} \end {cases}\right ) \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________