\(\int \frac {144+72 x^2+27 x^4+e^{2 x} (16+12 x+8 x^2+3 x^4)+e^x (96+36 x+48 x^2+27 x^4)}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx\) [1883]

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

Optimal result

Integrand size = 98, antiderivative size = 32 \[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=4-e^{-\frac {2}{x^2}} \left (-1+\frac {3}{3+e^x}-\frac {4}{3 x}-x\right ) \]

[Out]

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

Rubi [F]

\[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=\int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx \]

[In]

Int[(144 + 72*x^2 + 27*x^4 + E^(2*x)*(16 + 12*x + 8*x^2 + 3*x^4) + E^x*(96 + 36*x + 48*x^2 + 27*x^4))/(27*E^(2
/x^2)*x^4 + 18*E^(2/x^2 + x)*x^4 + 3*E^(2/x^2 + 2*x)*x^4),x]

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{-\frac {2}{x^2}} \left (144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )\right )}{3 \left (3+e^x\right )^2 x^4} \, dx \\ & = \frac {1}{3} \int \frac {e^{-\frac {2}{x^2}} \left (144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )\right )}{\left (3+e^x\right )^2 x^4} \, dx \\ & = \frac {1}{3} \int \left (-\frac {27 e^{-\frac {2}{x^2}}}{\left (3+e^x\right )^2}+\frac {9 e^{-\frac {2}{x^2}} \left (-4+x^3\right )}{\left (3+e^x\right ) x^3}+\frac {e^{-\frac {2}{x^2}} \left (16+12 x+8 x^2+3 x^4\right )}{x^4}\right ) \, dx \\ & = \frac {1}{3} \int \frac {e^{-\frac {2}{x^2}} \left (16+12 x+8 x^2+3 x^4\right )}{x^4} \, dx+3 \int \frac {e^{-\frac {2}{x^2}} \left (-4+x^3\right )}{\left (3+e^x\right ) x^3} \, dx-9 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right )^2} \, dx \\ & = \frac {1}{3} \int \left (3 e^{-\frac {2}{x^2}}+\frac {16 e^{-\frac {2}{x^2}}}{x^4}+\frac {12 e^{-\frac {2}{x^2}}}{x^3}+\frac {8 e^{-\frac {2}{x^2}}}{x^2}\right ) \, dx+3 \int \left (\frac {e^{-\frac {2}{x^2}}}{3+e^x}-\frac {4 e^{-\frac {2}{x^2}}}{\left (3+e^x\right ) x^3}\right ) \, dx-9 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right )^2} \, dx \\ & = \frac {8}{3} \int \frac {e^{-\frac {2}{x^2}}}{x^2} \, dx+3 \int \frac {e^{-\frac {2}{x^2}}}{3+e^x} \, dx+4 \int \frac {e^{-\frac {2}{x^2}}}{x^3} \, dx+\frac {16}{3} \int \frac {e^{-\frac {2}{x^2}}}{x^4} \, dx-9 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right )^2} \, dx-12 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right ) x^3} \, dx+\int e^{-\frac {2}{x^2}} \, dx \\ & = e^{-\frac {2}{x^2}}+\frac {4 e^{-\frac {2}{x^2}}}{3 x}+e^{-\frac {2}{x^2}} x+\frac {4}{3} \int \frac {e^{-\frac {2}{x^2}}}{x^2} \, dx-\frac {8}{3} \text {Subst}\left (\int e^{-2 x^2} \, dx,x,\frac {1}{x}\right )+3 \int \frac {e^{-\frac {2}{x^2}}}{3+e^x} \, dx-4 \int \frac {e^{-\frac {2}{x^2}}}{x^2} \, dx-9 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right )^2} \, dx-12 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right ) x^3} \, dx \\ & = e^{-\frac {2}{x^2}}+\frac {4 e^{-\frac {2}{x^2}}}{3 x}+e^{-\frac {2}{x^2}} x-\frac {2}{3} \sqrt {2 \pi } \text {erf}\left (\frac {\sqrt {2}}{x}\right )-\frac {4}{3} \text {Subst}\left (\int e^{-2 x^2} \, dx,x,\frac {1}{x}\right )+3 \int \frac {e^{-\frac {2}{x^2}}}{3+e^x} \, dx+4 \text {Subst}\left (\int e^{-2 x^2} \, dx,x,\frac {1}{x}\right )-9 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right )^2} \, dx-12 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right ) x^3} \, dx \\ & = e^{-\frac {2}{x^2}}+\frac {4 e^{-\frac {2}{x^2}}}{3 x}+e^{-\frac {2}{x^2}} x+3 \int \frac {e^{-\frac {2}{x^2}}}{3+e^x} \, dx-9 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right )^2} \, dx-12 \int \frac {e^{-\frac {2}{x^2}}}{\left (3+e^x\right ) x^3} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 5.05 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.94 \[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=\frac {1}{3} e^{-\frac {2}{x^2}} \left (3-\frac {9}{3+e^x}+\frac {4}{x}+3 x\right ) \]

