\(\int \frac {-3 e^x x+e^{2 x} x^2+(12+4 e^x x^2) \log (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2})+(3 x-e^x x^2) \log ^2(\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2})}{-3 e^x x+e^{2 x} x^2} \, dx\) [715]

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

Optimal result

Integrand size = 115, antiderivative size = 28 \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx=x+e^{-x} \log ^2\left (\frac {\left (e^x-\frac {3}{x}\right )^2}{e^{8/5}}\right ) \] Output:

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

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.82 \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx=\frac {1}{25} e^{-x} \left (64+25 e^x x-80 \log \left (\frac {\left (-3+e^x x\right )^2}{x^2}\right )+25 \log ^2\left (\frac {\left (-3+e^x x\right )^2}{x^2}\right )\right ) \] Input:

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

Output:

(64 + 25*E^x*x - 80*Log[(-3 + E^x*x)^2/x^2] + 25*Log[(-3 + E^x*x)^2/x^2]^2 
)/(25*E^x)
 

Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {e^{2 x} x^2+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {e^{2 x} x^2-6 e^x x+9}{e^{8/5} x^2}\right )+\left (4 e^x x^2+12\right ) \log \left (\frac {e^{2 x} x^2-6 e^x x+9}{e^{8/5} x^2}\right )-3 e^x x}{e^{2 x} x^2-3 e^x x} \, dx\)

\(\Big \downarrow \) 7292

\(\displaystyle \int \frac {e^{-x} \left (-e^{2 x} x^2-\left (3 x-e^x x^2\right ) \log ^2\left (\frac {e^{2 x} x^2-6 e^x x+9}{e^{8/5} x^2}\right )-\left (4 e^x x^2+12\right ) \log \left (\frac {e^{2 x} x^2-6 e^x x+9}{e^{8/5} x^2}\right )+3 e^x x\right )}{x \left (3-e^x x\right )}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (-\frac {1}{25} e^{-x} \left (5 \log \left (\frac {\left (e^x x-3\right )^2}{x^2}\right )-28\right ) \left (5 \log \left (\frac {\left (e^x x-3\right )^2}{x^2}\right )-8\right )+\frac {12 e^{-x} (x+1) \left (5 \log \left (\frac {\left (e^x x-3\right )^2}{x^2}\right )-8\right )}{5 x \left (e^x x-3\right )}+1\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\int e^{-x} \log ^2\left (\frac {\left (e^x x-3\right )^2}{x^2}\right )dx+12 \log \left (\frac {\left (3-e^x x\right )^2}{x^2}\right ) \int \frac {e^{-x}}{e^x x-3}dx+12 \log \left (\frac {\left (3-e^x x\right )^2}{x^2}\right ) \int \frac {e^{-x}}{x \left (e^x x-3\right )}dx+\frac {72}{5} \int \frac {1}{e^x x-3}dx-\frac {96}{5} \int \frac {e^{-x}}{e^x x-3}dx-\frac {96}{5} \int \frac {e^{-x}}{x \left (e^x x-3\right )}dx+\frac {72}{5} \int \frac {x}{e^x x-3}dx-24 \int \int \frac {e^{-x}}{e^x x-3}dxdx-72 \int \frac {\int \frac {e^{-x}}{e^x x-3}dx}{e^x x-3}dx-72 \int \frac {\int \frac {e^{-x}}{e^x x-3}dx}{x \left (e^x x-3\right )}dx-24 \int \int \frac {e^{-x}}{x \left (e^x x-3\right )}dxdx-72 \int \frac {\int \frac {e^{-x}}{x \left (e^x x-3\right )}dx}{e^x x-3}dx-72 \int \frac {\int \frac {e^{-x}}{x \left (e^x x-3\right )}dx}{x \left (e^x x-3\right )}dx-\frac {72 \operatorname {ExpIntegralEi}(-x)}{5}-\frac {36}{5} e^{-x} \log \left (\frac {\left (3-e^x x\right )^2}{x^2}\right )+x+\frac {224 e^{-x}}{25}\)

Input:

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

Output:

$Aborted
 
Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.46

method result size
parallelrisch \(-\frac {\left (-6 \,{\mathrm e}^{x} x -6 {\ln \left (\frac {\left ({\mathrm e}^{2 x} x^{2}-6 \,{\mathrm e}^{x} x +9\right ) {\mathrm e}^{-\frac {8}{5}}}{x^{2}}\right )}^{2}\right ) {\mathrm e}^{-x}}{6}\) \(41\)
risch \(\text {Expression too large to display}\) \(2783\)

Input:

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

Output:

-1/6*(-6*exp(x)*x-6*ln((exp(x)^2*x^2-6*exp(x)*x+9)/x^2/exp(4/5)^2)^2)/exp( 
x)
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.21 \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx={\left (x e^{x} + \log \left (\frac {{\left (x^{2} e^{\left (2 \, x\right )} - 6 \, x e^{x} + 9\right )} e^{\left (-\frac {8}{5}\right )}}{x^{2}}\right )^{2}\right )} e^{\left (-x\right )} \] Input:

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

