Optimal. Leaf size=28 \[ x \left (2+\frac {(-2+x)^2 (x-\log (-1-x))}{e^3}\right )-2 \log (x) \]
________________________________________________________________________________________
Rubi [B] time = 0.35, antiderivative size = 98, normalized size of antiderivative = 3.50, number of steps used = 16, number of rules used = 9, integrand size = 64, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.141, Rules used = {12, 1593, 6742, 1620, 2417, 2389, 2295, 2395, 43} \begin {gather*} \frac {x^4}{e^3}-\frac {4 x^3}{e^3}-\frac {x^3 \log (-x-1)}{e^3}+\frac {4 x^2}{e^3}+\frac {4 x^2 \log (-x-1)}{e^3}-\frac {\left (9-2 e^3\right ) x}{e^3}+\frac {9 x}{e^3}-\frac {4 (x+1) \log (-x-1)}{e^3}-2 \log (x)+\frac {4 \log (x+1)}{e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 1593
Rule 1620
Rule 2295
Rule 2389
Rule 2395
Rule 2417
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \frac {4 x^2-9 x^4+4 x^5+e^3 \left (-2+2 x^2\right )+\left (-4 x+4 x^2+5 x^3-3 x^4\right ) \log (-1-x)}{x+x^2} \, dx}{e^3}\\ &=\frac {\int \frac {4 x^2-9 x^4+4 x^5+e^3 \left (-2+2 x^2\right )+\left (-4 x+4 x^2+5 x^3-3 x^4\right ) \log (-1-x)}{x (1+x)} \, dx}{e^3}\\ &=\frac {\int \left (\frac {-2 e^3+4 \left (1+\frac {e^3}{2}\right ) x^2-9 x^4+4 x^5}{x (1+x)}-(-2+x) (-2+3 x) \log (-1-x)\right ) \, dx}{e^3}\\ &=\frac {\int \frac {-2 e^3+4 \left (1+\frac {e^3}{2}\right ) x^2-9 x^4+4 x^5}{x (1+x)} \, dx}{e^3}-\frac {\int (-2+x) (-2+3 x) \log (-1-x) \, dx}{e^3}\\ &=\frac {\int \left (-9 \left (1-\frac {2 e^3}{9}\right )-\frac {2 e^3}{x}+13 x-13 x^2+4 x^3+\frac {9}{1+x}\right ) \, dx}{e^3}-\frac {\int \left (4 \log (-1-x)-8 x \log (-1-x)+3 x^2 \log (-1-x)\right ) \, dx}{e^3}\\ &=-\frac {\left (9-2 e^3\right ) x}{e^3}+\frac {13 x^2}{2 e^3}-\frac {13 x^3}{3 e^3}+\frac {x^4}{e^3}-2 \log (x)+\frac {9 \log (1+x)}{e^3}-\frac {3 \int x^2 \log (-1-x) \, dx}{e^3}-\frac {4 \int \log (-1-x) \, dx}{e^3}+\frac {8 \int x \log (-1-x) \, dx}{e^3}\\ &=-\frac {\left (9-2 e^3\right ) x}{e^3}+\frac {13 x^2}{2 e^3}-\frac {13 x^3}{3 e^3}+\frac {x^4}{e^3}+\frac {4 x^2 \log (-1-x)}{e^3}-\frac {x^3 \log (-1-x)}{e^3}-2 \log (x)+\frac {9 \log (1+x)}{e^3}-\frac {\int \frac {x^3}{-1-x} \, dx}{e^3}+\frac {4 \int \frac {x^2}{-1-x} \, dx}{e^3}+\frac {4 \operatorname {Subst}(\int \log (x) \, dx,x,-1-x)}{e^3}\\ &=\frac {4 x}{e^3}-\frac {\left (9-2 e^3\right ) x}{e^3}+\frac {13 x^2}{2 e^3}-\frac {13 x^3}{3 e^3}+\frac {x^4}{e^3}+\frac {4 x^2 \log (-1-x)}{e^3}-\frac {x^3 \log (-1-x)}{e^3}-\frac {4 (1+x) \log (-1-x)}{e^3}-2 \log (x)+\frac {9 \log (1+x)}{e^3}-\frac {\int \left (-1+x-x^2+\frac {1}{1+x}\right ) \, dx}{e^3}+\frac {4 \int \left (1+\frac {1}{-1-x}-x\right ) \, dx}{e^3}\\ &=\frac {9 x}{e^3}-\frac {\left (9-2 e^3\right ) x}{e^3}+\frac {4 x^2}{e^3}-\frac {4 x^3}{e^3}+\frac {x^4}{e^3}+\frac {4 x^2 \log (-1-x)}{e^3}-\frac {x^3 \log (-1-x)}{e^3}-\frac {4 (1+x) \log (-1-x)}{e^3}-2 \log (x)+\frac {4 \log (1+x)}{e^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.08, size = 76, normalized size = 2.71 \begin {gather*} \frac {2 e^3 x+4 x^2-4 x^3+x^4-4 \log (-1-x)-4 x \log (-1-x)+4 x^2 \log (-1-x)-x^3 \log (-1-x)-2 e^3 \log (x)+4 \log (1+x)}{e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 48, normalized size = 1.71 \begin {gather*} {\left (x^{4} - 4 \, x^{3} + 4 \, x^{2} + 2 \, x e^{3} - 2 \, e^{3} \log \relax (x) - {\left (x^{3} - 4 \, x^{2} + 4 \, x\right )} \log \left (-x - 1\right )\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 59, normalized size = 2.11 \begin {gather*} {\left (x^{4} - x^{3} \log \left (-x - 1\right ) - 4 \, x^{3} + 4 \, x^{2} \log \left (-x - 1\right ) + 4 \, x^{2} + 2 \, x e^{3} - 2 \, e^{3} \log \relax (x) - 4 \, x \log \left (-x - 1\right )\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 52, normalized size = 1.86
method | result | size |
risch | \({\mathrm e}^{-3} \left (-x^{3}+4 x^{2}-4 x \right ) \ln \left (-x -1\right )+{\mathrm e}^{-3} x^{4}-4 \,{\mathrm e}^{-3} x^{3}+2 x +4 x^{2} {\mathrm e}^{-3}-2 \ln \relax (x )\) | \(52\) |
norman | \({\mathrm e}^{-3} x^{4}+2 x +4 x^{2} {\mathrm e}^{-3}-4 \,{\mathrm e}^{-3} x^{3}-4 x \,{\mathrm e}^{-3} \ln \left (-x -1\right )+4 x^{2} {\mathrm e}^{-3} \ln \left (-x -1\right )-{\mathrm e}^{-3} x^{3} \ln \left (-x -1\right )-2 \ln \relax (x )\) | \(78\) |
default | \({\mathrm e}^{-3} \left (\ln \left (-x -1\right ) \left (-x -1\right )^{3}+8 \left (-x -1\right )^{3}+7 \ln \left (-x -1\right ) \left (-x -1\right )^{2}+22 \left (-x -1\right )^{2}+15 \ln \left (-x -1\right ) \left (-x -1\right )-24 x -24+\left (-x -1\right )^{4}-2 \left (-x -1\right ) {\mathrm e}^{3}-2 \,{\mathrm e}^{3} \ln \left (-x \right )+9 \ln \left (-x -1\right )\right )\) | \(103\) |
derivativedivides | \(-{\mathrm e}^{-3} \left (-\ln \left (-x -1\right ) \left (-x -1\right )^{3}-8 \left (-x -1\right )^{3}-7 \ln \left (-x -1\right ) \left (-x -1\right )^{2}-22 \left (-x -1\right )^{2}-15 \ln \left (-x -1\right ) \left (-x -1\right )+24 x +24-\left (-x -1\right )^{4}+2 \left (-x -1\right ) {\mathrm e}^{3}+2 \,{\mathrm e}^{3} \ln \left (-x \right )-9 \ln \left (-x -1\right )\right )\) | \(107\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.37, size = 128, normalized size = 4.57 \begin {gather*} \frac {1}{2} \, {\left (2 \, x^{4} - 8 \, x^{3} + 8 \, x^{2} + 4 \, {\left (x - \log \left (x + 1\right )\right )} e^{3} + 4 \, {\left (\log \left (x + 1\right ) - \log \relax (x)\right )} e^{3} - 4 \, \log \left (x + 1\right )^{2} - {\left (2 \, x^{3} - 3 \, x^{2} + 6 \, x - 6 \, \log \left (x + 1\right )\right )} \log \left (-x - 1\right ) + 5 \, {\left (x^{2} - 2 \, x + 2 \, \log \left (x + 1\right )\right )} \log \left (-x - 1\right ) + 8 \, {\left (x - \log \left (x + 1\right )\right )} \log \left (-x - 1\right ) - 4 \, \log \left (-x - 1\right )^{2}\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.54, size = 65, normalized size = 2.32 \begin {gather*} 2\,x-2\,\ln \relax (x)+4\,x^2\,{\mathrm {e}}^{-3}-4\,x^3\,{\mathrm {e}}^{-3}+x^4\,{\mathrm {e}}^{-3}+4\,x^2\,{\mathrm {e}}^{-3}\,\ln \left (-x-1\right )-x^3\,{\mathrm {e}}^{-3}\,\ln \left (-x-1\right )-4\,x\,{\mathrm {e}}^{-3}\,\ln \left (-x-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.21, size = 53, normalized size = 1.89 \begin {gather*} \frac {\left (- x^{3} + 4 x^{2} - 4 x\right ) \log {\left (- x - 1 \right )}}{e^{3}} + \frac {x^{4} - 4 x^{3} + 4 x^{2} + 2 x e^{3} - 2 e^{3} \log {\relax (x )}}{e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________