Optimal. Leaf size=48 \[ \frac {1}{3} x \sqrt {3-2 x^2-x^4}-\frac {2 E\left (\sin ^{-1}(x)|-\frac {1}{3}\right )}{\sqrt {3}}+\frac {4 F\left (\sin ^{-1}(x)|-\frac {1}{3}\right )}{\sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {1976, 1105,
1194, 538, 435, 430} \begin {gather*} \frac {4 F\left (\text {ArcSin}(x)\left |-\frac {1}{3}\right .\right )}{\sqrt {3}}-\frac {2 E\left (\text {ArcSin}(x)\left |-\frac {1}{3}\right .\right )}{\sqrt {3}}+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 430
Rule 435
Rule 538
Rule 1105
Rule 1194
Rule 1976
Rubi steps
\begin {align*} \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx &=\int \sqrt {3-2 x^2-x^4} \, dx\\ &=\frac {1}{3} x \sqrt {3-2 x^2-x^4}+\frac {1}{3} \int \frac {6-2 x^2}{\sqrt {3-2 x^2-x^4}} \, dx\\ &=\frac {1}{3} x \sqrt {3-2 x^2-x^4}+\frac {2}{3} \int \frac {6-2 x^2}{\sqrt {2-2 x^2} \sqrt {6+2 x^2}} \, dx\\ &=\frac {1}{3} x \sqrt {3-2 x^2-x^4}-\frac {2}{3} \int \frac {\sqrt {6+2 x^2}}{\sqrt {2-2 x^2}} \, dx+8 \int \frac {1}{\sqrt {2-2 x^2} \sqrt {6+2 x^2}} \, dx\\ &=\frac {1}{3} x \sqrt {3-2 x^2-x^4}-\frac {2 E\left (\sin ^{-1}(x)|-\frac {1}{3}\right )}{\sqrt {3}}+\frac {4 F\left (\sin ^{-1}(x)|-\frac {1}{3}\right )}{\sqrt {3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 4.07, size = 59, normalized size = 1.23 \begin {gather*} \frac {1}{3} \left (x \sqrt {3-2 x^2-x^4}-2 i E\left (\left .i \sinh ^{-1}\left (\frac {x}{\sqrt {3}}\right )\right |-3\right )-4 i F\left (\left .i \sinh ^{-1}\left (\frac {x}{\sqrt {3}}\right )\right |-3\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 113 vs. \(2 (44 ) = 88\).
time = 0.04, size = 114, normalized size = 2.38
method | result | size |
default | \(\frac {x \sqrt {-x^{4}-2 x^{2}+3}}{3}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \EllipticF \left (x , \frac {i \sqrt {3}}{3}\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \left (\EllipticF \left (x , \frac {i \sqrt {3}}{3}\right )-\EllipticE \left (x , \frac {i \sqrt {3}}{3}\right )\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}\) | \(114\) |
elliptic | \(\frac {x \sqrt {-x^{4}-2 x^{2}+3}}{3}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \EllipticF \left (x , \frac {i \sqrt {3}}{3}\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \left (\EllipticF \left (x , \frac {i \sqrt {3}}{3}\right )-\EllipticE \left (x , \frac {i \sqrt {3}}{3}\right )\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}\) | \(114\) |
risch | \(-\frac {x \left (x^{2}-1\right ) \left (x^{2}+3\right )}{3 \sqrt {-\left (x^{2}-1\right ) \left (x^{2}+3\right )}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \left (\EllipticF \left (x , \frac {i \sqrt {3}}{3}\right )-\EllipticE \left (x , \frac {i \sqrt {3}}{3}\right )\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \EllipticF \left (x , \frac {i \sqrt {3}}{3}\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}\) | \(124\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.10, size = 24, normalized size = 0.50 \begin {gather*} \frac {\sqrt {-x^{4} - 2 \, x^{2} + 3} {\left (x^{2} + 2\right )}}{3 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\left (1 - x^{2}\right ) \left (x^{2} + 3\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {-\left (x^2-1\right )\,\left (x^2+3\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________