Optimal. Leaf size=31 \[ -x+x^2-\left (x+\frac {3}{1+e^4+\left (-x+x^2\right )^2}\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 1.90, antiderivative size = 83, normalized size of antiderivative = 2.68, number of steps used = 28, number of rules used = 14, integrand size = 240, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.058, Rules used = {2074, 1588, 1680, 1673, 1178, 12, 1094, 634, 618, 204, 628, 1247, 629, 1106} \begin {gather*} -\frac {9}{\left (x^4-2 x^3+x^2+e^4+1\right )^2}+\frac {48 (1-2 x)}{(2 x-1)^4-2 (1-2 x)^2+16 e^4+17}-x-\frac {48}{(2 x-1)^4-2 (1-2 x)^2+16 e^4+17} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 618
Rule 628
Rule 629
Rule 634
Rule 1094
Rule 1106
Rule 1178
Rule 1247
Rule 1588
Rule 1673
Rule 1680
Rule 2074
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-1+\frac {36 x \left (1-3 x+2 x^2\right )}{\left (1+e^4+x^2-2 x^3+x^4\right )^3}+\frac {12 \left (-2 \left (1+e^4\right )-x^2+x^3\right )}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+\frac {18}{1+e^4+x^2-2 x^3+x^4}\right ) \, dx\\ &=-x+12 \int \frac {-2 \left (1+e^4\right )-x^2+x^3}{\left (1+e^4+x^2-2 x^3+x^4\right )^2} \, dx+18 \int \frac {1}{1+e^4+x^2-2 x^3+x^4} \, dx+36 \int \frac {x \left (1-3 x+2 x^2\right )}{\left (1+e^4+x^2-2 x^3+x^4\right )^3} \, dx\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+12 \operatorname {Subst}\left (\int \frac {\frac {1}{8} \left (-17-16 e^4\right )-\frac {x}{4}+\frac {x^2}{2}+x^3}{\left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )^2} \, dx,x,-\frac {1}{2}+x\right )+18 \operatorname {Subst}\left (\int \frac {1}{\frac {17}{16}+e^4-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+12 \operatorname {Subst}\left (\int \frac {\frac {1}{8} \left (-17-16 e^4\right )+\frac {x^2}{2}}{\left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )^2} \, dx,x,-\frac {1}{2}+x\right )+12 \operatorname {Subst}\left (\int \frac {x \left (-\frac {1}{4}+x^2\right )}{\left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )^2} \, dx,x,-\frac {1}{2}+x\right )+\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}-x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )+\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}+6 \operatorname {Subst}\left (\int \frac {-\frac {1}{4}+x}{\left (\frac {17}{16}+e^4-\frac {x}{2}+x^2\right )^2} \, dx,x,\left (-\frac {1}{2}+x\right )^2\right )+\frac {18 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}+\frac {18 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}+\frac {24 \operatorname {Subst}\left (\int -\frac {3 \left (17+33 e^4+16 e^8\right )}{4 \left (\frac {17}{16}+e^4-\frac {x^2}{2}+x^4\right )} \, dx,x,-\frac {1}{2}+x\right )}{17+33 e^4+16 e^8}-\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )+\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}+18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \operatorname {Subst}\left (\int \frac {1}{\frac {17}{16}+e^4-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )-\frac {36 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}}-\frac {36 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}}\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \tan ^{-1}\left (\frac {2-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \tan ^{-1}\left (\frac {2+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )+18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}-x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )-\left (36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \tan ^{-1}\left (\frac {2-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \tan ^{-1}\left (\frac {2+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )+18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}} \log \left (\sqrt {17+16 e^4}+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )} (1-2 x)+(-1+2 x)^2\right )-\frac {18 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}-\frac {18 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )}{\sqrt {17+16 e^4}}+\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )-\left (18 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (1+\sqrt {17+16 e^4}\right )}}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x}{\frac {1}{4} \sqrt {17+16 e^4}+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )} x+x^2} \, dx,x,-\frac {1}{2}+x\right )\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \tan ^{-1}\left (\frac {2-\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )-36 \sqrt {\frac {2}{\left (17+16 e^4\right ) \left (-1+\sqrt {17+16 e^4}\right )}} \tan ^{-1}\left (\frac {2+\sqrt {2 \left (1+\sqrt {17+16 e^4}\right )}-4 x}{\sqrt {2 \left (-1+\sqrt {17+16 e^4}\right )}}\right )+\frac {36 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1-\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}}+\frac {36 \operatorname {Subst}\left (\int \frac {1}{\frac {1}{2} \left (1-\sqrt {17+16 e^4}\right )-x^2} \, dx,x,-1+\sqrt {\frac {1}{2} \left (1+\sqrt {17+16 e^4}\right )}+2 x\right )}{\sqrt {17+16 e^4}}\\ &=-x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {3}{1+e^4+x^2-2 x^3+x^4}+\frac {48 (1-2 x)}{17+16 e^4-2 (1-2 x)^2+(-1+2 x)^4}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 45, normalized size = 1.45 \begin {gather*} -x-\frac {9}{\left (1+e^4+x^2-2 x^3+x^4\right )^2}-\frac {6 x}{1+e^4+x^2-2 x^3+x^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.40, size = 119, normalized size = 3.84 \begin {gather*} -\frac {x^{9} - 4 \, x^{8} + 6 \, x^{7} - 4 \, x^{6} + 9 \, x^{5} - 16 \, x^{4} + 8 \, x^{3} + x e^{8} + 2 \, {\left (x^{5} - 2 \, x^{4} + x^{3} + 4 \, x\right )} e^{4} + 7 \, x + 9}{x^{8} - 4 \, x^{7} + 6 \, x^{6} - 4 \, x^{5} + 3 \, x^{4} - 4 \, x^{3} + 2 \, x^{2} + 2 \, {\left (x^{4} - 2 \, x^{3} + x^{2} + 1\right )} e^{4} + e^{8} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.24, size = 95, normalized size = 3.06
method | result | size |
risch | \(-x +\frac {-9-6 x^{5}+12 x^{4}-6 x^{3}+\left (-6 \,{\mathrm e}^{4}-6\right ) x}{x^{8}-4 x^{7}+6 x^{6}+2 x^{4} {\mathrm e}^{4}-4 x^{5}-4 x^{3} {\mathrm e}^{4}+3 x^{4}+2 x^{2} {\mathrm e}^{4}-4 x^{3}+{\mathrm e}^{8}+2 x^{2}+2 \,{\mathrm e}^{4}+1}\) | \(95\) |
norman | \(\frac {-20 x^{6}+10 x^{7}+\left (7-2 \,{\mathrm e}^{4}\right ) x^{5}+\left (-{\mathrm e}^{8}-8 \,{\mathrm e}^{4}-7\right ) x +\left (-8 \,{\mathrm e}^{4}-8\right ) x^{2}+\left (-4 \,{\mathrm e}^{4}+4\right ) x^{4}+\left (14 \,{\mathrm e}^{4}+8\right ) x^{3}-x^{9}-4 \,{\mathrm e}^{8}-8 \,{\mathrm e}^{4}-13}{\left (x^{4}-2 x^{3}+x^{2}+{\mathrm e}^{4}+1\right )^{2}}\) | \(100\) |
gosper | \(-\frac {x^{9}-10 x^{7}+2 x^{5} {\mathrm e}^{4}+20 x^{6}+4 x^{4} {\mathrm e}^{4}-7 x^{5}-14 x^{3} {\mathrm e}^{4}-4 x^{4}+x \,{\mathrm e}^{8}+8 x^{2} {\mathrm e}^{4}-8 x^{3}+4 \,{\mathrm e}^{8}+8 x \,{\mathrm e}^{4}+8 x^{2}+8 \,{\mathrm e}^{4}+7 x +13}{x^{8}-4 x^{7}+6 x^{6}+2 x^{4} {\mathrm e}^{4}-4 x^{5}-4 x^{3} {\mathrm e}^{4}+3 x^{4}+2 x^{2} {\mathrm e}^{4}-4 x^{3}+{\mathrm e}^{8}+2 x^{2}+2 \,{\mathrm e}^{4}+1}\) | \(156\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.36, size = 86, normalized size = 2.77 \begin {gather*} -x - \frac {3 \, {\left (2 \, x^{5} - 4 \, x^{4} + 2 \, x^{3} + 2 \, x {\left (e^{4} + 1\right )} + 3\right )}}{x^{8} - 4 \, x^{7} + 6 \, x^{6} - 4 \, x^{5} + x^{4} {\left (2 \, e^{4} + 3\right )} - 4 \, x^{3} {\left (e^{4} + 1\right )} + 2 \, x^{2} {\left (e^{4} + 1\right )} + e^{8} + 2 \, e^{4} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.04, size = 58, normalized size = 1.87 \begin {gather*} -x-\frac {6\,x^5-12\,x^4+6\,x^3+\left (8\,{\mathrm {e}}^4+{\mathrm {e}}^8-{\left ({\mathrm {e}}^4+1\right )}^2+7\right )\,x+9}{{\left (x^4-2\,x^3+x^2+{\mathrm {e}}^4+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 5.27, size = 88, normalized size = 2.84 \begin {gather*} - x - \frac {6 x^{5} - 12 x^{4} + 6 x^{3} + x \left (6 + 6 e^{4}\right ) + 9}{x^{8} - 4 x^{7} + 6 x^{6} - 4 x^{5} + x^{4} \left (3 + 2 e^{4}\right ) + x^{3} \left (- 4 e^{4} - 4\right ) + x^{2} \left (2 + 2 e^{4}\right ) + 1 + 2 e^{4} + e^{8}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________