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

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

Optimal result

Integrand size = 59, antiderivative size = 31 \[ \int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx=4-\frac {-x+\frac {e^{-x} x}{5}}{\frac {e^{-2+x}}{5}+x} \]

[Out]

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

Rubi [F]

\[ \int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx=\int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx \]

[In]

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

[Out]

-1/5*1/E^x - E^2*Defer[Int][(E^x + 5*E^2*x)^(-2), x] + E^2*(1 - 25*E^2)*Defer[Int][x/(E^x + 5*E^2*x)^2, x] + 2
5*E^4*Defer[Int][x^2/(E^x + 5*E^2*x)^2, x] - ((1 - 25*E^2)*Defer[Int][(E^x + 5*E^2*x)^(-1), x])/5 - 5*E^2*Defe
r[Int][x/(E^x + 5*E^2*x), x]

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

Mathematica [A] (verified)

Time = 1.96 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.97 \[ \int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx=-\frac {e^2 \left (e^{-2+x}+e^{-x} x\right )}{e^x+5 e^2 x} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.23 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.77

method result size
risch \(-\frac {5 x \,{\mathrm e}^{-x}-25 x}{5 \left ({\mathrm e}^{-2+x}+5 x \right )}\) \(24\)
parallelrisch \(\frac {\left (5 \,{\mathrm e}^{x} x -x \right ) {\mathrm e}^{-x}}{{\mathrm e}^{-2+x}+5 x}\) \(25\)
norman \(\frac {\left (5 x \,{\mathrm e}^{2} {\mathrm e}^{x}-{\mathrm e}^{2} x \right ) {\mathrm e}^{-x}}{5 \,{\mathrm e}^{2} x +{\mathrm e}^{x}}\) \(29\)
parts \(-\frac {{\mathrm e}^{-2+x}}{{\mathrm e}^{-2+x}+5 x}-\frac {{\mathrm e}^{2} x \,{\mathrm e}^{-x}}{5 \,{\mathrm e}^{2} x +{\mathrm e}^{x}}\) \(37\)

[In]

int(((-5*x+5)*exp(-2+x)*exp(x)+(-1+2*x)*exp(-2+x)+5*x^2)/(exp(-2+x)^2+10*x*exp(-2+x)+25*x^2)/exp(x),x,method=_
RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.77 \[ \int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx=\frac {5 \, x e^{x} - x}{5 \, x e^{x} + e^{\left (2 \, x - 2\right )}} \]

[In]

integrate(((-5*x+5)*exp(-2+x)*exp(x)+(-1+2*x)*exp(-2+x)+5*x^2)/(exp(-2+x)^2+10*x*exp(-2+x)+25*x^2)/exp(x),x, a
lgorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.84 \[ \int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx=\frac {25 x e^{2} + 1}{25 x e^{2} + 5 e^{x}} - \frac {e^{- x}}{5} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90 \[ \int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx=-\frac {x e^{2} - 5 \, x e^{\left (x + 2\right )}}{5 \, x e^{\left (x + 2\right )} + e^{\left (2 \, x\right )}} \]

[In]

integrate(((-5*x+5)*exp(-2+x)*exp(x)+(-1+2*x)*exp(-2+x)+5*x^2)/(exp(-2+x)^2+10*x*exp(-2+x)+25*x^2)/exp(x),x, a
lgorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

integrate(((-5*x+5)*exp(-2+x)*exp(x)+(-1+2*x)*exp(-2+x)+5*x^2)/(exp(-2+x)^2+10*x*exp(-2+x)+25*x^2)/exp(x),x, a
lgorithm="giac")

[Out]

(5*(x - 2)*e^x - x + 10*e^x)/(5*(x - 2)*e^x + e^(2*x - 2) + 10*e^x)

Mupad [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.77 \[ \int \frac {e^{-x} \left (e^{-2+2 x} (5-5 x)+5 x^2+e^{-2+x} (-1+2 x)\right )}{e^{-4+2 x}+10 e^{-2+x} x+25 x^2} \, dx=\frac {x\,{\mathrm {e}}^{2-x}\,\left (5\,{\mathrm {e}}^x-1\right )}{{\mathrm {e}}^x+5\,x\,{\mathrm {e}}^2} \]

[In]

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

[Out]

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