Optimal. Leaf size=19 \[ x^2-\frac {2}{3} \left (1-x^2\right )^{3/2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {6874, 267}
\begin {gather*} x^2-\frac {2}{3} \left (1-x^2\right )^{3/2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 267
Rule 6874
Rubi steps
\begin {align*} \int x \left (\sqrt {1-x}+\sqrt {1+x}\right )^2 \, dx &=\int \left (2 x+2 x \sqrt {1-x^2}\right ) \, dx\\ &=x^2+2 \int x \sqrt {1-x^2} \, dx\\ &=x^2-\frac {2}{3} \left (1-x^2\right )^{3/2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 25, normalized size = 1.32 \begin {gather*} \frac {1}{3} (-1+x) (1+x) \left (3+2 \sqrt {1-x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 24, normalized size = 1.26
method | result | size |
default | \(x^{2}+\frac {2 \sqrt {1-x}\, \sqrt {1+x}\, \left (x^{2}-1\right )}{3}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 15, normalized size = 0.79 \begin {gather*} x^{2} - \frac {2}{3} \, {\left (-x^{2} + 1\right )}^{\frac {3}{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 23, normalized size = 1.21 \begin {gather*} x^{2} + \frac {2}{3} \, {\left (x^{2} - 1\right )} \sqrt {x + 1} \sqrt {-x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 53.90, size = 144, normalized size = 7.58 \begin {gather*} - \frac {x^{3}}{3} - x + \frac {\left (x + 1\right )^{3}}{3} - 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 ) + 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}}}{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 ) - 1 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 51 vs.
\(2 (15) = 30\).
time = 4.01, size = 51, normalized size = 2.68 \begin {gather*} {\left (x + 1\right )}^{2} + \frac {1}{3} \, {\left ({\left (2 \, x - 5\right )} {\left (x + 1\right )} + 9\right )} \sqrt {x + 1} \sqrt {-x + 1} + \sqrt {x + 1} {\left (x - 2\right )} \sqrt {-x + 1} - 2 \, x - 2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.98, size = 33, normalized size = 1.74 \begin {gather*} x^2-\frac {\sqrt {1-x}\,\left (-\frac {2\,x^3}{3}-\frac {2\,x^2}{3}+\frac {2\,x}{3}+\frac {2}{3}\right )}{\sqrt {x+1}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________