\(\int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} (6-3 x+30 x^2)}{x^3+e^{4+x-5 x^2} (-6 x^3-2 x^4)+e^{8+2 x-10 x^2} (9 x^3+6 x^4+x^5)} \, dx\) [6549]

   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 [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 96, antiderivative size = 30 \[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=-3+\frac {3}{x \left (-e^{-4-x+5 x^2} x+x (3+x)\right )} \]

[Out]

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

Rubi [F]

\[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=\int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx \]

[In]

Int[(E^(8 + 2*x - 10*x^2)*(-18 - 9*x) + E^(4 + x - 5*x^2)*(6 - 3*x + 30*x^2))/(x^3 + E^(4 + x - 5*x^2)*(-6*x^3
 - 2*x^4) + E^(8 + 2*x - 10*x^2)*(9*x^3 + 6*x^4 + x^5)),x]

[Out]

30*Defer[Int][E^(8 + 2*x)/(E^(5*x^2) - 3*E^(4 + x) - E^(4 + x)*x)^2, x] - 12*Defer[Int][E^(8 + 2*x)/(x^2*(-E^(
5*x^2) + 3*E^(4 + x) + E^(4 + x)*x)^2), x] + 87*Defer[Int][E^(8 + 2*x)/(x*(-E^(5*x^2) + 3*E^(4 + x) + E^(4 + x
)*x)^2), x] - 6*Defer[Int][E^(4 + x)/(x^3*(-E^(5*x^2) + 3*E^(4 + x) + E^(4 + x)*x)), x] + 3*Defer[Int][E^(4 +
x)/(x^2*(-E^(5*x^2) + 3*E^(4 + x) + E^(4 + x)*x)), x] - 30*Defer[Int][E^(4 + x)/(x*(-E^(5*x^2) + 3*E^(4 + x) +
 E^(4 + x)*x)), x]

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

Mathematica [A] (verified)

Time = 5.34 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.03 \[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=\frac {3 e^{4+x}}{x^2 \left (-e^{5 x^2}+e^{4+x} (3+x)\right )} \]

[In]

Integrate[(E^(8 + 2*x - 10*x^2)*(-18 - 9*x) + E^(4 + x - 5*x^2)*(6 - 3*x + 30*x^2))/(x^3 + E^(4 + x - 5*x^2)*(
-6*x^3 - 2*x^4) + E^(8 + 2*x - 10*x^2)*(9*x^3 + 6*x^4 + x^5)),x]

[Out]

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

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.37

method result size
norman \(\frac {3 \,{\mathrm e}^{-5 x^{2}+x +4}}{x^{2} \left ({\mathrm e}^{-5 x^{2}+x +4} x +3 \,{\mathrm e}^{-5 x^{2}+x +4}-1\right )}\) \(41\)
parallelrisch \(\frac {3 \,{\mathrm e}^{-5 x^{2}+x +4}}{x^{2} \left ({\mathrm e}^{-5 x^{2}+x +4} x +3 \,{\mathrm e}^{-5 x^{2}+x +4}-1\right )}\) \(41\)
risch \(\frac {3}{x^{2} \left (3+x \right )}+\frac {3}{x^{2} \left (3+x \right ) \left ({\mathrm e}^{-\left (4+5 x \right ) \left (-1+x \right )} x +3 \,{\mathrm e}^{-\left (4+5 x \right ) \left (-1+x \right )}-1\right )}\) \(52\)

[In]

int(((-9*x-18)*exp(-5*x^2+x+4)^2+(30*x^2-3*x+6)*exp(-5*x^2+x+4))/((x^5+6*x^4+9*x^3)*exp(-5*x^2+x+4)^2+(-2*x^4-
6*x^3)*exp(-5*x^2+x+4)+x^3),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.23 \[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=-\frac {3 \, e^{\left (-5 \, x^{2} + x + 4\right )}}{x^{2} - {\left (x^{3} + 3 \, x^{2}\right )} e^{\left (-5 \, x^{2} + x + 4\right )}} \]

[In]

integrate(((-9*x-18)*exp(-5*x^2+x+4)^2+(30*x^2-3*x+6)*exp(-5*x^2+x+4))/((x^5+6*x^4+9*x^3)*exp(-5*x^2+x+4)^2+(-
2*x^4-6*x^3)*exp(-5*x^2+x+4)+x^3),x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

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

Time = 0.13 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.40 \[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=\frac {3}{- x^{3} - 3 x^{2} + \left (x^{4} + 6 x^{3} + 9 x^{2}\right ) e^{- 5 x^{2} + x + 4}} + \frac {3}{x^{3} + 3 x^{2}} \]

[In]

integrate(((-9*x-18)*exp(-5*x**2+x+4)**2+(30*x**2-3*x+6)*exp(-5*x**2+x+4))/((x**5+6*x**4+9*x**3)*exp(-5*x**2+x
+4)**2+(-2*x**4-6*x**3)*exp(-5*x**2+x+4)+x**3),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.23 \[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=-\frac {3 \, e^{\left (x + 4\right )}}{x^{2} e^{\left (5 \, x^{2}\right )} - {\left (x^{3} e^{4} + 3 \, x^{2} e^{4}\right )} e^{x}} \]

[In]

integrate(((-9*x-18)*exp(-5*x^2+x+4)^2+(30*x^2-3*x+6)*exp(-5*x^2+x+4))/((x^5+6*x^4+9*x^3)*exp(-5*x^2+x+4)^2+(-
2*x^4-6*x^3)*exp(-5*x^2+x+4)+x^3),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.53 \[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=\frac {3 \, e^{\left (-5 \, x^{2} + x + 4\right )}}{x^{3} e^{\left (-5 \, x^{2} + x + 4\right )} + 3 \, x^{2} e^{\left (-5 \, x^{2} + x + 4\right )} - x^{2}} \]

[In]

integrate(((-9*x-18)*exp(-5*x^2+x+4)^2+(30*x^2-3*x+6)*exp(-5*x^2+x+4))/((x^5+6*x^4+9*x^3)*exp(-5*x^2+x+4)^2+(-
2*x^4-6*x^3)*exp(-5*x^2+x+4)+x^3),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.62 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.63 \[ \int \frac {e^{8+2 x-10 x^2} (-18-9 x)+e^{4+x-5 x^2} \left (6-3 x+30 x^2\right )}{x^3+e^{4+x-5 x^2} \left (-6 x^3-2 x^4\right )+e^{8+2 x-10 x^2} \left (9 x^3+6 x^4+x^5\right )} \, dx=\frac {3\,{\mathrm {e}}^4\,{\mathrm {e}}^{-5\,x^2}\,{\mathrm {e}}^x}{3\,x^2\,{\mathrm {e}}^4\,{\mathrm {e}}^{-5\,x^2}\,{\mathrm {e}}^x-x^2+x^3\,{\mathrm {e}}^4\,{\mathrm {e}}^{-5\,x^2}\,{\mathrm {e}}^x} \]

[In]

int((exp(x - 5*x^2 + 4)*(30*x^2 - 3*x + 6) - exp(2*x - 10*x^2 + 8)*(9*x + 18))/(exp(2*x - 10*x^2 + 8)*(9*x^3 +
 6*x^4 + x^5) - exp(x - 5*x^2 + 4)*(6*x^3 + 2*x^4) + x^3),x)

[Out]

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