Optimal. Leaf size=24 \[ 2-(4-x) \left (-2+3^{-3+2 \log \left (x^2\right )}-x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 31, normalized size of antiderivative = 1.29, number of steps
used = 7, number of rules used = 5, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {14, 2306, 12,
15, 45} \begin {gather*} \frac {1}{27} x \left (x^2\right )^{\log (9)}-\frac {4}{27} \left (x^2\right )^{\log (9)}-(1-x)^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 15
Rule 45
Rule 2306
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-2 (-1+x)+\frac {3^{-3+2 \log \left (x^2\right )} (-16 \log (3)+x (1+\log (81)))}{x}\right ) \, dx\\ &=-(1-x)^2+\int \frac {3^{-3+2 \log \left (x^2\right )} (-16 \log (3)+x (1+\log (81)))}{x} \, dx\\ &=-(1-x)^2+\int \frac {\left (x^2\right )^{2 \log (3)} (-16 \log (3)+x (1+\log (81)))}{27 x} \, dx\\ &=-(1-x)^2+\frac {1}{27} \int \frac {\left (x^2\right )^{2 \log (3)} (-16 \log (3)+x (1+\log (81)))}{x} \, dx\\ &=-(1-x)^2+\frac {1}{27} \left (x^{-4 \log (3)} \left (x^2\right )^{2 \log (3)}\right ) \int x^{-1+4 \log (3)} (-16 \log (3)+x (1+\log (81))) \, dx\\ &=-(1-x)^2+\frac {1}{27} \left (x^{-4 \log (3)} \left (x^2\right )^{2 \log (3)}\right ) \int \left (-16 x^{-1+4 \log (3)} \log (3)+x^{\log (81)} (1+\log (81))\right ) \, dx\\ &=-(1-x)^2-\frac {4}{27} \left (x^2\right )^{\log (9)}+\frac {1}{27} x \left (x^2\right )^{\log (9)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 23, normalized size = 0.96 \begin {gather*} 3^{-3+2 \log \left (x^2\right )} (-4+x)+2 x-x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(98\) vs.
\(2(26)=52\).
time = 0.20, size = 99, normalized size = 4.12
method | result | size |
risch | \(-x^{2}+2 x +\frac {\left (x -4\right ) \left (x^{2}\right )^{2 \ln \left (3\right )}}{27}\) | \(23\) |
norman | \({\mathrm e}^{2 \ln \left (3\right ) \ln \left (x^{2}\right )-3 \ln \left (3\right )} x +2 x -x^{2}-4 \,{\mathrm e}^{2 \ln \left (3\right ) \ln \left (x^{2}\right )-3 \ln \left (3\right )}\) | \(42\) |
default | \(2 x +\frac {3^{2 \ln \left (x^{2}\right )-4 \ln \left (x \right )} x \,{\mathrm e}^{4 \ln \left (3\right ) \ln \left (x \right )}}{108 \ln \left (3\right )+27}-\frac {4 \,{\mathrm e}^{4 \ln \left (3\right ) \ln \left (x \right )} 3^{2 \ln \left (x^{2}\right )-4 \ln \left (x \right )}}{27}+\frac {4 \,3^{2 \ln \left (x^{2}\right )-4 \ln \left (x \right )} \ln \left (3\right ) x \,{\mathrm e}^{4 \ln \left (3\right ) \ln \left (x \right )}}{27 \left (4 \ln \left (3\right )+1\right )}-x^{2}\) | \(99\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs.
\(2 (21) = 42\).
time = 0.49, size = 58, normalized size = 2.42 \begin {gather*} -x^{2} + \frac {4 \, x e^{\left (4 \, \log \left (3\right ) \log \left (x\right )\right )} \log \left (3\right )}{27 \, {\left (4 \, \log \left (3\right ) + 1\right )}} + 2 \, x + \frac {x e^{\left (4 \, \log \left (3\right ) \log \left (x\right )\right )}}{27 \, {\left (4 \, \log \left (3\right ) + 1\right )}} - \frac {4}{27} \, e^{\left (2 \, \log \left (3\right ) \log \left (x^{2}\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 27, normalized size = 1.12 \begin {gather*} -x^{2} + {\left (x - 4\right )} e^{\left (2 \, \log \left (3\right ) \log \left (x^{2}\right ) - 3 \, \log \left (3\right )\right )} + 2 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.16, size = 36, normalized size = 1.50 \begin {gather*} - x^{2} + \frac {x e^{2 \log {\left (3 \right )} \log {\left (x^{2} \right )}}}{27} + 2 x - \frac {4 e^{2 \log {\left (3 \right )} \log {\left (x^{2} \right )}}}{27} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 32, normalized size = 1.33 \begin {gather*} -x^{2} + \frac {1}{27} \, x e^{\left (2 \, \log \left (3\right ) \log \left (x^{2}\right )\right )} + 2 \, x - \frac {4}{27} \, e^{\left (2 \, \log \left (3\right ) \log \left (x^{2}\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.09, size = 30, normalized size = 1.25 \begin {gather*} 2\,x-\frac {4\,{\left (x^2\right )}^{2\,\ln \left (3\right )}}{27}-x^2+\frac {x\,{\left (x^2\right )}^{2\,\ln \left (3\right )}}{27} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________