Optimal. Leaf size=23 \[ \left (-1+\frac {x}{e^4+(1-x) x}\right )^2+\log (\log (4)) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(183\) vs. \(2(23)=46\).
time = 0.15, antiderivative size = 183, normalized size of antiderivative = 7.96, number of steps
used = 11, number of rules used = 5, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.072, Rules used = {2099, 652,
628, 632, 212} \begin {gather*} -\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (-x^2+x+e^4\right )}+\frac {2 \left (-4 \left (1+e^4\right ) x-2 e^4+1\right )}{\left (1+4 e^4\right ) \left (-x^2+x+e^4\right )}+\frac {x+e^4}{\left (-x^2+x+e^4\right )^2}-\frac {4 \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}}+\frac {16 \left (1+e^4\right ) \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}-\frac {12 \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 628
Rule 632
Rule 652
Rule 2099
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {2 \left (e^4+\left (1+2 e^4\right ) x\right )}{\left (e^4+x-x^2\right )^3}-\frac {2 \left (1+2 e^4+2 x\right )}{\left (e^4+x-x^2\right )^2}+\frac {2}{e^4+x-x^2}\right ) \, dx\\ &=2 \int \frac {e^4+\left (1+2 e^4\right ) x}{\left (e^4+x-x^2\right )^3} \, dx-2 \int \frac {1+2 e^4+2 x}{\left (e^4+x-x^2\right )^2} \, dx+2 \int \frac {1}{e^4+x-x^2} \, dx\\ &=\frac {e^4+x}{\left (e^4+x-x^2\right )^2}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+3 \int \frac {1}{\left (e^4+x-x^2\right )^2} \, dx-4 \text {Subst}\left (\int \frac {1}{1+4 e^4-x^2} \, dx,x,1-2 x\right )-\frac {\left (8 \left (1+e^4\right )\right ) \int \frac {1}{e^4+x-x^2} \, dx}{1+4 e^4}\\ &=\frac {e^4+x}{\left (e^4+x-x^2\right )^2}-\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}-\frac {4 \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}}+\frac {6 \int \frac {1}{e^4+x-x^2} \, dx}{1+4 e^4}+\frac {\left (16 \left (1+e^4\right )\right ) \text {Subst}\left (\int \frac {1}{1+4 e^4-x^2} \, dx,x,1-2 x\right )}{1+4 e^4}\\ &=\frac {e^4+x}{\left (e^4+x-x^2\right )^2}-\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {16 \left (1+e^4\right ) \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}-\frac {4 \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}}-\frac {12 \text {Subst}\left (\int \frac {1}{1+4 e^4-x^2} \, dx,x,1-2 x\right )}{1+4 e^4}\\ &=\frac {e^4+x}{\left (e^4+x-x^2\right )^2}-\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}-\frac {12 \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}+\frac {16 \left (1+e^4\right ) \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}-\frac {4 \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 27, normalized size = 1.17 \begin {gather*} -\frac {x \left (2 e^4+x-2 x^2\right )}{\left (e^4+x-x^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.40, size = 29, normalized size = 1.26
method | result | size |
norman | \(\frac {-x^{2}+2 x^{3}-2 x \,{\mathrm e}^{4}}{\left (-x^{2}+{\mathrm e}^{4}+x \right )^{2}}\) | \(29\) |
gosper | \(-\frac {x \left (-2 x^{2}+2 \,{\mathrm e}^{4}+x \right )}{x^{4}-2 x^{2} {\mathrm e}^{4}-2 x^{3}+{\mathrm e}^{8}+2 x \,{\mathrm e}^{4}+x^{2}}\) | \(45\) |
risch | \(\frac {-x^{2}+2 x^{3}-2 x \,{\mathrm e}^{4}}{x^{4}-2 x^{2} {\mathrm e}^{4}-2 x^{3}+{\mathrm e}^{8}+2 x \,{\mathrm e}^{4}+x^{2}}\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 46, normalized size = 2.00 \begin {gather*} \frac {2 \, x^{3} - x^{2} - 2 \, x e^{4}}{x^{4} - 2 \, x^{3} - x^{2} {\left (2 \, e^{4} - 1\right )} + 2 \, x e^{4} + e^{8}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 44, normalized size = 1.91 \begin {gather*} \frac {2 \, x^{3} - x^{2} - 2 \, x e^{4}}{x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{4} + e^{8}} \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. 44 vs.
\(2 (19) = 38\).
time = 0.45, size = 44, normalized size = 1.91 \begin {gather*} - \frac {- 2 x^{3} + x^{2} + 2 x e^{4}}{x^{4} - 2 x^{3} + x^{2} \cdot \left (1 - 2 e^{4}\right ) + 2 x e^{4} + e^{8}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 30, normalized size = 1.30 \begin {gather*} \frac {2 \, x^{3} - x^{2} - 2 \, x e^{4}}{{\left (x^{2} - x - e^{4}\right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.23, size = 43, normalized size = 1.87 \begin {gather*} -\frac {x\,\left (-2\,x^2+x+2\,{\mathrm {e}}^4\right )}{x^4-2\,x^3+\left (1-2\,{\mathrm {e}}^4\right )\,x^2+2\,{\mathrm {e}}^4\,x+{\mathrm {e}}^8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________