Optimal. Leaf size=34 \[ 2-x+\frac {2 \left (-x+e^{-2 e^3} x^2\right )}{\log (4)}+\frac {x}{\log (2+x)} \]
________________________________________________________________________________________
Rubi [A] time = 0.46, antiderivative size = 46, normalized size of antiderivative = 1.35, number of steps used = 12, number of rules used = 9, integrand size = 90, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {12, 6688, 2411, 2353, 2297, 2298, 2302, 30, 2389} \begin {gather*} \frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}+\frac {x+2}{\log (x+2)}-\frac {2}{\log (x+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 30
Rule 2297
Rule 2298
Rule 2302
Rule 2353
Rule 2389
Rule 2411
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {e^{-2 e^3} \int \frac {-e^{2 e^3} x \log (4)+e^{2 e^3} (2+x) \log (4) \log (2+x)+\left (8 x+4 x^2+e^{2 e^3} (-4-2 x+(-2-x) \log (4))\right ) \log ^2(2+x)}{(2+x) \log ^2(2+x)} \, dx}{\log (4)}\\ &=\frac {e^{-2 e^3} \int \left (4 x+e^{2 e^3} (-2-\log (4))-\frac {e^{2 e^3} x \log (4)}{(2+x) \log ^2(2+x)}+\frac {e^{2 e^3} \log (4)}{\log (2+x)}\right ) \, dx}{\log (4)}\\ &=\frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}-\int \frac {x}{(2+x) \log ^2(2+x)} \, dx+\int \frac {1}{\log (2+x)} \, dx\\ &=\frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}-\operatorname {Subst}\left (\int \frac {-2+x}{x \log ^2(x)} \, dx,x,2+x\right )+\operatorname {Subst}\left (\int \frac {1}{\log (x)} \, dx,x,2+x\right )\\ &=\frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}+\text {li}(2+x)-\operatorname {Subst}\left (\int \left (\frac {1}{\log ^2(x)}-\frac {2}{x \log ^2(x)}\right ) \, dx,x,2+x\right )\\ &=\frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}+\text {li}(2+x)+2 \operatorname {Subst}\left (\int \frac {1}{x \log ^2(x)} \, dx,x,2+x\right )-\operatorname {Subst}\left (\int \frac {1}{\log ^2(x)} \, dx,x,2+x\right )\\ &=\frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}+\frac {2+x}{\log (2+x)}+\text {li}(2+x)+2 \operatorname {Subst}\left (\int \frac {1}{x^2} \, dx,x,\log (2+x)\right )-\operatorname {Subst}\left (\int \frac {1}{\log (x)} \, dx,x,2+x\right )\\ &=\frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}-\frac {2}{\log (2+x)}+\frac {2+x}{\log (2+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 36, normalized size = 1.06 \begin {gather*} \frac {2 e^{-2 e^3} x^2}{\log (4)}-\frac {x (2+\log (4))}{\log (4)}+\frac {x}{\log (2+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.69, size = 48, normalized size = 1.41 \begin {gather*} \frac {{\left (x e^{\left (2 \, e^{3}\right )} \log \relax (2) + {\left (x^{2} - {\left (x \log \relax (2) + x\right )} e^{\left (2 \, e^{3}\right )}\right )} \log \left (x + 2\right )\right )} e^{\left (-2 \, e^{3}\right )}}{\log \relax (2) \log \left (x + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 61, normalized size = 1.79 \begin {gather*} -\frac {{\left (x e^{\left (2 \, e^{3}\right )} \log \relax (2) \log \left (x + 2\right ) - x e^{\left (2 \, e^{3}\right )} \log \relax (2) - x^{2} \log \left (x + 2\right ) + x e^{\left (2 \, e^{3}\right )} \log \left (x + 2\right )\right )} e^{\left (-2 \, e^{3}\right )}}{\log \relax (2) \log \left (x + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 33, normalized size = 0.97
method | result | size |
risch | \(-x -\frac {x}{\ln \relax (2)}+\frac {{\mathrm e}^{-2 \,{\mathrm e}^{3}} x^{2}}{\ln \relax (2)}+\frac {x}{\ln \left (2+x \right )}\) | \(33\) |
norman | \(\frac {\left (x \,{\mathrm e}^{{\mathrm e}^{3}}+\frac {{\mathrm e}^{-{\mathrm e}^{3}} x^{2} \ln \left (2+x \right )}{\ln \relax (2)}-\frac {{\mathrm e}^{{\mathrm e}^{3}} \left (1+\ln \relax (2)\right ) x \ln \left (2+x \right )}{\ln \relax (2)}\right ) {\mathrm e}^{-{\mathrm e}^{3}}}{\ln \left (2+x \right )}\) | \(54\) |
derivativedivides | \(\frac {{\mathrm e}^{-2 \,{\mathrm e}^{3}} \left (-2 \,{\mathrm e}^{2 \,{\mathrm e}^{3}} \ln \relax (2) \left (2+x \right )-2 \,{\mathrm e}^{2 \,{\mathrm e}^{3}} \left (2+x \right )-2 \ln \relax (2) {\mathrm e}^{2 \,{\mathrm e}^{3}} \expIntegralEi \left (1, -\ln \left (2+x \right )\right )+2 \left (2+x \right )^{2}-2 \ln \relax (2) {\mathrm e}^{2 \,{\mathrm e}^{3}} \left (-\frac {2+x}{\ln \left (2+x \right )}-\expIntegralEi \left (1, -\ln \left (2+x \right )\right )\right )-16-8 x -\frac {4 \ln \relax (2) {\mathrm e}^{2 \,{\mathrm e}^{3}}}{\ln \left (2+x \right )}\right )}{2 \ln \relax (2)}\) | \(109\) |
default | \(\frac {{\mathrm e}^{-2 \,{\mathrm e}^{3}} \left (-2 \,{\mathrm e}^{2 \,{\mathrm e}^{3}} \ln \relax (2) \left (2+x \right )-2 \,{\mathrm e}^{2 \,{\mathrm e}^{3}} \left (2+x \right )-2 \ln \relax (2) {\mathrm e}^{2 \,{\mathrm e}^{3}} \expIntegralEi \left (1, -\ln \left (2+x \right )\right )+2 \left (2+x \right )^{2}-2 \ln \relax (2) {\mathrm e}^{2 \,{\mathrm e}^{3}} \left (-\frac {2+x}{\ln \left (2+x \right )}-\expIntegralEi \left (1, -\ln \left (2+x \right )\right )\right )-16-8 x -\frac {4 \ln \relax (2) {\mathrm e}^{2 \,{\mathrm e}^{3}}}{\ln \left (2+x \right )}\right )}{2 \ln \relax (2)}\) | \(109\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 49, normalized size = 1.44 \begin {gather*} \frac {{\left (x e^{\left (2 \, e^{3}\right )} \log \relax (2) - {\left (x {\left (\log \relax (2) + 1\right )} e^{\left (2 \, e^{3}\right )} - x^{2}\right )} \log \left (x + 2\right )\right )} e^{\left (-2 \, e^{3}\right )}}{\log \relax (2) \log \left (x + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.39, size = 32, normalized size = 0.94 \begin {gather*} \frac {x}{\ln \left (x+2\right )}-x-\frac {x}{\ln \relax (2)}+\frac {x^2\,{\mathrm {e}}^{-2\,{\mathrm {e}}^3}}{\ln \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 31, normalized size = 0.91 \begin {gather*} \frac {x^{2}}{e^{2 e^{3}} \log {\relax (2 )}} + \frac {x \left (-1 - \log {\relax (2 )}\right )}{\log {\relax (2 )}} + \frac {x}{\log {\left (x + 2 \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________