\(\int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 (48+48 x-16 x^2-16 x^3)+e (36 x^3-36 x^4-4 x^5+4 x^6)}{-27 x^5+27 x^6-9 x^7+x^8} \, dx\) [7293]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 90, antiderivative size = 26 \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=x+\left (-x+\frac {2 e}{x \left (x-\frac {4 x}{1+x}\right )}\right )^2 \]

[Out]

x+(2*exp(1)/x/(x-4*x/(1+x))-x)^2

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(79\) vs. \(2(26)=52\).

Time = 0.08 (sec) , antiderivative size = 79, normalized size of antiderivative = 3.04, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.011, Rules used = {2099} \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=\frac {4 e^2}{9 x^4}+\frac {32 e^2}{27 x^3}+x^2+\frac {32 e^2}{27 x^2}+x+\frac {16 e (81+10 e)}{243 (3-x)}+\frac {64 e^2}{81 (3-x)^2}+\frac {4 e (81+40 e)}{243 x} \]

[In]

Int[(-27*x^5 - 27*x^6 + 45*x^7 - 17*x^8 + 2*x^9 + E^2*(48 + 48*x - 16*x^2 - 16*x^3) + E*(36*x^3 - 36*x^4 - 4*x
^5 + 4*x^6))/(-27*x^5 + 27*x^6 - 9*x^7 + x^8),x]

[Out]

(64*E^2)/(81*(3 - x)^2) + (16*E*(81 + 10*E))/(243*(3 - x)) + (4*E^2)/(9*x^4) + (32*E^2)/(27*x^3) + (32*E^2)/(2
7*x^2) + (4*E*(81 + 40*E))/(243*x) + x + x^2

Rule 2099

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (1-\frac {128 e^2}{81 (-3+x)^3}+\frac {16 e (81+10 e)}{243 (-3+x)^2}-\frac {16 e^2}{9 x^5}-\frac {32 e^2}{9 x^4}-\frac {64 e^2}{27 x^3}-\frac {4 e (81+40 e)}{243 x^2}+2 x\right ) \, dx \\ & = \frac {64 e^2}{81 (3-x)^2}+\frac {16 e (81+10 e)}{243 (3-x)}+\frac {4 e^2}{9 x^4}+\frac {32 e^2}{27 x^3}+\frac {32 e^2}{27 x^2}+\frac {4 e (81+40 e)}{243 x}+x+x^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.50 \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=\frac {(1+x) \left (-4 e (-3+x) x^3+(-3+x)^2 x^5+4 e^2 (1+x)\right )}{(-3+x)^2 x^4} \]

[In]

Integrate[(-27*x^5 - 27*x^6 + 45*x^7 - 17*x^8 + 2*x^9 + E^2*(48 + 48*x - 16*x^2 - 16*x^3) + E*(36*x^3 - 36*x^4
 - 4*x^5 + 4*x^6))/(-27*x^5 + 27*x^6 - 9*x^7 + x^8),x]

[Out]

((1 + x)*(-4*E*(-3 + x)*x^3 + (-3 + x)^2*x^5 + 4*E^2*(1 + x)))/((-3 + x)^2*x^4)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(57\) vs. \(2(27)=54\).

Time = 0.18 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.23

