\(\int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} (1250 x^2-102 x^3+2 x^4)+e^x (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6)}{e^{3 x} x^2+e^{2 x} (-1250 x^2+102 x^3-2 x^4)+e^x (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6)} \, dx\) [7658]

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

Optimal result

Integrand size = 142, antiderivative size = 29 \[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=-x+\frac {e^{-x}}{x \left (e^x-(25-x)^2+x\right )} \]

[Out]

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

Rubi [F]

\[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=\int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx \]

[In]

Int[(625 + 523*x - 48*x^2 - E^(3*x)*x^2 + x^3 + E^(2*x)*(1250*x^2 - 102*x^3 + 2*x^4) + E^x*(-1 - 2*x - 390625*
x^2 + 63750*x^3 - 3851*x^4 + 102*x^5 - x^6))/(E^(3*x)*x^2 + E^(2*x)*(-1250*x^2 + 102*x^3 - 2*x^4) + E^x*(39062
5*x^2 - 63750*x^3 + 3851*x^4 - 102*x^5 + x^6)),x]

[Out]

-x + 53*Defer[Int][1/(E^x*(-625 + E^x + 51*x - x^2)^2), x] - 676*Defer[Int][1/(E^x*x*(625 - E^x - 51*x + x^2)^
2), x] - Defer[Int][x/(E^x*(625 - E^x - 51*x + x^2)^2), x] + Defer[Int][1/(E^x*x^2*(625 - E^x - 51*x + x^2)),
x] + 2*Defer[Int][1/(E^x*x*(625 - E^x - 51*x + x^2)), x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{-x} \left (625+523 x-48 x^2-e^{3 x} x^2+x^3+2 e^{2 x} x^2 \left (625-51 x+x^2\right )-e^x \left (1+2 x+390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )\right )}{x^2 \left (625-e^x-51 x+x^2\right )^2} \, dx \\ & = \int \left (-1-\frac {e^{-x} \left (676-53 x+x^2\right )}{x \left (625-e^x-51 x+x^2\right )^2}+\frac {e^{-x} (1+2 x)}{x^2 \left (625-e^x-51 x+x^2\right )}\right ) \, dx \\ & = -x-\int \frac {e^{-x} \left (676-53 x+x^2\right )}{x \left (625-e^x-51 x+x^2\right )^2} \, dx+\int \frac {e^{-x} (1+2 x)}{x^2 \left (625-e^x-51 x+x^2\right )} \, dx \\ & = -x-\int \left (-\frac {53 e^{-x}}{\left (-625+e^x+51 x-x^2\right )^2}+\frac {676 e^{-x}}{x \left (625-e^x-51 x+x^2\right )^2}+\frac {e^{-x} x}{\left (625-e^x-51 x+x^2\right )^2}\right ) \, dx+\int \left (\frac {e^{-x}}{x^2 \left (625-e^x-51 x+x^2\right )}+\frac {2 e^{-x}}{x \left (625-e^x-51 x+x^2\right )}\right ) \, dx \\ & = -x+2 \int \frac {e^{-x}}{x \left (625-e^x-51 x+x^2\right )} \, dx+53 \int \frac {e^{-x}}{\left (-625+e^x+51 x-x^2\right )^2} \, dx-676 \int \frac {e^{-x}}{x \left (625-e^x-51 x+x^2\right )^2} \, dx-\int \frac {e^{-x} x}{\left (625-e^x-51 x+x^2\right )^2} \, dx+\int \frac {e^{-x}}{x^2 \left (625-e^x-51 x+x^2\right )} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 5.07 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.59 \[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=-\frac {e^{-x}-e^x x^2+x^2 \left (625-51 x+x^2\right )}{x \left (625-e^x-51 x+x^2\right )} \]

[In]

Integrate[(625 + 523*x - 48*x^2 - E^(3*x)*x^2 + x^3 + E^(2*x)*(1250*x^2 - 102*x^3 + 2*x^4) + E^x*(-1 - 2*x - 3
90625*x^2 + 63750*x^3 - 3851*x^4 + 102*x^5 - x^6))/(E^(3*x)*x^2 + E^(2*x)*(-1250*x^2 + 102*x^3 - 2*x^4) + E^x*
(390625*x^2 - 63750*x^3 + 3851*x^4 - 102*x^5 + x^6)),x]

[Out]

-((E^(-x) - E^x*x^2 + x^2*(625 - 51*x + x^2))/(x*(625 - E^x - 51*x + x^2)))

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.83

method result size
risch \(-x -\frac {{\mathrm e}^{-x}}{x \left (x^{2}-51 x +625\right )}-\frac {1}{x \left (x^{2}-51 x +625\right ) \left (x^{2}-51 x -{\mathrm e}^{x}+625\right )}\) \(53\)
parallelrisch \(\frac {\left (-1-{\mathrm e}^{x} x^{4}+51 \,{\mathrm e}^{x} x^{3}+{\mathrm e}^{2 x} x^{2}-625 \,{\mathrm e}^{x} x^{2}\right ) {\mathrm e}^{-x}}{x \left (x^{2}-51 x -{\mathrm e}^{x}+625\right )}\) \(54\)

[In]

int((-x^2*exp(x)^3+(2*x^4-102*x^3+1250*x^2)*exp(x)^2+(-x^6+102*x^5-3851*x^4+63750*x^3-390625*x^2-2*x-1)*exp(x)
+x^3-48*x^2+523*x+625)/(x^2*exp(x)^3+(-2*x^4+102*x^3-1250*x^2)*exp(x)^2+(x^6-102*x^5+3851*x^4-63750*x^3+390625
*x^2)*exp(x)),x,method=_RETURNVERBOSE)

