\(\int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} (-3 x^2+x^2 \log (2)+e^x (-1+x+3 x^2-x^2 \log (2)))}{x^2} \, dx\) [10284]

   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 = 70, antiderivative size = 19 \[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=e^{\left (-e^x+x\right ) \left (-3-\frac {1}{x}+\log (2)\right )} \]

[Out]

exp((x-exp(x))*(ln(2)-1/x-3))

Rubi [F]

\[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=\int \frac {\exp \left (\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}\right ) \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx \]

[In]

Int[(E^((-x - 3*x^2 + x^2*Log[2] + E^x*(1 + 3*x - x*Log[2]))/x)*(-3*x^2 + x^2*Log[2] + E^x*(-1 + x + 3*x^2 - x
^2*Log[2])))/x^2,x]

[Out]

(3 - Log[2])*Defer[Int][E^(x + ((-E^x + x)*(-1 - x*(3 - Log[2])))/x), x] - (3 - Log[2])*Defer[Int][E^(((-E^x +
 x)*(-1 - x*(3 - Log[2])))/x), x] - Defer[Int][E^(x + ((-E^x + x)*(-1 - x*(3 - Log[2])))/x)/x^2, x] + Defer[In
t][E^(x + ((-E^x + x)*(-1 - x*(3 - Log[2])))/x)/x, x]

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

Mathematica [A] (verified)

Time = 3.44 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.26 \[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=2^x e^{-1-3 x+e^x \left (3+\frac {1}{x}-\log (2)\right )} \]

[In]

Integrate[(E^((-x - 3*x^2 + x^2*Log[2] + E^x*(1 + 3*x - x*Log[2]))/x)*(-3*x^2 + x^2*Log[2] + E^x*(-1 + x + 3*x
^2 - x^2*Log[2])))/x^2,x]

[Out]

2^x*E^(-1 - 3*x + E^x*(3 + x^(-1) - Log[2]))

Maple [A] (verified)

Time = 0.33 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.16

method result size
risch \({\mathrm e}^{-\frac {\left ({\mathrm e}^{x}-x \right ) \left (x \ln \left (2\right )-3 x -1\right )}{x}}\) \(22\)
norman \({\mathrm e}^{\frac {\left (-x \ln \left (2\right )+3 x +1\right ) {\mathrm e}^{x}+x^{2} \ln \left (2\right )-3 x^{2}-x}{x}}\) \(34\)
parallelrisch \({\mathrm e}^{\frac {\left (-x \ln \left (2\right )+3 x +1\right ) {\mathrm e}^{x}+x^{2} \ln \left (2\right )-3 x^{2}-x}{x}}\) \(34\)

[In]

int(((-x^2*ln(2)+3*x^2+x-1)*exp(x)+x^2*ln(2)-3*x^2)*exp(((-x*ln(2)+3*x+1)*exp(x)+x^2*ln(2)-3*x^2-x)/x)/x^2,x,m
ethod=_RETURNVERBOSE)

[Out]

exp(-(exp(x)-x)*(x*ln(2)-3*x-1)/x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.74 \[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=e^{\left (\frac {x^{2} \log \left (2\right ) - 3 \, x^{2} - {\left (x \log \left (2\right ) - 3 \, x - 1\right )} e^{x} - x}{x}\right )} \]

[In]

integrate(((-x^2*log(2)+3*x^2+x-1)*exp(x)+x^2*log(2)-3*x^2)*exp(((-x*log(2)+3*x+1)*exp(x)+x^2*log(2)-3*x^2-x)/
x)/x^2,x, algorithm="fricas")

[Out]

e^((x^2*log(2) - 3*x^2 - (x*log(2) - 3*x - 1)*e^x - x)/x)

Sympy [B] (verification not implemented)

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

Time = 0.21 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.53 \[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=e^{\frac {- 3 x^{2} + x^{2} \log {\left (2 \right )} - x + \left (- x \log {\left (2 \right )} + 3 x + 1\right ) e^{x}}{x}} \]

[In]

integrate(((-x**2*ln(2)+3*x**2+x-1)*exp(x)+x**2*ln(2)-3*x**2)*exp(((-x*ln(2)+3*x+1)*exp(x)+x**2*ln(2)-3*x**2-x
)/x)/x**2,x)

[Out]

exp((-3*x**2 + x**2*log(2) - x + (-x*log(2) + 3*x + 1)*exp(x))/x)

Maxima [A] (verification not implemented)

none

Time = 0.38 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.37 \[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=e^{\left (x \log \left (2\right ) - e^{x} \log \left (2\right ) - 3 \, x + \frac {e^{x}}{x} + 3 \, e^{x} - 1\right )} \]

[In]

integrate(((-x^2*log(2)+3*x^2+x-1)*exp(x)+x^2*log(2)-3*x^2)*exp(((-x*log(2)+3*x+1)*exp(x)+x^2*log(2)-3*x^2-x)/
x)/x^2,x, algorithm="maxima")

[Out]

e^(x*log(2) - e^x*log(2) - 3*x + e^x/x + 3*e^x - 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.37 \[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=e^{\left (x \log \left (2\right ) - e^{x} \log \left (2\right ) - 3 \, x + \frac {e^{x}}{x} + 3 \, e^{x} - 1\right )} \]

[In]

integrate(((-x^2*log(2)+3*x^2+x-1)*exp(x)+x^2*log(2)-3*x^2)*exp(((-x*log(2)+3*x+1)*exp(x)+x^2*log(2)-3*x^2-x)/
x)/x^2,x, algorithm="giac")

[Out]

e^(x*log(2) - e^x*log(2) - 3*x + e^x/x + 3*e^x - 1)

Mupad [B] (verification not implemented)

Time = 15.83 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.42 \[ \int \frac {e^{\frac {-x-3 x^2+x^2 \log (2)+e^x (1+3 x-x \log (2))}{x}} \left (-3 x^2+x^2 \log (2)+e^x \left (-1+x+3 x^2-x^2 \log (2)\right )\right )}{x^2} \, dx=2^{x-{\mathrm {e}}^x}\,{\mathrm {e}}^{-3\,x}\,{\mathrm {e}}^{-1}\,{\mathrm {e}}^{\frac {{\mathrm {e}}^x}{x}}\,{\mathrm {e}}^{3\,{\mathrm {e}}^x} \]

[In]

int((exp(-(x - x^2*log(2) - exp(x)*(3*x - x*log(2) + 1) + 3*x^2)/x)*(x^2*log(2) - 3*x^2 + exp(x)*(x - x^2*log(
2) + 3*x^2 - 1)))/x^2,x)

[Out]

2^(x - exp(x))*exp(-3*x)*exp(-1)*exp(exp(x)/x)*exp(3*exp(x))