Optimal. Leaf size=20 \[ (5-x+\log (x)) \left (1-3 e^4 x \log (2+x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(90\) vs. \(2(20)=40\).
time = 0.82, antiderivative size = 90, normalized size of antiderivative = 4.50, number of steps
used = 27, number of rules used = 14, integrand size = 84, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used =
{1607, 6874, 1634, 45, 2393, 2332, 2354, 2438, 2436, 2442, 2417, 2458, 2353, 2352}
\begin {gather*} 3 e^4 x^2 \log (x+2)-\left (1+21 e^4\right ) x+21 e^4 x+6 e^4 \log \left (\frac {x}{2}+1\right ) \log (x)+6 e^4 \log (2) \log (x)+\log (x)-15 e^4 (x+2) \log (x+2)-3 e^4 (x+2) \log (x) \log (x+2)+30 e^4 \log (x+2) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 1607
Rule 1634
Rule 2332
Rule 2352
Rule 2353
Rule 2354
Rule 2393
Rule 2417
Rule 2436
Rule 2438
Rule 2442
Rule 2458
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2-x-x^2+e^4 \left (-15 x^2+3 x^3\right )-3 e^4 x^2 \log (x)+\left (e^4 \left (-36 x-6 x^2+6 x^3\right )+e^4 \left (-6 x-3 x^2\right ) \log (x)\right ) \log (2+x)}{x (2+x)} \, dx\\ &=\int \left (\frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3-3 e^4 x^2 \log (x)}{x (2+x)}+3 e^4 (-6+2 x-\log (x)) \log (2+x)\right ) \, dx\\ &=\left (3 e^4\right ) \int (-6+2 x-\log (x)) \log (2+x) \, dx+\int \frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3-3 e^4 x^2 \log (x)}{x (2+x)} \, dx\\ &=\left (3 e^4\right ) \int (-6 \log (2+x)+2 x \log (2+x)-\log (x) \log (2+x)) \, dx+\int \left (\frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3}{x (2+x)}-\frac {3 e^4 x \log (x)}{2+x}\right ) \, dx\\ &=-\left (\left (3 e^4\right ) \int \frac {x \log (x)}{2+x} \, dx\right )-\left (3 e^4\right ) \int \log (x) \log (2+x) \, dx+\left (6 e^4\right ) \int x \log (2+x) \, dx-\left (18 e^4\right ) \int \log (2+x) \, dx+\int \frac {2-x-\left (1+15 e^4\right ) x^2+3 e^4 x^3}{x (2+x)} \, dx\\ &=3 e^4 x \log (x)+3 e^4 x^2 \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)-\left (3 e^4\right ) \int \frac {x^2}{2+x} \, dx-\left (3 e^4\right ) \int \left (\log (x)-\frac {2 \log (x)}{2+x}\right ) \, dx+\left (3 e^4\right ) \int \left (-1+\frac {(2+x) \log (2+x)}{x}\right ) \, dx-\left (18 e^4\right ) \text {Subst}(\int \log (x) \, dx,x,2+x)+\int \left (-1-21 e^4+\frac {1}{x}+3 e^4 x+\frac {42 e^4}{2+x}\right ) \, dx\\ &=15 e^4 x-\left (1+21 e^4\right ) x+\frac {3 e^4 x^2}{2}+\log (x)+3 e^4 x \log (x)+42 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)-\left (3 e^4\right ) \int \left (-2+x+\frac {4}{2+x}\right ) \, dx-\left (3 e^4\right ) \int \log (x) \, dx+\left (3 e^4\right ) \int \frac {(2+x) \log (2+x)}{x} \, dx+\left (6 e^4\right ) \int \frac {\log (x)}{2+x} \, dx\\ &=24 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+\left (3 e^4\right ) \text {Subst}\left (\int \frac {x \log (x)}{-2+x} \, dx,x,2+x\right )-\left (6 e^4\right ) \int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx\\ &=24 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+6 e^4 \text {Li}_2\left (-\frac {x}{2}\right )+\left (3 e^4\right ) \text {Subst}\left (\int \left (\log (x)+\frac {2 \log (x)}{-2+x}\right ) \, dx,x,2+x\right )\\ &=24 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-18 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+6 e^4 \text {Li}_2\left (-\frac {x}{2}\right )+\left (3 e^4\right ) \text {Subst}(\int \log (x) \, dx,x,2+x)+\left (6 e^4\right ) \text {Subst}\left (\int \frac {\log (x)}{-2+x} \, dx,x,2+x\right )\\ &=21 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log (2) \log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-15 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)+6 e^4 \text {Li}_2\left (-\frac {x}{2}\right )+\left (6 e^4\right ) \text {Subst}\left (\int \frac {\log \left (\frac {x}{2}\right )}{-2+x} \, dx,x,2+x\right )\\ &=21 e^4 x-\left (1+21 e^4\right ) x+\log (x)+6 e^4 \log (2) \log (x)+6 e^4 \log \left (1+\frac {x}{2}\right ) \log (x)+30 e^4 \log (2+x)+3 e^4 x^2 \log (2+x)-15 e^4 (2+x) \log (2+x)-3 e^4 (2+x) \log (x) \log (2+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 23, normalized size = 1.15 \begin {gather*} -x+\log (x)+3 e^4 x (-5+x-\log (x)) \log (2+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(41\) vs.
\(2(19)=38\).
time = 3.09, size = 42, normalized size = 2.10
method | result | size |
risch | \(\left (3 x^{2} {\mathrm e}^{4}-3 x \,{\mathrm e}^{4} \ln \left (x \right )-15 x \,{\mathrm e}^{4}\right ) \ln \left (2+x \right )+\ln \left (x \right )-x\) | \(32\) |
default | \(-15 x \ln \left (2+x \right ) {\mathrm e}^{4}-3 \ln \left (x \right ) {\mathrm e}^{4} \ln \left (2+x \right ) x -x +\ln \left (x \right )+3 \,{\mathrm e}^{4} \ln \left (2+x \right ) x^{2}+54 \,{\mathrm e}^{4}\) | \(42\) |
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. 76 vs.
\(2 (19) = 38\).
time = 0.29, size = 76, normalized size = 3.80 \begin {gather*} -\frac {3}{2} \, x^{2} e^{4} + \frac {3}{2} \, {\left (x^{2} - 4 \, x + 8 \, \log \left (x + 2\right )\right )} e^{4} - 15 \, {\left (x - 2 \, \log \left (x + 2\right )\right )} e^{4} + 21 \, x e^{4} + 3 \, {\left (x^{2} e^{4} - x e^{4} \log \left (x\right ) - 5 \, x e^{4} - 14 \, e^{4}\right )} \log \left (x + 2\right ) - x + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 30, normalized size = 1.50 \begin {gather*} -3 \, {\left (x e^{4} \log \left (x\right ) - {\left (x^{2} - 5 \, x\right )} e^{4}\right )} \log \left (x + 2\right ) - x + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs.
\(2 (19) = 38\).
time = 0.91, size = 65, normalized size = 3.25 \begin {gather*} - x + \left (3 x^{2} e^{4} - 3 x e^{4} \log {\left (x \right )} - 15 x e^{4} - \frac {35 e^{4}}{2}\right ) \log {\left (x + 2 \right )} + \log {\left (x \right )} + \frac {35 e^{4} \log {\left (x + \frac {-4 + 70 e^{4}}{-2 + 35 e^{4}} \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 37, normalized size = 1.85 \begin {gather*} 3 \, x^{2} e^{4} \log \left (x + 2\right ) - 3 \, x e^{4} \log \left (x + 2\right ) \log \left (x\right ) - 15 \, x e^{4} \log \left (x + 2\right ) - x + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.68, size = 32, normalized size = 1.60 \begin {gather*} \ln \left (x\right )-x-\ln \left (x+2\right )\,\left (15\,x\,{\mathrm {e}}^4-3\,x^2\,{\mathrm {e}}^4+3\,x\,{\mathrm {e}}^4\,\ln \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________