Optimal. Leaf size=26 \[ \frac {\left (2+\frac {e^{(-3+x)^2+x}}{x}-x\right ) \log ^2(x)}{x} \]
________________________________________________________________________________________
Rubi [B] time = 0.27, antiderivative size = 69, normalized size of antiderivative = 2.65, number of steps used = 11, number of rules used = 8, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {14, 43, 2304, 6742, 2334, 2301, 2305, 2288} \begin {gather*} \frac {e^{x^2-5 x+9} \left (5 x \log (x)-2 x^2 \log (x)\right ) \log (x)}{(5-2 x) x^3}+\frac {2 \log ^2(x)}{x}+\log ^2(x)-2 \left (\frac {2}{x}+\log (x)\right ) \log (x)+\frac {4 \log (x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 43
Rule 2288
Rule 2301
Rule 2304
Rule 2305
Rule 2334
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {2 \log (x) (-2+x+\log (x))}{x^2}+\frac {e^{9-5 x+x^2} \log (x) \left (2-2 \log (x)-5 x \log (x)+2 x^2 \log (x)\right )}{x^3}\right ) \, dx\\ &=-\left (2 \int \frac {\log (x) (-2+x+\log (x))}{x^2} \, dx\right )+\int \frac {e^{9-5 x+x^2} \log (x) \left (2-2 \log (x)-5 x \log (x)+2 x^2 \log (x)\right )}{x^3} \, dx\\ &=\frac {e^{9-5 x+x^2} \log (x) \left (5 x \log (x)-2 x^2 \log (x)\right )}{(5-2 x) x^3}-2 \int \left (\frac {(-2+x) \log (x)}{x^2}+\frac {\log ^2(x)}{x^2}\right ) \, dx\\ &=\frac {e^{9-5 x+x^2} \log (x) \left (5 x \log (x)-2 x^2 \log (x)\right )}{(5-2 x) x^3}-2 \int \frac {(-2+x) \log (x)}{x^2} \, dx-2 \int \frac {\log ^2(x)}{x^2} \, dx\\ &=\frac {2 \log ^2(x)}{x}-2 \log (x) \left (\frac {2}{x}+\log (x)\right )+\frac {e^{9-5 x+x^2} \log (x) \left (5 x \log (x)-2 x^2 \log (x)\right )}{(5-2 x) x^3}+2 \int \frac {2+x \log (x)}{x^2} \, dx-4 \int \frac {\log (x)}{x^2} \, dx\\ &=\frac {4}{x}+\frac {4 \log (x)}{x}+\frac {2 \log ^2(x)}{x}-2 \log (x) \left (\frac {2}{x}+\log (x)\right )+\frac {e^{9-5 x+x^2} \log (x) \left (5 x \log (x)-2 x^2 \log (x)\right )}{(5-2 x) x^3}+2 \int \left (\frac {2}{x^2}+\frac {\log (x)}{x}\right ) \, dx\\ &=\frac {4 \log (x)}{x}+\frac {2 \log ^2(x)}{x}-2 \log (x) \left (\frac {2}{x}+\log (x)\right )+\frac {e^{9-5 x+x^2} \log (x) \left (5 x \log (x)-2 x^2 \log (x)\right )}{(5-2 x) x^3}+2 \int \frac {\log (x)}{x} \, dx\\ &=\frac {4 \log (x)}{x}+\log ^2(x)+\frac {2 \log ^2(x)}{x}-2 \log (x) \left (\frac {2}{x}+\log (x)\right )+\frac {e^{9-5 x+x^2} \log (x) \left (5 x \log (x)-2 x^2 \log (x)\right )}{(5-2 x) x^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.32, size = 32, normalized size = 1.23 \begin {gather*} \frac {e^{-5 x} \left (e^{9+x^2}-e^{5 x} (-2+x) x\right ) \log ^2(x)}{x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 27, normalized size = 1.04 \begin {gather*} -\frac {{\left (x^{2} - 2 \, x - e^{\left (x^{2} - 5 \, x + 9\right )}\right )} \log \relax (x)^{2}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.42, size = 36, normalized size = 1.38 \begin {gather*} -\frac {x^{2} \log \relax (x)^{2} - 2 \, x \log \relax (x)^{2} - e^{\left (x^{2} - 5 \, x + 9\right )} \log \relax (x)^{2}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 28, normalized size = 1.08
method | result | size |
risch | \(-\frac {\left (x^{2}-2 x -{\mathrm e}^{x^{2}-5 x +9}\right ) \ln \relax (x )^{2}}{x^{2}}\) | \(28\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.62, size = 60, normalized size = 2.31 \begin {gather*} -\log \relax (x)^{2} + \frac {{\left (e^{\left (x^{2} + 9\right )} \log \relax (x)^{2} + 2 \, {\left (x \log \relax (x)^{2} + 2 \, x \log \relax (x) + 2 \, x\right )} e^{\left (5 \, x\right )}\right )} e^{\left (-5 \, x\right )}}{x^{2}} - \frac {4 \, \log \relax (x)}{x} - \frac {4}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.69, size = 26, normalized size = 1.00 \begin {gather*} \frac {{\ln \relax (x)}^2\,\left (2\,x+{\mathrm {e}}^{x^2-5\,x+9}-x^2\right )}{x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.33, size = 27, normalized size = 1.04 \begin {gather*} \frac {\left (2 - x\right ) \log {\relax (x )}^{2}}{x} + \frac {e^{x^{2} - 5 x + 9} \log {\relax (x )}^{2}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________