\(\int \frac {e^{\frac {x^3}{e^4 (4+x^2)}} (-12 x^2-x^4)+e^4 (32+16 x^2+2 x^4)}{e^4 (16+8 x^2+x^4)} \, dx\) [9820]

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

Optimal result

Integrand size = 61, antiderivative size = 22 \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx=-e^{\frac {x^3}{e^4 \left (4+x^2\right )}}+2 x \]

[Out]

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

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.066, Rules used = {12, 28, 6820, 6838} \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx=2 x-e^{\frac {x^3}{e^4 \left (x^2+4\right )}} \]

[In]

Int[(E^(x^3/(E^4*(4 + x^2)))*(-12*x^2 - x^4) + E^4*(32 + 16*x^2 + 2*x^4))/(E^4*(16 + 8*x^2 + x^4)),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6838

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[q*(F^v/Log[F]), x] /;  !FalseQ[q]
] /; FreeQ[F, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{16+8 x^2+x^4} \, dx}{e^4} \\ & = \frac {\int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{\left (4+x^2\right )^2} \, dx}{e^4} \\ & = \frac {\int \left (2 e^4-\frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} x^2 \left (12+x^2\right )}{\left (4+x^2\right )^2}\right ) \, dx}{e^4} \\ & = 2 x-\frac {\int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} x^2 \left (12+x^2\right )}{\left (4+x^2\right )^2} \, dx}{e^4} \\ & = -e^{\frac {x^3}{e^4 \left (4+x^2\right )}}+2 x \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.23 \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx=-e^{\frac {x}{e^4}-\frac {4 x}{e^4 \left (4+x^2\right )}}+2 x \]

[In]

Integrate[(E^(x^3/(E^4*(4 + x^2)))*(-12*x^2 - x^4) + E^4*(32 + 16*x^2 + 2*x^4))/(E^4*(16 + 8*x^2 + x^4)),x]

[Out]

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

Maple [A] (verified)

Time = 0.86 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.95

method result size
risch \(2 x -{\mathrm e}^{\frac {x^{3} {\mathrm e}^{-4}}{x^{2}+4}}\) \(21\)
parallelrisch \({\mathrm e}^{-4} \left (2 x \,{\mathrm e}^{4}-{\mathrm e}^{4} {\mathrm e}^{\frac {x^{3} {\mathrm e}^{-4}}{x^{2}+4}}\right )\) \(32\)
parts \(2 x +\frac {-{\mathrm e}^{\frac {x^{3} {\mathrm e}^{-4}}{x^{2}+4}} x^{2}-4 \,{\mathrm e}^{\frac {x^{3} {\mathrm e}^{-4}}{x^{2}+4}}}{x^{2}+4}\) \(53\)
norman \(\frac {8 x +2 x^{3}-{\mathrm e}^{\frac {x^{3} {\mathrm e}^{-4}}{x^{2}+4}} x^{2}-4 \,{\mathrm e}^{\frac {x^{3} {\mathrm e}^{-4}}{x^{2}+4}}}{x^{2}+4}\) \(57\)

[In]

int(((-x^4-12*x^2)*exp(x^3/(x^2+4)/exp(4))+(2*x^4+16*x^2+32)*exp(4))/(x^4+8*x^2+16)/exp(4),x,method=_RETURNVER
BOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx=2 \, x - e^{\left (\frac {x^{3} e^{\left (-4\right )}}{x^{2} + 4}\right )} \]

[In]

integrate(((-x^4-12*x^2)*exp(x^3/(x^2+4)/exp(4))+(2*x^4+16*x^2+32)*exp(4))/(x^4+8*x^2+16)/exp(4),x, algorithm=
"fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.68 \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx=2 x - e^{\frac {x^{3}}{\left (x^{2} + 4\right ) e^{4}}} \]

[In]

integrate(((-x**4-12*x**2)*exp(x**3/(x**2+4)/exp(4))+(2*x**4+16*x**2+32)*exp(4))/(x**4+8*x**2+16)/exp(4),x)

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (20) = 40\).

Time = 0.36 (sec) , antiderivative size = 91, normalized size of antiderivative = 4.14 \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx={\left (2 \, {\left (x + \frac {2 \, x}{x^{2} + 4} - 3 \, \arctan \left (\frac {1}{2} \, x\right )\right )} e^{4} + 2 \, {\left (\frac {2 \, x}{x^{2} + 4} + \arctan \left (\frac {1}{2} \, x\right )\right )} e^{4} - 4 \, {\left (\frac {2 \, x}{x^{2} + 4} - \arctan \left (\frac {1}{2} \, x\right )\right )} e^{4} - e^{\left (x e^{\left (-4\right )} - \frac {4 \, x}{x^{2} e^{4} + 4 \, e^{4}} + 4\right )}\right )} e^{\left (-4\right )} \]

[In]

integrate(((-x^4-12*x^2)*exp(x^3/(x^2+4)/exp(4))+(2*x^4+16*x^2+32)*exp(4))/(x^4+8*x^2+16)/exp(4),x, algorithm=
"maxima")

[Out]

(2*(x + 2*x/(x^2 + 4) - 3*arctan(1/2*x))*e^4 + 2*(2*x/(x^2 + 4) + arctan(1/2*x))*e^4 - 4*(2*x/(x^2 + 4) - arct
an(1/2*x))*e^4 - e^(x*e^(-4) - 4*x/(x^2*e^4 + 4*e^4) + 4))*e^(-4)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.41 \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx={\left (2 \, x e^{4} - e^{\left (\frac {x^{3}}{x^{2} e^{4} + 4 \, e^{4}} + 4\right )}\right )} e^{\left (-4\right )} \]

[In]

integrate(((-x^4-12*x^2)*exp(x^3/(x^2+4)/exp(4))+(2*x^4+16*x^2+32)*exp(4))/(x^4+8*x^2+16)/exp(4),x, algorithm=
"giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {e^{\frac {x^3}{e^4 \left (4+x^2\right )}} \left (-12 x^2-x^4\right )+e^4 \left (32+16 x^2+2 x^4\right )}{e^4 \left (16+8 x^2+x^4\right )} \, dx=2\,x-{\mathrm {e}}^{\frac {x^3\,{\mathrm {e}}^{-4}}{x^2+4}} \]

[In]

int(-(exp(-4)*(exp((x^3*exp(-4))/(x^2 + 4))*(12*x^2 + x^4) - exp(4)*(16*x^2 + 2*x^4 + 32)))/(8*x^2 + x^4 + 16)
,x)

[Out]

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