Optimal. Leaf size=31 \[ x-\frac {x^2}{2}+\frac {1}{2} x \sqrt {1-x^2}+\frac {1}{2} \sin ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {6820, 201, 222}
\begin {gather*} \frac {\text {ArcSin}(x)}{2}-\frac {x^2}{2}+\frac {1}{2} \sqrt {1-x^2} x+x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 201
Rule 222
Rule 6820
Rubi steps
\begin {align*} \int \sqrt {1-x} \left (\sqrt {1-x}+\sqrt {1+x}\right ) \, dx &=\int \left (1-x+\sqrt {1-x^2}\right ) \, dx\\ &=x-\frac {x^2}{2}+\int \sqrt {1-x^2} \, dx\\ &=x-\frac {x^2}{2}+\frac {1}{2} x \sqrt {1-x^2}+\frac {1}{2} \int \frac {1}{\sqrt {1-x^2}} \, dx\\ &=x-\frac {x^2}{2}+\frac {1}{2} x \sqrt {1-x^2}+\frac {1}{2} \sin ^{-1}(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 45, normalized size = 1.45 \begin {gather*} x-\frac {x^2}{2}+\frac {1}{2} x \sqrt {1-x^2}-\tan ^{-1}\left (\frac {\sqrt {1-x^2}}{1+x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(62\) vs.
\(2(23)=46\).
time = 0.24, size = 63, normalized size = 2.03
method | result | size |
default | \(x -\frac {x^{2}}{2}+\frac {\sqrt {1-x}\, \left (1+x \right )^{\frac {3}{2}}}{2}-\frac {\sqrt {1-x}\, \sqrt {1+x}}{2}+\frac {\sqrt {\left (1-x \right ) \left (1+x \right )}\, \arcsin \left (x \right )}{2 \sqrt {1+x}\, \sqrt {1-x}}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 23, normalized size = 0.74 \begin {gather*} -\frac {1}{2} \, x^{2} + \frac {1}{2} \, \sqrt {-x^{2} + 1} x + x + \frac {1}{2} \, \arcsin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 44, normalized size = 1.42 \begin {gather*} -\frac {1}{2} \, x^{2} + \frac {1}{2} \, \sqrt {x + 1} x \sqrt {-x + 1} + x - \arctan \left (\frac {\sqrt {x + 1} \sqrt {-x + 1} - 1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs.
\(2 (22) = 44\).
time = 1.19, size = 65, normalized size = 2.10 \begin {gather*} - \frac {\left (1 - x\right )^{2}}{2} - 2 \left (\begin {cases} - \frac {x \sqrt {1 - x} \sqrt {x + 1}}{4} + \frac {\operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {1 - x}}{2} \right )}}{2} & \text {for}\: \sqrt {1 - x} > - \sqrt {2} \wedge \sqrt {1 - x} < \sqrt {2} \end {cases}\right ) \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. 54 vs.
\(2 (23) = 46\).
time = 2.73, size = 54, normalized size = 1.74 \begin {gather*} -\frac {1}{2} \, {\left (x - 1\right )}^{2} + \frac {1}{2} \, {\left (x + 2\right )} \sqrt {x + 1} \sqrt {-x + 1} - \sqrt {x + 1} \sqrt {-x + 1} - \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {-x + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.12, size = 209, normalized size = 6.74 \begin {gather*} x-2\,\mathrm {atan}\left (\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}\right )-\frac {\frac {2\,\left (\sqrt {1-x}-1\right )}{\sqrt {x+1}-1}-\frac {14\,{\left (\sqrt {1-x}-1\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}+\frac {14\,{\left (\sqrt {1-x}-1\right )}^5}{{\left (\sqrt {x+1}-1\right )}^5}-\frac {2\,{\left (\sqrt {1-x}-1\right )}^7}{{\left (\sqrt {x+1}-1\right )}^7}}{\frac {4\,{\left (\sqrt {1-x}-1\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}+\frac {6\,{\left (\sqrt {1-x}-1\right )}^4}{{\left (\sqrt {x+1}-1\right )}^4}+\frac {4\,{\left (\sqrt {1-x}-1\right )}^6}{{\left (\sqrt {x+1}-1\right )}^6}+\frac {{\left (\sqrt {1-x}-1\right )}^8}{{\left (\sqrt {x+1}-1\right )}^8}+1}-\frac {x^2}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________