Optimal. Leaf size=136 \[ -\frac {x^2}{6}-\frac {1}{6} \sqrt {x^2+1} x+\frac {8 \sqrt {x^2+1}}{9}-\frac {7}{54} \log \left (3 x^2+2 x+3\right )+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {x+1}{\sqrt {2} \sqrt {x^2+1}}\right )+\frac {7}{27} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {x^2+1}}\right )+\frac {8 x}{9}+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {3 x+1}{2 \sqrt {2}}\right )-\frac {41}{54} \sinh ^{-1}(x) \]
________________________________________________________________________________________
Rubi [A] time = 1.50, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 32, number of rules used = 14, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {6742, 195, 215, 634, 618, 204, 628, 1020, 12, 1081, 1037, 1031, 206, 261} \[ -\frac {x^2}{6}-\frac {1}{6} \sqrt {x^2+1} x+\frac {8 \sqrt {x^2+1}}{9}-\frac {7}{54} \log \left (3 x^2+2 x+3\right )+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {x+1}{\sqrt {2} \sqrt {x^2+1}}\right )+\frac {7}{27} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {x^2+1}}\right )+\frac {8 x}{9}+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {3 x+1}{2 \sqrt {2}}\right )-\frac {41}{54} \sinh ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 195
Rule 204
Rule 206
Rule 215
Rule 261
Rule 618
Rule 628
Rule 634
Rule 1020
Rule 1031
Rule 1037
Rule 1081
Rule 6742
Rubi steps
\begin {align*} \int \frac {x^2 \left (2-\sqrt {1+x^2}\right )}{\sqrt {1+x^2} \left (1-x^3+\left (1+x^2\right )^{3/2}\right )} \, dx &=\int \left (-\frac {x^2}{1-x^3+\sqrt {1+x^2}+x^2 \sqrt {1+x^2}}-\frac {2 x^2}{\sqrt {1+x^2} \left (-1+x^3-\left (1+x^2\right )^{3/2}\right )}\right ) \, dx\\ &=-\left (2 \int \frac {x^2}{\sqrt {1+x^2} \left (-1+x^3-\left (1+x^2\right )^{3/2}\right )} \, dx\right )-\int \frac {x^2}{1-x^3+\sqrt {1+x^2}+x^2 \sqrt {1+x^2}} \, dx\\ &=-\left (2 \int \left (-\frac {1}{3}+\frac {2}{9 \sqrt {1+x^2}}-\frac {x}{3 \sqrt {1+x^2}}+\frac {2 x}{3 \left (3+2 x+3 x^2\right )}+\frac {3+5 x}{9 \sqrt {1+x^2} \left (3+2 x+3 x^2\right )}\right ) \, dx\right )-\int \left (-\frac {2}{9}+\frac {x}{3}+\frac {\sqrt {1+x^2}}{3}+\frac {-3-5 x}{9 \left (3+2 x+3 x^2\right )}-\frac {2 x \sqrt {1+x^2}}{3 \left (3+2 x+3 x^2\right )}\right ) \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}-\frac {1}{9} \int \frac {-3-5 x}{3+2 x+3 x^2} \, dx-\frac {2}{9} \int \frac {3+5 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx-\frac {1}{3} \int \sqrt {1+x^2} \, dx-\frac {4}{9} \int \frac {1}{\sqrt {1+x^2}} \, dx+\frac {2}{3} \int \frac {x}{\sqrt {1+x^2}} \, dx+\frac {2}{3} \int \frac {x \sqrt {1+x^2}}{3+2 x+3 x^2} \, dx-\frac {4}{3} \int \frac {x}{3+2 x+3 x^2} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {4}{9} \sinh ^{-1}(x)+\frac {1}{18} \int \frac {4-4 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx-\frac {1}{18} \int \frac {16+16 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx+\frac {5}{54} \int \frac {2+6 x}{3+2 x+3 x^2} \, dx+\frac {4}{27} \int \frac {1}{3+2 x+3 x^2} \, dx-\frac {1}{6} \int \frac {1}{\sqrt {1+x^2}} \, dx-\frac {2}{9} \int \frac {2+6 x}{3+2 x+3 x^2} \, dx+\frac {2}{9} \int -\frac {2 x^2}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx+\frac {4}{9} \int \frac {1}{3+2 x+3 x^2} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {11}{18} \sinh ^{-1}(x)-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {8}{27} \operatorname {Subst}\left (\int \frac {1}{-32-x^2} \, dx,x,2+6 x\right )-\frac {4}{9} \int \frac {x^2}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx-\frac {8}{9} \operatorname {Subst}\left (\int \frac {1}{-32-x^2} \, dx,x,2+6 x\right )-\frac {128}{9} \operatorname {Subst}\left (\int \frac {1}{-4096-2 x^2} \, dx,x,\frac {32+32 x}{\sqrt {1+x^2}}\right )-\frac {1024}{9} \operatorname {Subst}\left (\int \frac {1}{32768-2 x^2} \, dx,x,\frac {-64+64 x}{\sqrt {1+x^2}}\right )\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {11}{18} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {4}{9} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {4}{27} \int \frac {1}{\sqrt {1+x^2}} \, dx-\frac {4}{27} \int \frac {-3-2 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {41}{54} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {4}{9} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {1}{27} \int \frac {-10-10 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx+\frac {1}{27} \int \frac {2-2 x}{\sqrt {1+x^2} \left (3+2 x+3 x^2\right )} \, dx\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {41}{54} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {1}{9} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {4}{9} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )-\frac {64}{27} \operatorname {Subst}\left (\int \frac {1}{-1024-2 x^2} \, dx,x,\frac {16+16 x}{\sqrt {1+x^2}}\right )-\frac {800}{27} \operatorname {Subst}\left (\int \frac {1}{12800-2 x^2} \, dx,x,\frac {40-40 x}{\sqrt {1+x^2}}\right )\\ &=\frac {8 x}{9}-\frac {x^2}{6}+\frac {8 \sqrt {1+x^2}}{9}-\frac {1}{6} x \sqrt {1+x^2}-\frac {41}{54} \sinh ^{-1}(x)+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+3 x}{2 \sqrt {2}}\right )+\frac {4}{27} \sqrt {2} \tan ^{-1}\left (\frac {1+x}{\sqrt {2} \sqrt {1+x^2}}\right )+\frac {7}{27} \tanh ^{-1}\left (\frac {1-x}{2 \sqrt {1+x^2}}\right )-\frac {7}{54} \log \left (3+2 x+3 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.01, size = 261, normalized size = 1.92 \[ \frac {1}{162} \left (-27 x^2-27 \sqrt {x^2+1} x+144 \sqrt {x^2+1}-21 \log \left (3 x^2+2 x+3\right )+\sqrt {1-2 i \sqrt {2}} \left (11 \sqrt {2}-i\right ) \tanh ^{-1}\left (\frac {-2 i \sqrt {2} x-x+3}{\sqrt {2+4 i \sqrt {2}} \sqrt {x^2+1}}\right )+11 \sqrt {2+4 i \sqrt {2}} \tanh ^{-1}\left (\frac {2 i \sqrt {2} x-x+3}{\sqrt {2-4 i \sqrt {2}} \sqrt {x^2+1}}\right )+i \sqrt {1+2 i \sqrt {2}} \tanh ^{-1}\left (\frac {2 i \sqrt {2} x-x+3}{\sqrt {2-4 i \sqrt {2}} \sqrt {x^2+1}}\right )+144 x+24 \sqrt {2} \tan ^{-1}\left (\frac {3 x+1}{2 \sqrt {2}}\right )-123 \sinh ^{-1}(x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.32, size = 117, normalized size = 0.86 \[ \frac {1}{18} \sqrt {x^2+1} (16-3 x)+\frac {1}{18} \left (16 x-3 x^2\right )+\frac {55}{54} \log \left (\sqrt {x^2+1}-x\right )-\frac {7}{27} \log \left (-x^2+(x+1) \sqrt {x^2+1}-x-2\right )+\frac {8}{27} \sqrt {2} \tan ^{-1}\left (-\frac {\sqrt {x^2+1}}{\sqrt {2}}+\frac {x}{\sqrt {2}}+\frac {1}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 170, normalized size = 1.25 \[ -\frac {1}{6} \, x^{2} - \frac {1}{18} \, \sqrt {x^{2} + 1} {\left (3 \, x - 16\right )} + \frac {4}{27} \, \sqrt {2} \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (3 \, x + 1\right )}\right ) + \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (3 \, x - 1\right )} + \frac {3}{2} \, \sqrt {2} \sqrt {x^{2} + 1}\right ) - \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (x + 1\right )} + \frac {1}{2} \, \sqrt {2} \sqrt {x^{2} + 1}\right ) + \frac {8}{9} \, x + \frac {7}{54} \, \log \left (3 \, x^{2} - \sqrt {x^{2} + 1} {\left (3 \, x - 1\right )} - x + 2\right ) - \frac {7}{54} \, \log \left (3 \, x^{2} + 2 \, x + 3\right ) - \frac {7}{54} \, \log \left (x^{2} - \sqrt {x^{2} + 1} {\left (x + 1\right )} + x + 2\right ) + \frac {41}{54} \, \log \left (-x + \sqrt {x^{2} + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.67, size = 176, normalized size = 1.29 \[ -\frac {1}{6} \, x^{2} - \frac {1}{18} \, \sqrt {x^{2} + 1} {\left (3 \, x - 16\right )} + \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (3 \, x - 3 \, \sqrt {x^{2} + 1} - 1\right )}\right ) + \frac {4}{27} \, \sqrt {2} \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (3 \, x + 1\right )}\right ) - \frac {4}{27} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (x - \sqrt {x^{2} + 1} + 1\right )}\right ) + \frac {8}{9} \, x + \frac {7}{54} \, \log \left (3 \, {\left (x - \sqrt {x^{2} + 1}\right )}^{2} - 2 \, x + 2 \, \sqrt {x^{2} + 1} + 1\right ) - \frac {7}{54} \, \log \left ({\left (x - \sqrt {x^{2} + 1}\right )}^{2} + 2 \, x - 2 \, \sqrt {x^{2} + 1} + 3\right ) - \frac {7}{54} \, \log \left (3 \, x^{2} + 2 \, x + 3\right ) + \frac {41}{54} \, \log \left (-x + \sqrt {x^{2} + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.05, size = 654, normalized size = 4.81 \[-\frac {x^{2}}{6}+\frac {8 x}{9}-\frac {7 \ln \left (3 x^{2}+2 x +3\right )}{54}+\frac {4 \sqrt {2}\, \arctan \left (\frac {\left (6 x +2\right ) \sqrt {2}}{8}\right )}{27}-\frac {41 \arcsinh \relax (x )}{54}-\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (-\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )+5 \arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{12 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\right )}+\frac {3 \sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (-\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )+\arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{8 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\right )}-\frac {x \sqrt {x^{2}+1}}{6}+\frac {8 \sqrt {x^{2}+1}}{9}+\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (13 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )+43 \arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{216 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\right )}-\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (-11 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\, \left (1+x \right )}{2 \left (\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1\right ) \left (1-x \right )}\right )+\arctanh \left (\sqrt {\frac {2 \left (1+x \right )^{2}}{\left (1-x \right )^{2}}+2}\right )\right )}{36 \sqrt {\frac {\frac {\left (1+x \right )^{2}}{\left (1-x \right )^{2}}+1}{\left (1+\frac {1+x}{1-x}\right )^{2}}}\, \left (1+\frac {1+x}{1-x}\right )}\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {x}{2 \, {\left (x^{2} + 1\right )}} + \frac {1}{2} \, \arctan \relax (x) + \int -\frac {3 \, x^{10} - 4 \, x^{9} + 5 \, x^{8} - 2 \, x^{7} + 15 \, x^{6} + 6 \, x^{5} + 9 \, x^{4}}{2 \, {\left (2 \, x^{13} + 7 \, x^{11} - 4 \, x^{10} + 11 \, x^{9} - 11 \, x^{8} + 13 \, x^{7} - 13 \, x^{6} + 11 \, x^{5} - 11 \, x^{4} + 4 \, x^{3} - 7 \, x^{2} - 2 \, {\left (x^{12} + 3 \, x^{10} - 2 \, x^{9} + 3 \, x^{8} - 6 \, x^{7} + 2 \, x^{6} - 6 \, x^{5} + 3 \, x^{4} - 2 \, x^{3} + 3 \, x^{2} + 1\right )} \sqrt {x^{2} + 1} - 2\right )}}\,{d x} + \frac {1}{6} \, \log \left (x^{2} + x + 1\right ) + \frac {1}{6} \, \log \left (x - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.62, size = 216, normalized size = 1.59 \[ \frac {8\,x}{9}-\frac {41\,\mathrm {asinh}\relax (x)}{54}-\left (\frac {x}{6}-\frac {8}{9}\right )\,\sqrt {x^2+1}-\frac {x^2}{6}+\frac {\sqrt {2}\,\ln \left (x+\frac {1}{3}-\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )\,\left (-\frac {16}{27}+\frac {\sqrt {2}\,14{}\mathrm {i}}{27}\right )\,1{}\mathrm {i}}{8}+\frac {\sqrt {2}\,\ln \left (x+\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )\,\left (\frac {16}{27}+\frac {\sqrt {2}\,14{}\mathrm {i}}{27}\right )\,1{}\mathrm {i}}{8}+\frac {\sqrt {2}\,\left (\frac {4}{81}+\frac {\sqrt {2}\,44{}\mathrm {i}}{81}\right )\,\left (\ln \left (x+\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )-\ln \left (1+\left (\frac {2}{3}+\frac {\sqrt {2}\,1{}\mathrm {i}}{3}\right )\,\sqrt {x^2+1}-\frac {x}{3}-\frac {\sqrt {2}\,x\,2{}\mathrm {i}}{3}\right )\right )\,1{}\mathrm {i}}{8\,\sqrt {{\left (\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )}^2+1}}+\frac {\sqrt {2}\,\left (-\frac {4}{81}+\frac {\sqrt {2}\,44{}\mathrm {i}}{81}\right )\,\left (\ln \left (x+\frac {1}{3}-\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )-\ln \left (1-\left (-\frac {2}{3}+\frac {\sqrt {2}\,1{}\mathrm {i}}{3}\right )\,\sqrt {x^2+1}-\frac {x}{3}+\frac {\sqrt {2}\,x\,2{}\mathrm {i}}{3}\right )\right )\,1{}\mathrm {i}}{8\,\sqrt {{\left (-\frac {1}{3}+\frac {\sqrt {2}\,2{}\mathrm {i}}{3}\right )}^2+1}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________