Optimal. Leaf size=24 \[ 3-x+\log (-4+x)-(4+x) \left (2-(x+\log (x))^2\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.23, antiderivative size = 42, normalized size of antiderivative = 1.75, number of steps used = 12, number of rules used = 8, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {1593, 6688, 1850, 2357, 2295, 2301, 2304, 2296} \begin {gather*} x^3+4 x^2+2 x^2 \log (x)-3 x+x \log ^2(x)+4 \log ^2(x)+8 x \log (x)+\log (4-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1850
Rule 2295
Rule 2296
Rule 2301
Rule 2304
Rule 2357
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-19 x-35 x^2-2 x^3+3 x^4+\left (-32-32 x-6 x^2+4 x^3\right ) \log (x)+\left (-4 x+x^2\right ) \log ^2(x)}{(-4+x) x} \, dx\\ &=\int \left (\frac {19+35 x+2 x^2-3 x^3}{4-x}+\left (10+\frac {8}{x}+4 x\right ) \log (x)+\log ^2(x)\right ) \, dx\\ &=\int \frac {19+35 x+2 x^2-3 x^3}{4-x} \, dx+\int \left (10+\frac {8}{x}+4 x\right ) \log (x) \, dx+\int \log ^2(x) \, dx\\ &=x \log ^2(x)-2 \int \log (x) \, dx+\int \left (5+\frac {1}{-4+x}+10 x+3 x^2\right ) \, dx+\int \left (10 \log (x)+\frac {8 \log (x)}{x}+4 x \log (x)\right ) \, dx\\ &=7 x+5 x^2+x^3+\log (4-x)-2 x \log (x)+x \log ^2(x)+4 \int x \log (x) \, dx+8 \int \frac {\log (x)}{x} \, dx+10 \int \log (x) \, dx\\ &=-3 x+4 x^2+x^3+\log (4-x)+8 x \log (x)+2 x^2 \log (x)+4 \log ^2(x)+x \log ^2(x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 35, normalized size = 1.46 \begin {gather*} -164-3 x+4 x^2+x^3+\log (4-x)+2 x (4+x) \log (x)+(4+x) \log ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 35, normalized size = 1.46 \begin {gather*} x^{3} + {\left (x + 4\right )} \log \relax (x)^{2} + 4 \, x^{2} + 2 \, {\left (x^{2} + 4 \, x\right )} \log \relax (x) - 3 \, x + \log \left (x - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 35, normalized size = 1.46 \begin {gather*} x^{3} + {\left (x + 4\right )} \log \relax (x)^{2} + 4 \, x^{2} + 2 \, {\left (x^{2} + 4 \, x\right )} \log \relax (x) - 3 \, x + \log \left (x - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.44, size = 37, normalized size = 1.54
method | result | size |
risch | \(\left (4+x \right ) \ln \relax (x )^{2}+\left (2 x^{2}+8 x \right ) \ln \relax (x )+x^{3}+4 x^{2}-3 x +\ln \left (x -4\right )\) | \(37\) |
default | \(x \ln \relax (x )^{2}+8 x \ln \relax (x )-3 x +x^{3}+4 x^{2}+\ln \left (x -4\right )+2 x^{2} \ln \relax (x )+4 \ln \relax (x )^{2}\) | \(41\) |
norman | \(x \ln \relax (x )^{2}+8 x \ln \relax (x )-3 x +x^{3}+4 x^{2}+\ln \left (x -4\right )+2 x^{2} \ln \relax (x )+4 \ln \relax (x )^{2}\) | \(41\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.38, size = 35, normalized size = 1.46 \begin {gather*} x^{3} + {\left (x + 4\right )} \log \relax (x)^{2} + 4 \, x^{2} + 2 \, {\left (x^{2} + 4 \, x\right )} \log \relax (x) - 3 \, x + \log \left (x - 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.51, size = 40, normalized size = 1.67 \begin {gather*} \ln \left (x-4\right )-3\,x+x\,{\ln \relax (x)}^2+2\,x^2\,\ln \relax (x)+4\,{\ln \relax (x)}^2+8\,x\,\ln \relax (x)+4\,x^2+x^3 \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^{3} + 4 x^{2} - 3 x + \left (x + 4\right ) \log {\relax (x )}^{2} + \left (2 x^{2} + 8 x\right ) \log {\relax (x )} + \log {\left (x - 4 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________