[Out]

-x-1/x/(x^2-51*x+625)/exp(x)-1/x/(x^2-51*x+625)/(x^2-51*x-exp(x)+625)

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.90 \[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=-\frac {x^{2} e^{\left (2 \, x\right )} - {\left (x^{4} - 51 \, x^{3} + 625 \, x^{2}\right )} e^{x} - 1}{x e^{\left (2 \, x\right )} - {\left (x^{3} - 51 \, x^{2} + 625 \, x\right )} e^{x}} \]

[In]

integrate((-x^2*exp(x)^3+(2*x^4-102*x^3+1250*x^2)*exp(x)^2+(-x^6+102*x^5-3851*x^4+63750*x^3-390625*x^2-2*x-1)*
exp(x)+x^3-48*x^2+523*x+625)/(x^2*exp(x)^3+(-2*x^4+102*x^3-1250*x^2)*exp(x)^2+(x^6-102*x^5+3851*x^4-63750*x^3+
390625*x^2)*exp(x)),x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

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

Time = 0.11 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.93 \[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=- x + \frac {1}{- x^{5} + 102 x^{4} - 3851 x^{3} + 63750 x^{2} - 390625 x + \left (x^{3} - 51 x^{2} + 625 x\right ) e^{x}} - \frac {e^{- x}}{x^{3} - 51 x^{2} + 625 x} \]

[In]

integrate((-x**2*exp(x)**3+(2*x**4-102*x**3+1250*x**2)*exp(x)**2+(-x**6+102*x**5-3851*x**4+63750*x**3-390625*x
**2-2*x-1)*exp(x)+x**3-48*x**2+523*x+625)/(x**2*exp(x)**3+(-2*x**4+102*x**3-1250*x**2)*exp(x)**2+(x**6-102*x**
5+3851*x**4-63750*x**3+390625*x**2)*exp(x)),x)

[Out]

-x + 1/(-x**5 + 102*x**4 - 3851*x**3 + 63750*x**2 - 390625*x + (x**3 - 51*x**2 + 625*x)*exp(x)) - exp(-x)/(x**
3 - 51*x**2 + 625*x)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 3, normalized size of antiderivative = 0.10 \[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=-x \]

[In]

integrate((-x^2*exp(x)^3+(2*x^4-102*x^3+1250*x^2)*exp(x)^2+(-x^6+102*x^5-3851*x^4+63750*x^3-390625*x^2-2*x-1)*
exp(x)+x^3-48*x^2+523*x+625)/(x^2*exp(x)^3+(-2*x^4+102*x^3-1250*x^2)*exp(x)^2+(x^6-102*x^5+3851*x^4-63750*x^3+
390625*x^2)*exp(x)),x, algorithm="maxima")

[Out]

-x

Giac [B] (verification not implemented)

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

Time = 0.29 (sec) , antiderivative size = 61, normalized size of antiderivative = 2.10 \[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=-\frac {x^{4} e^{x} - 51 \, x^{3} e^{x} - x^{2} e^{\left (2 \, x\right )} + 625 \, x^{2} e^{x} + 1}{x^{3} e^{x} - 51 \, x^{2} e^{x} - x e^{\left (2 \, x\right )} + 625 \, x e^{x}} \]

[In]

integrate((-x^2*exp(x)^3+(2*x^4-102*x^3+1250*x^2)*exp(x)^2+(-x^6+102*x^5-3851*x^4+63750*x^3-390625*x^2-2*x-1)*
exp(x)+x^3-48*x^2+523*x+625)/(x^2*exp(x)^3+(-2*x^4+102*x^3-1250*x^2)*exp(x)^2+(x^6-102*x^5+3851*x^4-63750*x^3+
390625*x^2)*exp(x)),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 14.15 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.83 \[ \int \frac {625+523 x-48 x^2-e^{3 x} x^2+x^3+e^{2 x} \left (1250 x^2-102 x^3+2 x^4\right )+e^x \left (-1-2 x-390625 x^2+63750 x^3-3851 x^4+102 x^5-x^6\right )}{e^{3 x} x^2+e^{2 x} \left (-1250 x^2+102 x^3-2 x^4\right )+e^x \left (390625 x^2-63750 x^3+3851 x^4-102 x^5+x^6\right )} \, dx=\frac {{\mathrm {e}}^{-x}\,\left (625\,x^2\,{\mathrm {e}}^x-51\,x^3\,{\mathrm {e}}^x+x^4\,{\mathrm {e}}^x-x^2\,{\mathrm {e}}^{2\,x}+1\right )}{x\,\left (51\,x+{\mathrm {e}}^x-x^2-625\right )} \]

[In]

int((523*x - exp(x)*(2*x + 390625*x^2 - 63750*x^3 + 3851*x^4 - 102*x^5 + x^6 + 1) - x^2*exp(3*x) + exp(2*x)*(1
250*x^2 - 102*x^3 + 2*x^4) - 48*x^2 + x^3 + 625)/(exp(x)*(390625*x^2 - 63750*x^3 + 3851*x^4 - 102*x^5 + x^6) +
 x^2*exp(3*x) - exp(2*x)*(1250*x^2 - 102*x^3 + 2*x^4)),x)

[Out]

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