method result size
risch \(x^{2}+x +\frac {-4 x^{5} {\mathrm e}+8 x^{4} {\mathrm e}+4 x^{2} {\mathrm e}^{2}+12 x^{3} {\mathrm e}+8 \,{\mathrm e}^{2} x +4 \,{\mathrm e}^{2}}{x^{4} \left (x^{2}-6 x +9\right )}\) \(58\)
default \(x +x^{2}-\frac {\frac {160 \,{\mathrm e}^{2}}{243}+\frac {16 \,{\mathrm e}}{3}}{-3+x}+\frac {64 \,{\mathrm e}^{2}}{81 \left (-3+x \right )^{2}}-\frac {-\frac {160 \,{\mathrm e}^{2}}{243}-\frac {4 \,{\mathrm e}}{3}}{x}+\frac {4 \,{\mathrm e}^{2}}{9 x^{4}}+\frac {32 \,{\mathrm e}^{2}}{27 x^{3}}+\frac {32 \,{\mathrm e}^{2}}{27 x^{2}}\) \(66\)
norman \(\frac {x^{8}+\left (8 \,{\mathrm e}-27\right ) x^{4}+\left (-4 \,{\mathrm e}+27\right ) x^{5}-5 x^{7}+4 \,{\mathrm e}^{2}+8 \,{\mathrm e}^{2} x +4 x^{2} {\mathrm e}^{2}+12 x^{3} {\mathrm e}}{x^{4} \left (-3+x \right )^{2}}\) \(68\)
gosper \(\frac {x^{8}-5 x^{7}-4 x^{5} {\mathrm e}+8 x^{4} {\mathrm e}+27 x^{5}+4 x^{2} {\mathrm e}^{2}+12 x^{3} {\mathrm e}-27 x^{4}+8 \,{\mathrm e}^{2} x +4 \,{\mathrm e}^{2}}{x^{4} \left (x^{2}-6 x +9\right )}\) \(77\)
parallelrisch \(\frac {x^{8}-5 x^{7}-4 x^{5} {\mathrm e}+8 x^{4} {\mathrm e}+27 x^{5}+4 x^{2} {\mathrm e}^{2}+12 x^{3} {\mathrm e}-27 x^{4}+8 \,{\mathrm e}^{2} x +4 \,{\mathrm e}^{2}}{x^{4} \left (x^{2}-6 x +9\right )}\) \(77\)

[In]

int(((-16*x^3-16*x^2+48*x+48)*exp(1)^2+(4*x^6-4*x^5-36*x^4+36*x^3)*exp(1)+2*x^9-17*x^8+45*x^7-27*x^6-27*x^5)/(
x^8-9*x^7+27*x^6-27*x^5),x,method=_RETURNVERBOSE)

[Out]

x^2+x+(-4*x^5*exp(1)+8*x^4*exp(1)+4*x^2*exp(2)+12*x^3*exp(1)+8*exp(2)*x+4*exp(2))/x^4/(x^2-6*x+9)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (25) = 50\).

Time = 0.23 (sec) , antiderivative size = 66, normalized size of antiderivative = 2.54 \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=\frac {x^{8} - 5 \, x^{7} + 3 \, x^{6} + 9 \, x^{5} + 4 \, {\left (x^{2} + 2 \, x + 1\right )} e^{2} - 4 \, {\left (x^{5} - 2 \, x^{4} - 3 \, x^{3}\right )} e}{x^{6} - 6 \, x^{5} + 9 \, x^{4}} \]

[In]

integrate(((-16*x^3-16*x^2+48*x+48)*exp(1)^2+(4*x^6-4*x^5-36*x^4+36*x^3)*exp(1)+2*x^9-17*x^8+45*x^7-27*x^6-27*
x^5)/(x^8-9*x^7+27*x^6-27*x^5),x, algorithm="fricas")

[Out]

(x^8 - 5*x^7 + 3*x^6 + 9*x^5 + 4*(x^2 + 2*x + 1)*e^2 - 4*(x^5 - 2*x^4 - 3*x^3)*e)/(x^6 - 6*x^5 + 9*x^4)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (19) = 38\).

Time = 0.99 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.42 \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=x^{2} + x + \frac {- 4 e x^{5} + 8 e x^{4} + 12 e x^{3} + 4 x^{2} e^{2} + 8 x e^{2} + 4 e^{2}}{x^{6} - 6 x^{5} + 9 x^{4}} \]

[In]