[In]

Integrate[(144 + 72*x^2 + 27*x^4 + E^(2*x)*(16 + 12*x + 8*x^2 + 3*x^4) + E^x*(96 + 36*x + 48*x^2 + 27*x^4))/(2
7*E^(2/x^2)*x^4 + 18*E^(2/x^2 + x)*x^4 + 3*E^(2/x^2 + 2*x)*x^4),x]

[Out]

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

Maple [A] (verified)

Time = 0.33 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.28

method result size
risch \(\frac {\left (3 \,{\mathrm e}^{x} x^{2}+9 x^{2}+3 \,{\mathrm e}^{x} x +4 \,{\mathrm e}^{x}+12\right ) {\mathrm e}^{-\frac {2}{x^{2}}}}{3 x \left (3+{\mathrm e}^{x}\right )}\) \(41\)
parallelrisch \(-\frac {\left (-6 \,{\mathrm e}^{x} x^{3}-18 x^{3}-6 \,{\mathrm e}^{x} x^{2}-8 \,{\mathrm e}^{x} x -24 x \right ) {\mathrm e}^{-\frac {2}{x^{2}}}}{6 x^{2} \left (3+{\mathrm e}^{x}\right )}\) \(48\)
norman \(\frac {\left ({\mathrm e}^{x} x^{3}+{\mathrm e}^{x} x^{4}+4 x^{2}+3 x^{4}+\frac {4 \,{\mathrm e}^{x} x^{2}}{3}\right ) {\mathrm e}^{-\frac {2}{x^{2}}}}{x^{3} \left (3+{\mathrm e}^{x}\right )}\) \(49\)

[In]

