\(\int \frac {-1+e^4 (-5-2 x^2)+e^8 (10 x+5 x^2-x^4)+e^{2+x} (5 e^4+e^8 (-10 x+5 x^2))}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx\) [7835]

   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 = 81, antiderivative size = 31 \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=-\frac {x}{5 e^4}+\frac {-1+e^{2+x}-x}{1+e^4 x^2} \]

[Out]

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

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.35, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {28, 6874, 2326, 1828, 21, 8} \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=\frac {e^{x+2}}{e^4 x^2+1}-\frac {x+1}{e^4 x^2+1}-\frac {x}{5 e^4} \]

[In]

Int[(-1 + E^4*(-5 - 2*x^2) + E^8*(10*x + 5*x^2 - x^4) + E^(2 + x)*(5*E^4 + E^8*(-10*x + 5*x^2)))/(5*E^4 + 10*E
^8*x^2 + 5*E^12*x^4),x]

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + 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 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 6874

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

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

Mathematica [A] (verified)

Time = 1.88 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.26 \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=-\frac {-5 e^{6+x}+x+e^4 \left (5+5 x+x^3\right )}{5 e^4 \left (1+e^4 x^2\right )} \]

[In]

Integrate[(-1 + E^4*(-5 - 2*x^2) + E^8*(10*x + 5*x^2 - x^4) + E^(2 + x)*(5*E^4 + E^8*(-10*x + 5*x^2)))/(5*E^4
+ 10*E^8*x^2 + 5*E^12*x^4),x]

[Out]

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

Maple [A] (verified)

Time = 0.62 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00

method result size
risch \(-\frac {x^{3}+5 x +x \,{\mathrm e}^{-4}+5-5 \,{\mathrm e}^{2+x}}{5 \left (1+x^{2} {\mathrm e}^{4}\right )}\) \(31\)
norman \(\frac {x^{2} {\mathrm e}^{4}-\frac {x^{3}}{5}-\frac {{\mathrm e}^{-4} \left (5 \,{\mathrm e}^{4}+1\right ) x}{5}+{\mathrm e}^{2+x}}{1+x^{2} {\mathrm e}^{4}}\) \(41\)
parallelrisch \(\frac {\left (5 x^{2} {\mathrm e}^{8}-x^{3} {\mathrm e}^{4}-5 x \,{\mathrm e}^{4}+5 \,{\mathrm e}^{4} {\mathrm e}^{2+x}-x \right ) {\mathrm e}^{-4}}{5+5 x^{2} {\mathrm e}^{4}}\) \(50\)
default \(\text {Expression too large to display}\) \(712\)
parts \(\text {Expression too large to display}\) \(1342\)

[In]

