Optimal. Leaf size=31 \[ -x+x^2-\left (x+\frac {3}{1+e^4+\left (-x+x^2\right )^2}\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(83\) vs. \(2(31)=62\).
time = 1.26, 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 = {2099, 1602, 1694, 1687, 1192, 12, 1108, 648, 632, 210, 642, 1261, 643, 1120}
\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 210
Rule 632
Rule 642
Rule 643
Rule 648
Rule 1108
Rule 1120
Rule 1192
Rule 1261
Rule 1602
Rule 1687
Rule 1694
Rule 2099
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 \text {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 \text {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 \text {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 \text {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 ) \text {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 ) \text {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 \text {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 \text {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 \text {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 \text {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 ) \text {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 ) \text {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 \text {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 \text {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 \text {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 ) \text {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 ) \text {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 \text {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 \text {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 ) \text {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 ) \text {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 \text {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 \text {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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(94\) vs.
\(2(30)=60\).
time = 0.79, 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] Leaf count of result is larger than twice the leaf count of optimal. 86 vs.
\(2 (30) = 60\).
time = 0.30, 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]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 119 vs.
\(2 (30) = 60\).
time = 0.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]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 88 vs.
\(2 (20) = 40\).
time = 3.70, 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} \cdot \left (3 + 2 e^{4}\right ) + x^{3} \left (- 4 e^{4} - 4\right ) + x^{2} \cdot \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]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 48, normalized size = 1.55 \begin {gather*} -x - \frac {3 \, {\left (2 \, x^{5} - 4 \, x^{4} + 2 \, x^{3} + 2 \, x e^{4} + 2 \, x + 3\right )}}{{\left (x^{4} - 2 \, x^{3} + x^{2} + e^{4} + 1\right )}^{2}} \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]
________________________________________________________________________________________