Optimal. Leaf size=25 \[ e^{-\frac {6}{x}+x}+\left (\frac {1}{-3+x}-x \log (2 x)\right )^2 \]
________________________________________________________________________________________
Rubi [A] time = 0.45, antiderivative size = 41, normalized size of antiderivative = 1.64, number of steps used = 12, number of rules used = 8, integrand size = 132, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {6688, 6706, 683, 2357, 2314, 31, 2304, 2305} \begin {gather*} x^2 \log ^2(2 x)+e^{x-\frac {6}{x}}+\frac {1}{(3-x)^2}+\frac {2 x \log (2 x)}{3-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 683
Rule 2304
Rule 2305
Rule 2314
Rule 2357
Rule 6688
Rule 6706
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (e^{-\frac {6}{x}+x} \left (1+\frac {6}{x^2}\right )-\frac {2 \left (10-6 x+x^2\right )}{(-3+x)^3}+\frac {2 \left (3+9 x-6 x^2+x^3\right ) \log (2 x)}{(-3+x)^2}+2 x \log ^2(2 x)\right ) \, dx\\ &=-\left (2 \int \frac {10-6 x+x^2}{(-3+x)^3} \, dx\right )+2 \int \frac {\left (3+9 x-6 x^2+x^3\right ) \log (2 x)}{(-3+x)^2} \, dx+2 \int x \log ^2(2 x) \, dx+\int e^{-\frac {6}{x}+x} \left (1+\frac {6}{x^2}\right ) \, dx\\ &=e^{-\frac {6}{x}+x}+x^2 \log ^2(2 x)-2 \int \left (\frac {1}{(-3+x)^3}+\frac {1}{-3+x}\right ) \, dx-2 \int x \log (2 x) \, dx+2 \int \left (\frac {3 \log (2 x)}{(-3+x)^2}+x \log (2 x)\right ) \, dx\\ &=e^{-\frac {6}{x}+x}+\frac {1}{(3-x)^2}+\frac {x^2}{2}-2 \log (3-x)-x^2 \log (2 x)+x^2 \log ^2(2 x)+2 \int x \log (2 x) \, dx+6 \int \frac {\log (2 x)}{(-3+x)^2} \, dx\\ &=e^{-\frac {6}{x}+x}+\frac {1}{(3-x)^2}-2 \log (3-x)+\frac {2 x \log (2 x)}{3-x}+x^2 \log ^2(2 x)+2 \int \frac {1}{-3+x} \, dx\\ &=e^{-\frac {6}{x}+x}+\frac {1}{(3-x)^2}+\frac {2 x \log (2 x)}{3-x}+x^2 \log ^2(2 x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.17, size = 56, normalized size = 2.24 \begin {gather*} e^{-\frac {6}{x}+x}+\frac {1}{(-3+x)^2}+2 \log (3-x)-2 \log (-3+x)-2 \log (x)+\frac {6 \log (2 x)}{3-x}+x^2 \log ^2(2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.56, size = 66, normalized size = 2.64 \begin {gather*} \frac {{\left (x^{4} - 6 \, x^{3} + 9 \, x^{2}\right )} \log \left (2 \, x\right )^{2} + {\left (x^{2} - 6 \, x + 9\right )} e^{\left (\frac {x^{2} - 6}{x}\right )} - 2 \, {\left (x^{2} - 3 \, x\right )} \log \left (2 \, x\right ) + 1}{x^{2} - 6 \, x + 9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.21, size = 113, normalized size = 4.52 \begin {gather*} \frac {x^{4} \log \left (2 \, x\right )^{2} - 6 \, x^{3} \log \left (2 \, x\right )^{2} + 9 \, x^{2} \log \left (2 \, x\right )^{2} + x^{2} e^{\left (\frac {x^{2} - 6}{x}\right )} - 2 \, x^{2} \log \relax (x) - 6 \, x e^{\left (\frac {x^{2} - 6}{x}\right )} - 6 \, x \log \left (2 \, x\right ) + 12 \, x \log \relax (x) + 9 \, e^{\left (\frac {x^{2} - 6}{x}\right )} + 18 \, \log \left (2 \, x\right ) - 18 \, \log \relax (x) + 1}{x^{2} - 6 \, x + 9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.12, size = 55, normalized size = 2.20
method | result | size |
default | \({\mathrm e}^{\frac {x^{2}-6}{x}}+x^{2} \ln \left (2 x \right )^{2}+\frac {1}{\left (x -3\right )^{2}}-2 \ln \left (x -3\right )+2 \ln \left (2 x -6\right )-\frac {4 \ln \left (2 x \right ) x}{2 x -6}\) | \(55\) |
risch | \(x^{2} \ln \left (2 x \right )^{2}-\frac {6 \ln \left (2 x \right )}{x -3}-\frac {2 x^{2} \ln \relax (x )-{\mathrm e}^{\frac {x^{2}-6}{x}} x^{2}-12 x \ln \relax (x )+6 \,{\mathrm e}^{\frac {x^{2}-6}{x}} x +18 \ln \relax (x )-9 \,{\mathrm e}^{\frac {x^{2}-6}{x}}-1}{\left (x -3\right )^{2}}\) | \(88\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.56, size = 122, normalized size = 4.88 \begin {gather*} \frac {3 \, {\left (4 \, x - 9\right )}}{x^{2} - 6 \, x + 9} - \frac {6 \, {\left (2 \, x - 3\right )}}{x^{2} - 6 \, x + 9} + \frac {x^{3} \log \relax (2)^{2} - 3 \, x^{2} \log \relax (2)^{2} + {\left (x^{3} - 3 \, x^{2}\right )} \log \relax (x)^{2} + {\left (x - 3\right )} e^{\left (x - \frac {6}{x}\right )} + 2 \, {\left (x^{3} \log \relax (2) - 3 \, x^{2} \log \relax (2) - x\right )} \log \relax (x) - 6 \, \log \relax (2)}{x - 3} + \frac {10}{x^{2} - 6 \, x + 9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.49, size = 44, normalized size = 1.76 \begin {gather*} {\mathrm {e}}^{x-\frac {6}{x}}-2\,\ln \relax (x)+\frac {1}{x^2-6\,x+9}-\frac {6\,\ln \left (2\,x\right )}{x-3}+x^2\,{\ln \left (2\,x\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.59, size = 42, normalized size = 1.68 \begin {gather*} x^{2} \log {\left (2 x \right )}^{2} + e^{\frac {x^{2} - 6}{x}} - 2 \log {\relax (x )} + \frac {1}{x^{2} - 6 x + 9} - \frac {6 \log {\left (2 x \right )}}{x - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________