\(\int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} (30-18 x+6 x^2-x^3)}{-8+12 x-6 x^2+x^3} \, dx\) [2144]

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

Optimal result

Integrand size = 59, antiderivative size = 22 \[ \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} \left (30-18 x+6 x^2-x^3\right )}{-8+12 x-6 x^2+x^3} \, dx=5+e^{\frac {(3-x) (-7+x)}{(-2+x)^2}-x} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

-Defer[Int][E^((-21 + 6*x + 3*x^2 - x^3)/(-2 + x)^2), x] + 10*Defer[Int][E^((-21 + 6*x + 3*x^2 - x^3)/(-2 + x)
^2)/(-2 + x)^3, x] - 6*Defer[Int][E^((-21 + 6*x + 3*x^2 - x^3)/(-2 + x)^2)/(-2 + x)^2, x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{(-2+x)^2}} \left (-30+18 x-6 x^2+x^3\right )}{(2-x)^3} \, dx \\ & = \int \left (-e^{\frac {-21+6 x+3 x^2-x^3}{(-2+x)^2}}+\frac {10 e^{\frac {-21+6 x+3 x^2-x^3}{(-2+x)^2}}}{(-2+x)^3}-\frac {6 e^{\frac {-21+6 x+3 x^2-x^3}{(-2+x)^2}}}{(-2+x)^2}\right ) \, dx \\ & = -\left (6 \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{(-2+x)^2}}}{(-2+x)^2} \, dx\right )+10 \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{(-2+x)^2}}}{(-2+x)^3} \, dx-\int e^{\frac {-21+6 x+3 x^2-x^3}{(-2+x)^2}} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.48 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.95 \[ \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} \left (30-18 x+6 x^2-x^3\right )}{-8+12 x-6 x^2+x^3} \, dx=e^{-1-\frac {5}{(-2+x)^2}+\frac {6}{-2+x}-x} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.13 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00

method result size
risch \({\mathrm e}^{-\frac {x^{3}-3 x^{2}-6 x +21}{\left (-2+x \right )^{2}}}\) \(22\)
gosper \({\mathrm e}^{-\frac {x^{3}-3 x^{2}-6 x +21}{x^{2}-4 x +4}}\) \(27\)
parallelrisch \({\mathrm e}^{-\frac {x^{3}-3 x^{2}-6 x +21}{x^{2}-4 x +4}}\) \(27\)
norman \(\frac {x^{2} {\mathrm e}^{\frac {-x^{3}+3 x^{2}+6 x -21}{x^{2}-4 x +4}}-4 x \,{\mathrm e}^{\frac {-x^{3}+3 x^{2}+6 x -21}{x^{2}-4 x +4}}+4 \,{\mathrm e}^{\frac {-x^{3}+3 x^{2}+6 x -21}{x^{2}-4 x +4}}}{\left (-2+x \right )^{2}}\) \(98\)

[In]

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

[Out]

exp(-(x^3-3*x^2-6*x+21)/(-2+x)^2)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.18 \[ \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} \left (30-18 x+6 x^2-x^3\right )}{-8+12 x-6 x^2+x^3} \, dx=e^{\left (-\frac {x^{3} - 3 \, x^{2} - 6 \, x + 21}{x^{2} - 4 \, x + 4}\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} \left (30-18 x+6 x^2-x^3\right )}{-8+12 x-6 x^2+x^3} \, dx=e^{\frac {- x^{3} + 3 x^{2} + 6 x - 21}{x^{2} - 4 x + 4}} \]

[In]

integrate((-x**3+6*x**2-18*x+30)*exp((-x**3+3*x**2+6*x-21)/(x**2-4*x+4))/(x**3-6*x**2+12*x-8),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.14 \[ \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} \left (30-18 x+6 x^2-x^3\right )}{-8+12 x-6 x^2+x^3} \, dx=e^{\left (-x - \frac {5}{x^{2} - 4 \, x + 4} + \frac {6}{x - 2} - 1\right )} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.24 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.59 \[ \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} \left (30-18 x+6 x^2-x^3\right )}{-8+12 x-6 x^2+x^3} \, dx=e^{\left (-\frac {x^{3}}{x^{2} - 4 \, x + 4} + \frac {3 \, x^{2}}{x^{2} - 4 \, x + 4} + \frac {6 \, x}{x^{2} - 4 \, x + 4} - \frac {21}{x^{2} - 4 \, x + 4}\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.16 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.73 \[ \int \frac {e^{\frac {-21+6 x+3 x^2-x^3}{4-4 x+x^2}} \left (30-18 x+6 x^2-x^3\right )}{-8+12 x-6 x^2+x^3} \, dx={\mathrm {e}}^{-\frac {x^3}{x^2-4\,x+4}}\,{\mathrm {e}}^{\frac {3\,x^2}{x^2-4\,x+4}}\,{\mathrm {e}}^{-\frac {21}{x^2-4\,x+4}}\,{\mathrm {e}}^{\frac {6\,x}{x^2-4\,x+4}} \]

[In]

int(-(exp((6*x + 3*x^2 - x^3 - 21)/(x^2 - 4*x + 4))*(18*x - 6*x^2 + x^3 - 30))/(12*x - 6*x^2 + x^3 - 8),x)

[Out]

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