\(\int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx\) [9540]

   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 = 79, antiderivative size = 24 \[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=x+\frac {\log (5)}{e^{-x+(3-x) x}-4 x} \]

[Out]

x+ln(5)/(exp(x*(-x+3)-x)-4*x)

Rubi [F]

\[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=\int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx \]

[In]

Int[(E^(4*x - 2*x^2) + 16*x^2 + 4*Log[5] + E^(2*x - x^2)*(-8*x + (-2 + 2*x)*Log[5]))/(E^(4*x - 2*x^2) - 8*E^(2
*x - x^2)*x + 16*x^2),x]

[Out]

x + E^(-2*x + x^2)*Log[5] + 4*Log[5]*Defer[Int][E^(2*x^2)/(E^(2*x) - 4*E^x^2*x)^2, x] - 8*Log[5]*Defer[Int][(E
^(2*x^2)*x)/(-E^(2*x) + 4*E^x^2*x)^2, x] + 8*Log[5]*Defer[Int][(E^(2*x^2)*x^2)/(-E^(2*x) + 4*E^x^2*x)^2, x] +
8*Log[5]*Defer[Int][(E^(2*x^2)*x)/(-E^(4*x) + 4*E^(x*(2 + x))*x), x] - 8*Log[5]*Defer[Int][(E^(2*x^2)*x^2)/(-E
^(4*x) + 4*E^(x*(2 + x))*x), x]

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

Mathematica [A] (verified)

Time = 1.30 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.62 \[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=\frac {e^{2 x} x+e^{x^2} \left (-4 x^2+\log (5)\right )}{e^{2 x}-4 e^{x^2} x} \]

[In]

Integrate[(E^(4*x - 2*x^2) + 16*x^2 + 4*Log[5] + E^(2*x - x^2)*(-8*x + (-2 + 2*x)*Log[5]))/(E^(4*x - 2*x^2) -
8*E^(2*x - x^2)*x + 16*x^2),x]

[Out]

(E^(2*x)*x + E^x^2*(-4*x^2 + Log[5]))/(E^(2*x) - 4*E^x^2*x)

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92

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

[In]

int((exp(-x^2+2*x)^2+((-2+2*x)*ln(5)-8*x)*exp(-x^2+2*x)+4*ln(5)+16*x^2)/(exp(-x^2+2*x)^2-8*x*exp(-x^2+2*x)+16*
x^2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.75 \[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=\frac {4 \, x^{2} - x e^{\left (-x^{2} + 2 \, x\right )} - \log \left (5\right )}{4 \, x - e^{\left (-x^{2} + 2 \, x\right )}} \]

[In]

integrate((exp(-x^2+2*x)^2+((-2+2*x)*log(5)-8*x)*exp(-x^2+2*x)+4*log(5)+16*x^2)/(exp(-x^2+2*x)^2-8*x*exp(-x^2+
2*x)+16*x^2),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=x + \frac {\log {\left (5 \right )}}{- 4 x + e^{- x^{2} + 2 x}} \]

[In]

integrate((exp(-x**2+2*x)**2+((-2+2*x)*ln(5)-8*x)*exp(-x**2+2*x)+4*ln(5)+16*x**2)/(exp(-x**2+2*x)**2-8*x*exp(-
x**2+2*x)+16*x**2),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.67 \[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=\frac {{\left (4 \, x^{2} - \log \left (5\right )\right )} e^{\left (x^{2}\right )} - x e^{\left (2 \, x\right )}}{4 \, x e^{\left (x^{2}\right )} - e^{\left (2 \, x\right )}} \]

[In]

integrate((exp(-x^2+2*x)^2+((-2+2*x)*log(5)-8*x)*exp(-x^2+2*x)+4*log(5)+16*x^2)/(exp(-x^2+2*x)^2-8*x*exp(-x^2+
2*x)+16*x^2),x, algorithm="maxima")

[Out]

((4*x^2 - log(5))*e^(x^2) - x*e^(2*x))/(4*x*e^(x^2) - e^(2*x))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.75 \[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=\frac {4 \, x^{2} - x e^{\left (-x^{2} + 2 \, x\right )} - \log \left (5\right )}{4 \, x - e^{\left (-x^{2} + 2 \, x\right )}} \]

[In]

integrate((exp(-x^2+2*x)^2+((-2+2*x)*log(5)-8*x)*exp(-x^2+2*x)+4*log(5)+16*x^2)/(exp(-x^2+2*x)^2-8*x*exp(-x^2+
2*x)+16*x^2),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {e^{4 x-2 x^2}+16 x^2+4 \log (5)+e^{2 x-x^2} (-8 x+(-2+2 x) \log (5))}{e^{4 x-2 x^2}-8 e^{2 x-x^2} x+16 x^2} \, dx=x-\frac {\ln \left (5\right )}{4\,x-{\mathrm {e}}^{2\,x-x^2}} \]

[In]

int((4*log(5) + exp(4*x - 2*x^2) - exp(2*x - x^2)*(8*x - log(5)*(2*x - 2)) + 16*x^2)/(exp(4*x - 2*x^2) - 8*x*e
xp(2*x - x^2) + 16*x^2),x)

[Out]

x - log(5)/(4*x - exp(2*x - x^2))