Output:

(x*e^x + log((x^2*e^(2*x) - 6*x*e^x + 9)*e^(-8/5)/x^2)^2)*e^(-x)
 

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.14 \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx=x + e^{- x} \log {\left (\frac {x^{2} e^{2 x} - 6 x e^{x} + 9}{x^{2} e^{\frac {8}{5}}} \right )}^{2} \] Input:

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

Output:

x + exp(-x)*log((x**2*exp(2*x) - 6*x*exp(x) + 9)*exp(-8/5)/x**2)**2
 

Maxima [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.75 \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx=\frac {1}{25} \, {\left (25 \, x e^{x} - 40 \, {\left (5 \, \log \left (x\right ) + 4\right )} \log \left (x e^{x} - 3\right ) + 100 \, \log \left (x e^{x} - 3\right )^{2} + 100 \, \log \left (x\right )^{2} + 160 \, \log \left (x\right ) + 64\right )} e^{\left (-x\right )} \] Input:

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

Output:

1/25*(25*x*e^x - 40*(5*log(x) + 4)*log(x*e^x - 3) + 100*log(x*e^x - 3)^2 + 
 100*log(x)^2 + 160*log(x) + 64)*e^(-x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 59 vs. \(2 (25) = 50\).

Time = 1.50 (sec) , antiderivative size = 59, normalized size of antiderivative = 2.11 \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx=\frac {1}{25} \, {\left (25 \, x e^{x} + 25 \, \log \left (\frac {x^{2} e^{\left (2 \, x\right )} - 6 \, x e^{x} + 9}{x^{2}}\right )^{2} - 80 \, \log \left (\frac {x^{2} e^{\left (2 \, x\right )} - 6 \, x e^{x} + 9}{x^{2}}\right ) + 64\right )} e^{\left (-x\right )} \] Input:

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

Output:

1/25*(25*x*e^x + 25*log((x^2*e^(2*x) - 6*x*e^x + 9)/x^2)^2 - 80*log((x^2*e 
^(2*x) - 6*x*e^x + 9)/x^2) + 64)*e^(-x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx=\int \frac {\ln \left (\frac {{\mathrm {e}}^{-\frac {8}{5}}\,\left (x^2\,{\mathrm {e}}^{2\,x}-6\,x\,{\mathrm {e}}^x+9\right )}{x^2}\right )\,\left (4\,x^2\,{\mathrm {e}}^x+12\right )+x^2\,{\mathrm {e}}^{2\,x}+{\ln \left (\frac {{\mathrm {e}}^{-\frac {8}{5}}\,\left (x^2\,{\mathrm {e}}^{2\,x}-6\,x\,{\mathrm {e}}^x+9\right )}{x^2}\right )}^2\,\left (3\,x-x^2\,{\mathrm {e}}^x\right )-3\,x\,{\mathrm {e}}^x}{x^2\,{\mathrm {e}}^{2\,x}-3\,x\,{\mathrm {e}}^x} \,d x \] Input:

int((log((exp(-8/5)*(x^2*exp(2*x) - 6*x*exp(x) + 9))/x^2)*(4*x^2*exp(x) + 
12) + x^2*exp(2*x) + log((exp(-8/5)*(x^2*exp(2*x) - 6*x*exp(x) + 9))/x^2)^ 
2*(3*x - x^2*exp(x)) - 3*x*exp(x))/(x^2*exp(2*x) - 3*x*exp(x)),x)
 

Output:

int((log((exp(-8/5)*(x^2*exp(2*x) - 6*x*exp(x) + 9))/x^2)*(4*x^2*exp(x) + 
12) + x^2*exp(2*x) + log((exp(-8/5)*(x^2*exp(2*x) - 6*x*exp(x) + 9))/x^2)^ 
2*(3*x - x^2*exp(x)) - 3*x*exp(x))/(x^2*exp(2*x) - 3*x*exp(x)), x)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.39 \[ \int \frac {-3 e^x x+e^{2 x} x^2+\left (12+4 e^x x^2\right ) \log \left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )+\left (3 x-e^x x^2\right ) \log ^2\left (\frac {9-6 e^x x+e^{2 x} x^2}{e^{8/5} x^2}\right )}{-3 e^x x+e^{2 x} x^2} \, dx=\frac {e^{x} x +\mathrm {log}\left (\frac {e^{2 x} x^{2}-6 e^{x} x +9}{e^{\frac {8}{5}} x^{2}}\right )^{2}}{e^{x}} \] Input:

int(((-exp(x)*x^2+3*x)*log((exp(x)^2*x^2-6*exp(x)*x+9)/x^2/exp(4/5)^2)^2+( 
4*exp(x)*x^2+12)*log((exp(x)^2*x^2-6*exp(x)*x+9)/x^2/exp(4/5)^2)+exp(x)^2* 
x^2-3*exp(x)*x)/(exp(x)^2*x^2-3*exp(x)*x),x)
 

Output:

(e**x*x + log((e**(2*x)*x**2 - 6*e**x*x + 9)/(e**(3/5)*e*x**2))**2)/e**x