\(\int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7)}{27 x^3+27 x^4+9 x^5+x^6} \, dx\) [1384]

   Optimal result
   Rubi [F]
   Mathematica [B] (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 = 132, antiderivative size = 22 \[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx=\left (-e^{\frac {1}{x^2 (3+x)^2}}+x-x^2\right )^2 \]

[Out]

(x-x^2-exp(1/x^2/(3+x)^2))^2

Rubi [F]

\[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx=\int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx \]

[In]

Int[(E^(2/(9*x^2 + 6*x^3 + x^4))*(-12 - 8*x) + 54*x^4 - 108*x^5 - 36*x^6 + 56*x^7 + 30*x^8 + 4*x^9 + E^(9*x^2
+ 6*x^3 + x^4)^(-1)*(12*x - 4*x^2 - 62*x^3 + 54*x^4 + 90*x^5 + 34*x^6 + 4*x^7))/(27*x^3 + 27*x^4 + 9*x^5 + x^6
),x]

[Out]

E^(2/(x^2*(3 + x)^2)) + (1 - x)^2*x^2 - 2*Defer[Int][E^(1/(x^2*(3 + x)^2)), x] + (4*Defer[Int][E^(1/(x^2*(3 +
x)^2))/x^2, x])/9 - (16*Defer[Int][E^(1/(x^2*(3 + x)^2))/x, x])/27 + 4*Defer[Int][E^(1/(x^2*(3 + x)^2))*x, x]
- (16*Defer[Int][E^(1/(x^2*(3 + x)^2))/(3 + x)^3, x])/3 + (4*Defer[Int][E^(1/(x^2*(3 + x)^2))/(3 + x)^2, x])/3
 + (16*Defer[Int][E^(1/(x^2*(3 + x)^2))/(3 + x), x])/27

Rubi steps \begin{align*} \text {integral}& = \int \frac {2 \left (-2 e^{\frac {2}{x^2 (3+x)^2}} (3+2 x)+x^4 (3+x)^3 \left (1-3 x+2 x^2\right )+e^{\frac {1}{x^2 (3+x)^2}} x \left (6-2 x-31 x^2+27 x^3+45 x^4+17 x^5+2 x^6\right )\right )}{x^3 (3+x)^3} \, dx \\ & = 2 \int \frac {-2 e^{\frac {2}{x^2 (3+x)^2}} (3+2 x)+x^4 (3+x)^3 \left (1-3 x+2 x^2\right )+e^{\frac {1}{x^2 (3+x)^2}} x \left (6-2 x-31 x^2+27 x^3+45 x^4+17 x^5+2 x^6\right )}{x^3 (3+x)^3} \, dx \\ & = 2 \int \left ((-1+x) x (-1+2 x)-\frac {2 e^{\frac {2}{x^2 (3+x)^2}} (3+2 x)}{x^3 (3+x)^3}+\frac {e^{\frac {1}{x^2 (3+x)^2}} \left (6-2 x-31 x^2+27 x^3+45 x^4+17 x^5+2 x^6\right )}{x^2 (3+x)^3}\right ) \, dx \\ & = 2 \int (-1+x) x (-1+2 x) \, dx+2 \int \frac {e^{\frac {1}{x^2 (3+x)^2}} \left (6-2 x-31 x^2+27 x^3+45 x^4+17 x^5+2 x^6\right )}{x^2 (3+x)^3} \, dx-4 \int \frac {e^{\frac {2}{x^2 (3+x)^2}} (3+2 x)}{x^3 (3+x)^3} \, dx \\ & = e^{\frac {2}{x^2 (3+x)^2}}+(1-x)^2 x^2+2 \int \left (-e^{\frac {1}{x^2 (3+x)^2}}+\frac {2 e^{\frac {1}{x^2 (3+x)^2}}}{9 x^2}-\frac {8 e^{\frac {1}{x^2 (3+x)^2}}}{27 x}+2 e^{\frac {1}{x^2 (3+x)^2}} x-\frac {8 e^{\frac {1}{x^2 (3+x)^2}}}{3 (3+x)^3}+\frac {2 e^{\frac {1}{x^2 (3+x)^2}}}{3 (3+x)^2}+\frac {8 e^{\frac {1}{x^2 (3+x)^2}}}{27 (3+x)}\right ) \, dx \\ & = e^{\frac {2}{x^2 (3+x)^2}}+(1-x)^2 x^2+\frac {4}{9} \int \frac {e^{\frac {1}{x^2 (3+x)^2}}}{x^2} \, dx-\frac {16}{27} \int \frac {e^{\frac {1}{x^2 (3+x)^2}}}{x} \, dx+\frac {16}{27} \int \frac {e^{\frac {1}{x^2 (3+x)^2}}}{3+x} \, dx+\frac {4}{3} \int \frac {e^{\frac {1}{x^2 (3+x)^2}}}{(3+x)^2} \, dx-2 \int e^{\frac {1}{x^2 (3+x)^2}} \, dx+4 \int e^{\frac {1}{x^2 (3+x)^2}} x \, dx-\frac {16}{3} \int \frac {e^{\frac {1}{x^2 (3+x)^2}}}{(3+x)^3} \, dx \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(54\) vs. \(2(22)=44\).

Time = 0.14 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.45 \[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx=e^{\left .-\frac {4}{27}\right /x} \left (e^{\frac {1}{27} \left (\frac {3}{x^2}+\frac {9}{(3+x)^2}+\frac {2 x}{(3+x)^2}\right )}+e^{\left .\frac {2}{27}\right /x} (-1+x) x\right )^2 \]

[In]

Integrate[(E^(2/(9*x^2 + 6*x^3 + x^4))*(-12 - 8*x) + 54*x^4 - 108*x^5 - 36*x^6 + 56*x^7 + 30*x^8 + 4*x^9 + E^(
9*x^2 + 6*x^3 + x^4)^(-1)*(12*x - 4*x^2 - 62*x^3 + 54*x^4 + 90*x^5 + 34*x^6 + 4*x^7))/(27*x^3 + 27*x^4 + 9*x^5
 + x^6),x]

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(43\) vs. \(2(21)=42\).

Time = 0.46 (sec) , antiderivative size = 44, normalized size of antiderivative = 2.00

method result size
risch \(x^{4}-2 x^{3}+x^{2}+{\mathrm e}^{\frac {2}{x^{2} \left (3+x \right )^{2}}}+\left (2 x^{2}-2 x \right ) {\mathrm e}^{\frac {1}{x^{2} \left (3+x \right )^{2}}}\) \(44\)
parallelrisch \(x^{4}-2 x^{3}+2 \,{\mathrm e}^{\frac {1}{x^{2} \left (x^{2}+6 x +9\right )}} x^{2}+x^{2}-2 x \,{\mathrm e}^{\frac {1}{x^{2} \left (x^{2}+6 x +9\right )}}+{\mathrm e}^{\frac {2}{x^{2} \left (x^{2}+6 x +9\right )}}+24\) \(69\)
parts \(x^{4}-2 x^{3}+x^{2}+\frac {-18 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{2}+6 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{3}+10 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{4}+2 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{5}}{x \left (3+x \right )^{2}}+\frac {x^{4} {\mathrm e}^{\frac {2}{x^{4}+6 x^{3}+9 x^{2}}}+9 x^{2} {\mathrm e}^{\frac {2}{x^{4}+6 x^{3}+9 x^{2}}}+6 x^{3} {\mathrm e}^{\frac {2}{x^{4}+6 x^{3}+9 x^{2}}}}{x^{2} \left (3+x \right )^{2}}\) \(192\)
norman \(\frac {x^{8}+x^{4} {\mathrm e}^{\frac {2}{x^{4}+6 x^{3}+9 x^{2}}}-81 x^{2}-54 x^{3}-12 x^{5}-2 x^{6}+4 x^{7}+9 x^{2} {\mathrm e}^{\frac {2}{x^{4}+6 x^{3}+9 x^{2}}}+6 x^{3} {\mathrm e}^{\frac {2}{x^{4}+6 x^{3}+9 x^{2}}}-18 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{3}+6 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{4}+10 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{5}+2 \,{\mathrm e}^{\frac {1}{x^{4}+6 x^{3}+9 x^{2}}} x^{6}}{x^{2} \left (3+x \right )^{2}}\) \(198\)

[In]

int(((-8*x-12)*exp(1/(x^4+6*x^3+9*x^2))^2+(4*x^7+34*x^6+90*x^5+54*x^4-62*x^3-4*x^2+12*x)*exp(1/(x^4+6*x^3+9*x^
2))+4*x^9+30*x^8+56*x^7-36*x^6-108*x^5+54*x^4)/(x^6+9*x^5+27*x^4+27*x^3),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.59 \[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx=x^{4} - 2 \, x^{3} + x^{2} + 2 \, {\left (x^{2} - x\right )} e^{\left (\frac {1}{x^{4} + 6 \, x^{3} + 9 \, x^{2}}\right )} + e^{\left (\frac {2}{x^{4} + 6 \, x^{3} + 9 \, x^{2}}\right )} \]

[In]

integrate(((-8*x-12)*exp(1/(x^4+6*x^3+9*x^2))^2+(4*x^7+34*x^6+90*x^5+54*x^4-62*x^3-4*x^2+12*x)*exp(1/(x^4+6*x^
3+9*x^2))+4*x^9+30*x^8+56*x^7-36*x^6-108*x^5+54*x^4)/(x^6+9*x^5+27*x^4+27*x^3),x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (17) = 34\).

Time = 0.14 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.41 \[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx=x^{4} - 2 x^{3} + x^{2} + \left (2 x^{2} - 2 x\right ) e^{\frac {1}{x^{4} + 6 x^{3} + 9 x^{2}}} + e^{\frac {2}{x^{4} + 6 x^{3} + 9 x^{2}}} \]

[In]

integrate(((-8*x-12)*exp(1/(x**4+6*x**3+9*x**2))**2+(4*x**7+34*x**6+90*x**5+54*x**4-62*x**3-4*x**2+12*x)*exp(1
/(x**4+6*x**3+9*x**2))+4*x**9+30*x**8+56*x**7-36*x**6-108*x**5+54*x**4)/(x**6+9*x**5+27*x**4+27*x**3),x)

[Out]

x**4 - 2*x**3 + x**2 + (2*x**2 - 2*x)*exp(1/(x**4 + 6*x**3 + 9*x**2)) + exp(2/(x**4 + 6*x**3 + 9*x**2))

Maxima [B] (verification not implemented)

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

Time = 0.29 (sec) , antiderivative size = 188, normalized size of antiderivative = 8.55 \[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx=x^{4} - 2 \, x^{3} + x^{2} + {\left (2 \, {\left (x^{2} - x\right )} e^{\left (\frac {1}{9 \, {\left (x^{2} + 6 \, x + 9\right )}} + \frac {2}{27 \, {\left (x + 3\right )}} + \frac {2}{27 \, x} + \frac {1}{9 \, x^{2}}\right )} + e^{\left (\frac {2}{9 \, {\left (x^{2} + 6 \, x + 9\right )}} + \frac {4}{27 \, {\left (x + 3\right )}} + \frac {2}{9 \, x^{2}}\right )}\right )} e^{\left (-\frac {4}{27 \, x}\right )} - \frac {1215 \, {\left (10 \, x + 27\right )}}{x^{2} + 6 \, x + 9} + \frac {756 \, {\left (8 \, x + 21\right )}}{x^{2} + 6 \, x + 9} + \frac {1458 \, {\left (4 \, x + 11\right )}}{x^{2} + 6 \, x + 9} - \frac {162 \, {\left (4 \, x + 9\right )}}{x^{2} + 6 \, x + 9} + \frac {486 \, {\left (2 \, x + 5\right )}}{x^{2} + 6 \, x + 9} - \frac {27 \, {\left (2 \, x + 3\right )}}{x^{2} + 6 \, x + 9} \]

[In]

integrate(((-8*x-12)*exp(1/(x^4+6*x^3+9*x^2))^2+(4*x^7+34*x^6+90*x^5+54*x^4-62*x^3-4*x^2+12*x)*exp(1/(x^4+6*x^
3+9*x^2))+4*x^9+30*x^8+56*x^7-36*x^6-108*x^5+54*x^4)/(x^6+9*x^5+27*x^4+27*x^3),x, algorithm="maxima")

[Out]

x^4 - 2*x^3 + x^2 + (2*(x^2 - x)*e^(1/9/(x^2 + 6*x + 9) + 2/27/(x + 3) + 2/27/x + 1/9/x^2) + e^(2/9/(x^2 + 6*x
 + 9) + 4/27/(x + 3) + 2/9/x^2))*e^(-4/27/x) - 1215*(10*x + 27)/(x^2 + 6*x + 9) + 756*(8*x + 21)/(x^2 + 6*x +
9) + 1458*(4*x + 11)/(x^2 + 6*x + 9) - 162*(4*x + 9)/(x^2 + 6*x + 9) + 486*(2*x + 5)/(x^2 + 6*x + 9) - 27*(2*x
 + 3)/(x^2 + 6*x + 9)

Giac [B] (verification not implemented)

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

Time = 0.29 (sec) , antiderivative size = 73, normalized size of antiderivative = 3.32 \[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx=x^{4} - 2 \, x^{3} + 2 \, x^{2} e^{\left (\frac {1}{x^{4} + 6 \, x^{3} + 9 \, x^{2}}\right )} + x^{2} - 2 \, x e^{\left (\frac {1}{x^{4} + 6 \, x^{3} + 9 \, x^{2}}\right )} + e^{\left (\frac {2}{x^{4} + 6 \, x^{3} + 9 \, x^{2}}\right )} \]

[In]

integrate(((-8*x-12)*exp(1/(x^4+6*x^3+9*x^2))^2+(4*x^7+34*x^6+90*x^5+54*x^4-62*x^3-4*x^2+12*x)*exp(1/(x^4+6*x^
3+9*x^2))+4*x^9+30*x^8+56*x^7-36*x^6-108*x^5+54*x^4)/(x^6+9*x^5+27*x^4+27*x^3),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.90 (sec) , antiderivative size = 59, normalized size of antiderivative = 2.68 \[ \int \frac {e^{\frac {2}{9 x^2+6 x^3+x^4}} (-12-8 x)+54 x^4-108 x^5-36 x^6+56 x^7+30 x^8+4 x^9+e^{\frac {1}{9 x^2+6 x^3+x^4}} \left (12 x-4 x^2-62 x^3+54 x^4+90 x^5+34 x^6+4 x^7\right )}{27 x^3+27 x^4+9 x^5+x^6} \, dx={\mathrm {e}}^{\frac {2}{x^4+6\,x^3+9\,x^2}}-{\mathrm {e}}^{\frac {1}{x^4+6\,x^3+9\,x^2}}\,\left (2\,x-2\,x^2\right )+x^2-2\,x^3+x^4 \]

[In]

int((exp(1/(9*x^2 + 6*x^3 + x^4))*(12*x - 4*x^2 - 62*x^3 + 54*x^4 + 90*x^5 + 34*x^6 + 4*x^7) - exp(2/(9*x^2 +
6*x^3 + x^4))*(8*x + 12) + 54*x^4 - 108*x^5 - 36*x^6 + 56*x^7 + 30*x^8 + 4*x^9)/(27*x^3 + 27*x^4 + 9*x^5 + x^6
),x)

[Out]

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