Optimal. Leaf size=17 \[ -2+x^2+\frac {(-3+3 x)^2}{\log ^2(x)} \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(54\) vs. \(2(17)=34\).
time = 0.17, 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 = {6820, 12,
2395, 2334, 2335, 2339, 30, 2343, 2346, 2209, 2357, 2367} \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 2209
Rule 2334
Rule 2335
Rule 2339
Rule 2343
Rule 2346
Rule 2357
Rule 2367
Rule 2395
Rule 6820
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 \text {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 \text {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 \text {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.08, size = 15, normalized size = 0.88 \begin {gather*} x^2+\frac {9 (-1+x)^2}{\log ^2(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 27, normalized size = 1.59
method | result | size |
risch | \(x^{2}+\frac {9 x^{2}-18 x +9}{\ln \left (x \right )^{2}}\) | \(19\) |
norman | \(\frac {9+x^{2} \ln \left (x \right )^{2}-18 x +9 x^{2}}{\ln \left (x \right )^{2}}\) | \(24\) |
default | \(x^{2}+\frac {9 x^{2}}{\ln \left (x \right )^{2}}-\frac {18 x}{\ln \left (x \right )^{2}}+\frac {9}{\ln \left (x \right )^{2}}\) | \(27\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.30, size = 42, normalized size = 2.47 \begin {gather*} x^{2} + \frac {9}{\log \left (x\right )^{2}} - 18 \, \Gamma \left (-1, -\log \left (x\right )\right ) + 36 \, \Gamma \left (-1, -2 \, \log \left (x\right )\right ) - 36 \, \Gamma \left (-2, -\log \left (x\right )\right ) + 72 \, \Gamma \left (-2, -2 \, \log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 23, normalized size = 1.35 \begin {gather*} \frac {x^{2} \log \left (x\right )^{2} + 9 \, x^{2} - 18 \, x + 9}{\log \left (x\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.03, size = 17, normalized size = 1.00 \begin {gather*} x^{2} + \frac {9 x^{2} - 18 x + 9}{\log {\left (x \right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 18, normalized size = 1.06 \begin {gather*} x^{2} + \frac {9 \, {\left (x^{2} - 2 \, x + 1\right )}}{\log \left (x\right )^{2}} \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 \left (x\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________