Optimal. Leaf size=32 \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {1+d} (1+x)}{\sqrt {-1-x^3}}\right )}{\sqrt {1+d}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {2170, 213}
\begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {\sqrt {d+1} (x+1)}{\sqrt {-x^3-1}}\right )}{\sqrt {d+1}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 2170
Rubi steps
\begin {align*} \int \frac {2-2 x-x^2}{\left (2+d+d x+x^2\right ) \sqrt {-1-x^3}} \, dx &=-\left (4 \text {Subst}\left (\int \frac {1}{-2-(-2-2 d) x^2} \, dx,x,\frac {1+x}{\sqrt {-1-x^3}}\right )\right )\\ &=\frac {2 \tanh ^{-1}\left (\frac {\sqrt {1+d} (1+x)}{\sqrt {-1-x^3}}\right )}{\sqrt {1+d}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.68, size = 39, normalized size = 1.22 \begin {gather*} -\frac {2 \tanh ^{-1}\left (\frac {\sqrt {1+d} \sqrt {-1-x^3}}{1-x+x^2}\right )}{\sqrt {1+d}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.33, size = 1888, normalized size = 59.00
method | result | size |
default | \(\text {Expression too large to display}\) | \(1888\) |
elliptic | \(\text {Expression too large to display}\) | \(1897\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \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. 57 vs.
\(2 (26) = 52\).
time = 0.38, size = 185, normalized size = 5.78 \begin {gather*} \left [\frac {\log \left (-\frac {2 \, {\left (3 \, d + 4\right )} x^{3} - x^{4} - {\left (d^{2} + 2 \, d + 4\right )} x^{2} - 4 \, \sqrt {-x^{3} - 1} {\left ({\left (d + 2\right )} x - x^{2} + d\right )} \sqrt {d + 1} - d^{2} - 2 \, {\left (d^{2} + 2 \, d\right )} x + 4 \, d + 4}{2 \, d x^{3} + x^{4} + {\left (d^{2} + 2 \, d + 4\right )} x^{2} + d^{2} + 2 \, {\left (d^{2} + 2 \, d\right )} x + 4 \, d + 4}\right )}{2 \, \sqrt {d + 1}}, -\frac {\sqrt {-d - 1} \arctan \left (-\frac {\sqrt {-x^{3} - 1} {\left ({\left (d + 2\right )} x - x^{2} + d\right )} \sqrt {-d - 1}}{2 \, {\left ({\left (d + 1\right )} x^{3} + d + 1\right )}}\right )}{d + 1}\right ] \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 \frac {2 x}{d x \sqrt {- x^{3} - 1} + d \sqrt {- x^{3} - 1} + x^{2} \sqrt {- x^{3} - 1} + 2 \sqrt {- x^{3} - 1}}\, dx - \int \frac {x^{2}}{d x \sqrt {- x^{3} - 1} + d \sqrt {- x^{3} - 1} + x^{2} \sqrt {- x^{3} - 1} + 2 \sqrt {- x^{3} - 1}}\, dx - \int \left (- \frac {2}{d x \sqrt {- x^{3} - 1} + d \sqrt {- x^{3} - 1} + x^{2} \sqrt {- x^{3} - 1} + 2 \sqrt {- x^{3} - 1}}\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 [B]
time = 0.12, size = 680, normalized size = 21.25 \begin {gather*} -\frac {2\,\left (\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\sqrt {x^3+1}\,\sqrt {\frac {x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {x+1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {\frac {1}{2}-x+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\mathrm {F}\left (\mathrm {asin}\left (\sqrt {\frac {x+1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )}{\sqrt {-x^3-1}\,\sqrt {x^3+\left (-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )-1\right )\,x-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )}}-\frac {2\,\left (\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\sqrt {x^3+1}\,\sqrt {\frac {x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {x+1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {\frac {1}{2}-x+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\Pi \left (\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {\sqrt {d^2-4\,d-8}}{2}-\frac {d}{2}+1};\mathrm {asin}\left (\sqrt {\frac {x+1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )\,\left (d-\left (d-2\right )\,\left (\frac {d}{2}-\frac {\sqrt {d^2-4\,d-8}}{2}\right )+4\right )}{\sqrt {-x^3-1}\,\sqrt {x^3+\left (-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )-1\right )\,x-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )}\,\sqrt {d^2-4\,d-8}\,\left (\frac {\sqrt {d^2-4\,d-8}}{2}-\frac {d}{2}+1\right )}-\frac {2\,\left (\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\sqrt {x^3+1}\,\sqrt {\frac {x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {x+1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {\frac {1}{2}-x+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\Pi \left (-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {d}{2}+\frac {\sqrt {d^2-4\,d-8}}{2}-1};\mathrm {asin}\left (\sqrt {\frac {x+1}{\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {3}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )\,\left (d-\left (d-2\right )\,\left (\frac {d}{2}+\frac {\sqrt {d^2-4\,d-8}}{2}\right )+4\right )}{\sqrt {-x^3-1}\,\sqrt {x^3+\left (-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )-1\right )\,x-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )}\,\sqrt {d^2-4\,d-8}\,\left (\frac {d}{2}+\frac {\sqrt {d^2-4\,d-8}}{2}-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________