Optimal. Leaf size=17 \[ -2+x^2+\frac {(-3+3 x)^2}{\log ^2(x)} \]
________________________________________________________________________________________
Rubi [B] time = 0.26, antiderivative size = 54, normalized size of antiderivative = 3.18, number of steps used = 21, number of rules used = 12, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {6688, 12, 2353, 2297, 2298, 2302, 30, 2306, 2309, 2178, 2320, 2330} \begin {gather*} x^2+\frac {9 x^2}{\log ^2(x)}+\frac {18 x^2}{\log (x)}-\frac {18 x}{\log ^2(x)}+\frac {9}{\log ^2(x)}+\frac {18 (1-x) x}{\log (x)}-\frac {18 x}{\log (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 30
Rule 2178
Rule 2297
Rule 2298
Rule 2302
Rule 2306
Rule 2309
Rule 2320
Rule 2330
Rule 2353
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int 2 \left (x-\frac {9 (-1+x)^2}{x \log ^3(x)}+\frac {9 (-1+x)}{\log ^2(x)}\right ) \, dx\\ &=2 \int \left (x-\frac {9 (-1+x)^2}{x \log ^3(x)}+\frac {9 (-1+x)}{\log ^2(x)}\right ) \, dx\\ &=x^2-18 \int \frac {(-1+x)^2}{x \log ^3(x)} \, dx+18 \int \frac {-1+x}{\log ^2(x)} \, dx\\ &=x^2+\frac {18 (1-x) x}{\log (x)}-18 \int \left (-\frac {2}{\log ^3(x)}+\frac {1}{x \log ^3(x)}+\frac {x}{\log ^3(x)}\right ) \, dx+18 \int \frac {1}{\log (x)} \, dx+36 \int \frac {-1+x}{\log (x)} \, dx\\ &=x^2+\frac {18 (1-x) x}{\log (x)}+18 \text {li}(x)-18 \int \frac {1}{x \log ^3(x)} \, dx-18 \int \frac {x}{\log ^3(x)} \, dx+36 \int \left (-\frac {1}{\log (x)}+\frac {x}{\log (x)}\right ) \, dx+36 \int \frac {1}{\log ^3(x)} \, dx\\ &=x^2-\frac {18 x}{\log ^2(x)}+\frac {9 x^2}{\log ^2(x)}+\frac {18 (1-x) x}{\log (x)}+18 \text {li}(x)+18 \int \frac {1}{\log ^2(x)} \, dx-18 \int \frac {x}{\log ^2(x)} \, dx-18 \operatorname {Subst}\left (\int \frac {1}{x^3} \, dx,x,\log (x)\right )-36 \int \frac {1}{\log (x)} \, dx+36 \int \frac {x}{\log (x)} \, dx\\ &=x^2+\frac {9}{\log ^2(x)}-\frac {18 x}{\log ^2(x)}+\frac {9 x^2}{\log ^2(x)}-\frac {18 x}{\log (x)}+\frac {18 (1-x) x}{\log (x)}+\frac {18 x^2}{\log (x)}-18 \text {li}(x)+18 \int \frac {1}{\log (x)} \, dx-36 \int \frac {x}{\log (x)} \, dx+36 \operatorname {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,\log (x)\right )\\ &=x^2+36 \text {Ei}(2 \log (x))+\frac {9}{\log ^2(x)}-\frac {18 x}{\log ^2(x)}+\frac {9 x^2}{\log ^2(x)}-\frac {18 x}{\log (x)}+\frac {18 (1-x) x}{\log (x)}+\frac {18 x^2}{\log (x)}-36 \operatorname {Subst}\left (\int \frac {e^{2 x}}{x} \, dx,x,\log (x)\right )\\ &=x^2+\frac {9}{\log ^2(x)}-\frac {18 x}{\log ^2(x)}+\frac {9 x^2}{\log ^2(x)}-\frac {18 x}{\log (x)}+\frac {18 (1-x) x}{\log (x)}+\frac {18 x^2}{\log (x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 26, normalized size = 1.53 \begin {gather*} x^2+\frac {9}{\log ^2(x)}-\frac {18 x}{\log ^2(x)}+\frac {9 x^2}{\log ^2(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 23, normalized size = 1.35 \begin {gather*} \frac {x^{2} \log \relax (x)^{2} + 9 \, x^{2} - 18 \, x + 9}{\log \relax (x)^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 18, normalized size = 1.06 \begin {gather*} x^{2} + \frac {9 \, {\left (x^{2} - 2 \, x + 1\right )}}{\log \relax (x)^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 19, normalized size = 1.12
method | result | size |
risch | \(x^{2}+\frac {9 x^{2}-18 x +9}{\ln \relax (x )^{2}}\) | \(19\) |
norman | \(\frac {9+x^{2} \ln \relax (x )^{2}-18 x +9 x^{2}}{\ln \relax (x )^{2}}\) | \(24\) |
default | \(x^{2}+\frac {9 x^{2}}{\ln \relax (x )^{2}}-\frac {18 x}{\ln \relax (x )^{2}}+\frac {9}{\ln \relax (x )^{2}}\) | \(27\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.45, size = 42, normalized size = 2.47 \begin {gather*} x^{2} + \frac {9}{\log \relax (x)^{2}} - 18 \, \Gamma \left (-1, -\log \relax (x)\right ) + 36 \, \Gamma \left (-1, -2 \, \log \relax (x)\right ) - 36 \, \Gamma \left (-2, -\log \relax (x)\right ) + 72 \, \Gamma \left (-2, -2 \, \log \relax (x)\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.94, size = 15, normalized size = 0.88 \begin {gather*} x^2+\frac {9\,{\left (x-1\right )}^2}{{\ln \relax (x)}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.09, size = 17, normalized size = 1.00 \begin {gather*} x^{2} + \frac {9 x^{2} - 18 x + 9}{\log {\relax (x )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________