int(((3*x^4+8*x^2+12*x+16)*exp(x)^2+(27*x^4+48*x^2+36*x+96)*exp(x)+27*x^4+72*x^2+144)/(3*x^4*exp(2/x^2)*exp(x)
^2+18*x^4*exp(2/x^2)*exp(x)+27*x^4*exp(2/x^2)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 96 vs. \(2 (28) = 56\).

Time = 0.25 (sec) , antiderivative size = 96, normalized size of antiderivative = 3.00 \[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=\frac {3 \, {\left (3 \, x^{2} + 4\right )} e^{\left (\frac {x^{3} + 2}{x^{2}} + \frac {2 \, {\left (x^{3} + 1\right )}}{x^{2}}\right )} + {\left (3 \, x^{2} + 3 \, x + 4\right )} e^{\left (\frac {4 \, {\left (x^{3} + 1\right )}}{x^{2}}\right )}}{3 \, {\left (3 \, x e^{\left (\frac {3 \, {\left (x^{3} + 2\right )}}{x^{2}}\right )} + x e^{\left (\frac {2 \, {\left (x^{3} + 2\right )}}{x^{2}} + \frac {2 \, {\left (x^{3} + 1\right )}}{x^{2}}\right )}\right )}} \]

[In]

integrate(((3*x^4+8*x^2+12*x+16)*exp(x)^2+(27*x^4+48*x^2+36*x+96)*exp(x)+27*x^4+72*x^2+144)/(3*x^4*exp(2/x^2)*
exp(x)^2+18*x^4*exp(2/x^2)*exp(x)+27*x^4*exp(2/x^2)),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.22 \[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=- \frac {3}{e^{\frac {2}{x^{2}}} e^{x} + 3 e^{\frac {2}{x^{2}}}} + \frac {\left (3 x^{2} + 3 x + 4\right ) e^{- \frac {2}{x^{2}}}}{3 x} \]

[In]

integrate(((3*x**4+8*x**2+12*x+16)*exp(x)**2+(27*x**4+48*x**2+36*x+96)*exp(x)+27*x**4+72*x**2+144)/(3*x**4*exp
(2/x**2)*exp(x)**2+18*x**4*exp(2/x**2)*exp(x)+27*x**4*exp(2/x**2)),x)

[Out]

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

Maxima [F]

\[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=\int { \frac {27 \, x^{4} + 72 \, x^{2} + {\left (3 \, x^{4} + 8 \, x^{2} + 12 \, x + 16\right )} e^{\left (2 \, x\right )} + 3 \, {\left (9 \, x^{4} + 16 \, x^{2} + 12 \, x + 32\right )} e^{x} + 144}{3 \, {\left (x^{4} e^{\left (2 \, x + \frac {2}{x^{2}}\right )} + 6 \, x^{4} e^{\left (x + \frac {2}{x^{2}}\right )} + 9 \, x^{4} e^{\left (\frac {2}{x^{2}}\right )}\right )}} \,d x } \]

[In]

integrate(((3*x^4+8*x^2+12*x+16)*exp(x)^2+(27*x^4+48*x^2+36*x+96)*exp(x)+27*x^4+72*x^2+144)/(3*x^4*exp(2/x^2)*
exp(x)^2+18*x^4*exp(2/x^2)*exp(x)+27*x^4*exp(2/x^2)),x, algorithm="maxima")

[Out]

1/3*integrate((27*x^4 + 72*x^2 + (3*x^4 + 8*x^2 + 12*x + 16)*e^(2*x) + 3*(9*x^4 + 16*x^2 + 12*x + 32)*e^x + 14
4)/(x^4*e^(2*x + 2/x^2) + 6*x^4*e^(x + 2/x^2) + 9*x^4*e^(2/x^2)), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 92 vs. \(2 (28) = 56\).

Time = 0.27 (sec) , antiderivative size = 92, normalized size of antiderivative = 2.88 \[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=\frac {3 \, x^{2} e^{\left (\frac {x^{3} + 2}{x^{2}}\right )} + 9 \, x^{2} e^{\left (\frac {2}{x^{2}}\right )} + 3 \, x e^{\left (\frac {x^{3} + 2}{x^{2}}\right )} + 4 \, e^{\left (\frac {x^{3} + 2}{x^{2}}\right )} + 12 \, e^{\left (\frac {2}{x^{2}}\right )}}{3 \, {\left (x e^{\left (\frac {x^{3} + 2}{x^{2}} + \frac {2}{x^{2}}\right )} + 3 \, x e^{\left (\frac {4}{x^{2}}\right )}\right )}} \]

[In]

integrate(((3*x^4+8*x^2+12*x+16)*exp(x)^2+(27*x^4+48*x^2+36*x+96)*exp(x)+27*x^4+72*x^2+144)/(3*x^4*exp(2/x^2)*
exp(x)^2+18*x^4*exp(2/x^2)*exp(x)+27*x^4*exp(2/x^2)),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.30 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.25 \[ \int \frac {144+72 x^2+27 x^4+e^{2 x} \left (16+12 x+8 x^2+3 x^4\right )+e^x \left (96+36 x+48 x^2+27 x^4\right )}{27 e^{\frac {2}{x^2}} x^4+18 e^{\frac {2}{x^2}+x} x^4+3 e^{\frac {2}{x^2}+2 x} x^4} \, dx=\frac {{\mathrm {e}}^{-\frac {2}{x^2}}\,\left (4\,{\mathrm {e}}^x+3\,x^2\,{\mathrm {e}}^x+3\,x\,{\mathrm {e}}^x+9\,x^2+12\right )}{3\,x\,\left ({\mathrm {e}}^x+3\right )} \]

[In]

int((exp(2*x)*(12*x + 8*x^2 + 3*x^4 + 16) + 72*x^2 + 27*x^4 + exp(x)*(36*x + 48*x^2 + 27*x^4 + 96) + 144)/(27*
x^4*exp(2/x^2) + 3*x^4*exp(2*x)*exp(2/x^2) + 18*x^4*exp(2/x^2)*exp(x)),x)

[Out]

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