Optimal. Leaf size=19 \[ 2 x+x \sqrt {1-x^2}+\sin ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {6874, 201, 222}
\begin {gather*} \text {ArcSin}(x)+\sqrt {1-x^2} x+2 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 201
Rule 222
Rule 6874
Rubi steps
\begin {align*} \int \left (\sqrt {1-x}+\sqrt {1+x}\right )^2 \, dx &=\int \left (2+2 \sqrt {1-x^2}\right ) \, dx\\ &=2 x+2 \int \sqrt {1-x^2} \, dx\\ &=2 x+x \sqrt {1-x^2}+\int \frac {1}{\sqrt {1-x^2}} \, dx\\ &=2 x+x \sqrt {1-x^2}+\sin ^{-1}(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 37, normalized size = 1.95 \begin {gather*} 2+x \left (2+\sqrt {1-x^2}\right )+2 \tan ^{-1}\left (\frac {\sqrt {1+x}}{\sqrt {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. \(57\) vs.
\(2(17)=34\).
time = 0.21, size = 58, normalized size = 3.05
method | result | size |
default | \(2 x +\sqrt {1-x}\, \left (1+x \right )^{\frac {3}{2}}-\sqrt {1-x}\, \sqrt {1+x}+\frac {\sqrt {\left (1-x \right ) \left (1+x \right )}\, \arcsin \left (x \right )}{\sqrt {1+x}\, \sqrt {1-x}}\) | \(58\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 17, normalized size = 0.89 \begin {gather*} \sqrt {-x^{2} + 1} x + 2 \, x + \arcsin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 40 vs.
\(2 (17) = 34\).
time = 0.40, size = 40, normalized size = 2.11 \begin {gather*} \sqrt {x + 1} x \sqrt {-x + 1} + 2 \, x - 2 \, \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 [A]
time = 16.25, size = 61, normalized size = 3.21 \begin {gather*} 2 x + 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 ) + 2 \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. 48 vs.
\(2 (17) = 34\).
time = 4.82, size = 48, normalized size = 2.53 \begin {gather*} \sqrt {x + 1} {\left (x - 2\right )} \sqrt {-x + 1} + 2 \, x + 2 \, \sqrt {x + 1} \sqrt {-x + 1} + 2 \, \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {x + 1}\right ) + 2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.72, size = 206, normalized size = 10.84 \begin {gather*} 2\,x-4\,\mathrm {atan}\left (\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}\right )-\frac {\frac {4\,\left (\sqrt {1-x}-1\right )}{\sqrt {x+1}-1}-\frac {28\,{\left (\sqrt {1-x}-1\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}+\frac {28\,{\left (\sqrt {1-x}-1\right )}^5}{{\left (\sqrt {x+1}-1\right )}^5}-\frac {4\,{\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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________