int((((5*x^2-10*x)*exp(4)^2+5*exp(4))*exp(2+x)+(-x^4+5*x^2+10*x)*exp(4)^2+(-2*x^2-5)*exp(4)-1)/(5*x^4*exp(4)^3
+10*x^2*exp(4)^2+5*exp(4)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.03 \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=-\frac {{\left (x^{3} + 5 \, x + 5\right )} e^{4} + x - 5 \, e^{\left (x + 6\right )}}{5 \, {\left (x^{2} e^{8} + e^{4}\right )}} \]

[In]

integrate((((5*x^2-10*x)*exp(4)^2+5*exp(4))*exp(2+x)+(-x^4+5*x^2+10*x)*exp(4)^2+(-2*x^2-5)*exp(4)-1)/(5*x^4*ex
p(4)^3+10*x^2*exp(4)^2+5*exp(4)),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00 \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=- \frac {x}{5 e^{4}} - \frac {x + 1}{x^{2} e^{4} + 1} + \frac {e^{x + 2}}{x^{2} e^{4} + 1} \]

[In]

integrate((((5*x**2-10*x)*exp(4)**2+5*exp(4))*exp(2+x)+(-x**4+5*x**2+10*x)*exp(4)**2+(-2*x**2-5)*exp(4)-1)/(5*
x**4*exp(4)**3+10*x**2*exp(4)**2+5*exp(4)),x)

[Out]

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

Maxima [B] (verification not implemented)

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

Time = 0.32 (sec) , antiderivative size = 166, normalized size of antiderivative = 5.35 \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=\frac {1}{2} \, {\left (\arctan \left (x e^{2}\right ) e^{\left (-10\right )} - \frac {x}{x^{2} e^{12} + e^{8}}\right )} e^{8} - \frac {1}{10} \, {\left (2 \, x e^{\left (-12\right )} - 3 \, \arctan \left (x e^{2}\right ) e^{\left (-14\right )} + \frac {x}{x^{2} e^{16} + e^{12}}\right )} e^{8} - \frac {1}{2} \, {\left (\arctan \left (x e^{2}\right ) e^{\left (-6\right )} + \frac {x}{x^{2} e^{8} + e^{4}}\right )} e^{4} - \frac {1}{5} \, {\left (\arctan \left (x e^{2}\right ) e^{\left (-10\right )} - \frac {x}{x^{2} e^{12} + e^{8}}\right )} e^{4} - \frac {1}{10} \, \arctan \left (x e^{2}\right ) e^{\left (-6\right )} - \frac {x}{10 \, {\left (x^{2} e^{8} + e^{4}\right )}} - \frac {e^{8}}{x^{2} e^{12} + e^{8}} + \frac {e^{\left (x + 2\right )}}{x^{2} e^{4} + 1} \]

[In]

integrate((((5*x^2-10*x)*exp(4)^2+5*exp(4))*exp(2+x)+(-x^4+5*x^2+10*x)*exp(4)^2+(-2*x^2-5)*exp(4)-1)/(5*x^4*ex
p(4)^3+10*x^2*exp(4)^2+5*exp(4)),x, algorithm="maxima")

[Out]

1/2*(arctan(x*e^2)*e^(-10) - x/(x^2*e^12 + e^8))*e^8 - 1/10*(2*x*e^(-12) - 3*arctan(x*e^2)*e^(-14) + x/(x^2*e^
16 + e^12))*e^8 - 1/2*(arctan(x*e^2)*e^(-6) + x/(x^2*e^8 + e^4))*e^4 - 1/5*(arctan(x*e^2)*e^(-10) - x/(x^2*e^1
2 + e^8))*e^4 - 1/10*arctan(x*e^2)*e^(-6) - 1/10*x/(x^2*e^8 + e^4) - e^8/(x^2*e^12 + e^8) + e^(x + 2)/(x^2*e^4
 + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.16 \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=-\frac {x^{3} e^{4} + 10 \, x e^{4} + x + 10 \, e^{4} - 5 \, e^{\left (x + 6\right )}}{5 \, {\left (x^{2} e^{8} + e^{4}\right )}} \]

[In]

integrate((((5*x^2-10*x)*exp(4)^2+5*exp(4))*exp(2+x)+(-x^4+5*x^2+10*x)*exp(4)^2+(-2*x^2-5)*exp(4)-1)/(5*x^4*ex
p(4)^3+10*x^2*exp(4)^2+5*exp(4)),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 14.66 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.10 \[ \int \frac {-1+e^4 \left (-5-2 x^2\right )+e^8 \left (10 x+5 x^2-x^4\right )+e^{2+x} \left (5 e^4+e^8 \left (-10 x+5 x^2\right )\right )}{5 e^4+10 e^8 x^2+5 e^{12} x^4} \, dx=\frac {{\mathrm {e}}^{x-2}}{x^2+{\mathrm {e}}^{-4}}-\frac {x+1}{{\mathrm {e}}^4\,x^2+1}-\frac {x\,{\mathrm {e}}^{-4}}{5} \]

[In]

int(-(exp(4)*(2*x^2 + 5) - exp(8)*(10*x + 5*x^2 - x^4) - exp(x + 2)*(5*exp(4) - exp(8)*(10*x - 5*x^2)) + 1)/(5
*exp(4) + 10*x^2*exp(8) + 5*x^4*exp(12)),x)

[Out]

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