Optimal. Leaf size=22 \[ \frac {9 \left (1-3 x+x^2\right )^2}{2-e^2+x} \]
________________________________________________________________________________________
Rubi [B] time = 0.10, antiderivative size = 55, normalized size of antiderivative = 2.50, number of steps used = 4, number of rules used = 3, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {1986, 27, 1850} \begin {gather*} 9 x^3-9 \left (8-e^2\right ) x^2+9 \left (27-10 e^2+e^4\right ) x+\frac {9 \left (11-7 e^2+e^4\right )^2}{x-e^2+2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 1850
Rule 1986
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-117+396 x-225 x^2-36 x^3+27 x^4+e^2 \left (54-198 x+162 x^2-36 x^3\right )}{\left (-2+e^2\right )^2+2 \left (2-e^2\right ) x+x^2} \, dx\\ &=\int \frac {-117+396 x-225 x^2-36 x^3+27 x^4+e^2 \left (54-198 x+162 x^2-36 x^3\right )}{\left (2-e^2+x\right )^2} \, dx\\ &=\int \left (9 \left (27-10 e^2+e^4\right )-\frac {9 \left (11-7 e^2+e^4\right )^2}{\left (-2+e^2-x\right )^2}+18 \left (-8+e^2\right ) x+27 x^2\right ) \, dx\\ &=9 \left (27-10 e^2+e^4\right ) x-9 \left (8-e^2\right ) x^2+9 x^3+\frac {9 \left (11-7 e^2+e^4\right )^2}{2-e^2+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.04, size = 64, normalized size = 2.91 \begin {gather*} -\frac {9 \left (309+4 e^8+148 x+11 x^2-6 x^3+x^4-2 e^6 (25+2 x)+e^4 (226+42 x)-2 e^2 (219+71 x)\right )}{-2+e^2-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.62, size = 55, normalized size = 2.50 \begin {gather*} \frac {9 \, {\left (x^{4} - 6 \, x^{3} + 11 \, x^{2} - {\left (x + 14\right )} e^{6} + {\left (12 \, x + 71\right )} e^{4} - {\left (47 \, x + 154\right )} e^{2} + 54 \, x + e^{8} + 121\right )}}{x - e^{2} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 8.22, size = 32, normalized size = 1.45
method | result | size |
norman | \(\frac {-99 x^{2}+54 x^{3}-9 x^{4}+54 \,{\mathrm e}^{2}-117}{{\mathrm e}^{2}-x -2}\) | \(32\) |
gosper | \(\frac {-99 x^{2}+54 x^{3}-9 x^{4}+54 \,{\mathrm e}^{2}-117}{{\mathrm e}^{2}-x -2}\) | \(33\) |
risch | \(9 x \,{\mathrm e}^{4}+9 x^{2} {\mathrm e}^{2}+9 x^{3}-90 \,{\mathrm e}^{2} x -72 x^{2}+243 x -\frac {9 \,{\mathrm e}^{8}}{{\mathrm e}^{2}-x -2}+\frac {126 \,{\mathrm e}^{6}}{{\mathrm e}^{2}-x -2}-\frac {639 \,{\mathrm e}^{4}}{{\mathrm e}^{2}-x -2}+\frac {1386 \,{\mathrm e}^{2}}{{\mathrm e}^{2}-x -2}-\frac {1089}{{\mathrm e}^{2}-x -2}\) | \(95\) |
meijerg | \(-\frac {\left (-36 \,{\mathrm e}^{2}-36\right ) \left ({\mathrm e}^{2}-2\right )^{3} \left (\frac {x \left (-\frac {2 x^{2}}{\left ({\mathrm e}^{2}-2\right )^{2}}-\frac {6 x}{{\mathrm e}^{2}-2}+12\right )}{4 \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}+3 \ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )}{2-{\mathrm e}^{2}}+\frac {\left (162 \,{\mathrm e}^{2}-225\right ) \left ({\mathrm e}^{2}-2\right )^{2} \left (-\frac {x \left (-\frac {3 x}{{\mathrm e}^{2}-2}+6\right )}{3 \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}-2 \ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )}{2-{\mathrm e}^{2}}+\left (-198 \,{\mathrm e}^{2}+396\right ) \left (\frac {x}{\left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}+\ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )+\frac {27 \left ({\mathrm e}^{2}-2\right )^{4} \left (-\frac {x \left (-\frac {5 x^{3}}{\left ({\mathrm e}^{2}-2\right )^{3}}-\frac {10 x^{2}}{\left ({\mathrm e}^{2}-2\right )^{2}}-\frac {30 x}{{\mathrm e}^{2}-2}+60\right )}{15 \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}-4 \ln \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )\right )}{2-{\mathrm e}^{2}}-\frac {54 \,{\mathrm e}^{2} x}{\left (2-{\mathrm e}^{2}\right ) \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}+\frac {117 x}{\left (2-{\mathrm e}^{2}\right ) \left ({\mathrm e}^{2}-2\right ) \left (1-\frac {x}{{\mathrm e}^{2}-2}\right )}\) | \(341\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.79, size = 53, normalized size = 2.41 \begin {gather*} 9 \, x^{3} + 9 \, x^{2} {\left (e^{2} - 8\right )} + 9 \, x {\left (e^{4} - 10 \, e^{2} + 27\right )} + \frac {9 \, {\left (e^{8} - 14 \, e^{6} + 71 \, e^{4} - 154 \, e^{2} + 121\right )}}{x - e^{2} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.15, size = 73, normalized size = 3.32 \begin {gather*} x\,\left (162\,{\mathrm {e}}^2-27\,{\left ({\mathrm {e}}^2-2\right )}^2+\left (2\,{\mathrm {e}}^2-4\right )\,\left (18\,{\mathrm {e}}^2-144\right )-225\right )+x^2\,\left (9\,{\mathrm {e}}^2-72\right )+\frac {639\,{\mathrm {e}}^4-1386\,{\mathrm {e}}^2-126\,{\mathrm {e}}^6+9\,{\mathrm {e}}^8+1089}{x-{\mathrm {e}}^2+2}+9\,x^3 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.32, size = 56, normalized size = 2.55 \begin {gather*} 9 x^{3} + x^{2} \left (-72 + 9 e^{2}\right ) + x \left (- 90 e^{2} + 243 + 9 e^{4}\right ) + \frac {- 126 e^{6} - 1386 e^{2} + 1089 + 9 e^{8} + 639 e^{4}}{x - e^{2} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________