integrate(((-16*x**3-16*x**2+48*x+48)*exp(1)**2+(4*x**6-4*x**5-36*x**4+36*x**3)*exp(1)+2*x**9-17*x**8+45*x**7-
27*x**6-27*x**5)/(x**8-9*x**7+27*x**6-27*x**5),x)

[Out]

x**2 + x + (-4*E*x**5 + 8*E*x**4 + 12*E*x**3 + 4*x**2*exp(2) + 8*x*exp(2) + 4*exp(2))/(x**6 - 6*x**5 + 9*x**4)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (25) = 50\).

Time = 0.19 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.31 \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=x^{2} + x - \frac {4 \, {\left (x^{5} e - 2 \, x^{4} e - 3 \, x^{3} e - x^{2} e^{2} - 2 \, x e^{2} - e^{2}\right )}}{x^{6} - 6 \, x^{5} + 9 \, x^{4}} \]

[In]

integrate(((-16*x^3-16*x^2+48*x+48)*exp(1)^2+(4*x^6-4*x^5-36*x^4+36*x^3)*exp(1)+2*x^9-17*x^8+45*x^7-27*x^6-27*
x^5)/(x^8-9*x^7+27*x^6-27*x^5),x, algorithm="maxima")

[Out]

x^2 + x - 4*(x^5*e - 2*x^4*e - 3*x^3*e - x^2*e^2 - 2*x*e^2 - e^2)/(x^6 - 6*x^5 + 9*x^4)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 67 vs. \(2 (25) = 50\).

Time = 0.28 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.58 \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=x^{2} + x - \frac {16 \, {\left (10 \, x e^{2} + 81 \, x e - 42 \, e^{2} - 243 \, e\right )}}{243 \, {\left (x - 3\right )}^{2}} + \frac {4 \, {\left (40 \, x^{3} e^{2} + 81 \, x^{3} e + 72 \, x^{2} e^{2} + 72 \, x e^{2} + 27 \, e^{2}\right )}}{243 \, x^{4}} \]

[In]

integrate(((-16*x^3-16*x^2+48*x+48)*exp(1)^2+(4*x^6-4*x^5-36*x^4+36*x^3)*exp(1)+2*x^9-17*x^8+45*x^7-27*x^6-27*
x^5)/(x^8-9*x^7+27*x^6-27*x^5),x, algorithm="giac")

[Out]

x^2 + x - 16/243*(10*x*e^2 + 81*x*e - 42*e^2 - 243*e)/(x - 3)^2 + 4/243*(40*x^3*e^2 + 81*x^3*e + 72*x^2*e^2 +
72*x*e^2 + 27*e^2)/x^4

Mupad [B] (verification not implemented)

Time = 12.05 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.88 \[ \int \frac {-27 x^5-27 x^6+45 x^7-17 x^8+2 x^9+e^2 \left (48+48 x-16 x^2-16 x^3\right )+e \left (36 x^3-36 x^4-4 x^5+4 x^6\right )}{-27 x^5+27 x^6-9 x^7+x^8} \, dx=\frac {\left (x+1\right )\,\left (x^7-6\,x^6+9\,x^5-4\,\mathrm {e}\,x^4+12\,\mathrm {e}\,x^3+4\,{\mathrm {e}}^2\,x+4\,{\mathrm {e}}^2\right )}{x^4\,{\left (x-3\right )}^2} \]

[In]

int(-(exp(2)*(48*x - 16*x^2 - 16*x^3 + 48) - 27*x^5 - 27*x^6 + 45*x^7 - 17*x^8 + 2*x^9 + exp(1)*(36*x^3 - 36*x
^4 - 4*x^5 + 4*x^6))/(27*x^5 - 27*x^6 + 9*x^7 - x^8),x)

[Out]

((x + 1)*(4*exp(2) + 4*x*exp(2) + 12*x^3*exp(1) - 4*x^4*exp(1) + 9*x^5 - 6*x^6 + x^7))/(x^4*(x - 3)^2)