Optimal. Leaf size=25 \[ x \left (-1-x+x^2+\frac {\left (5+e^{-x}\right ) x}{3+\log (x)}\right ) \]
________________________________________________________________________________________
Rubi [C] time = 1.50, antiderivative size = 167, normalized size of antiderivative = 6.68, number of steps used = 57, number of rules used = 13, integrand size = 81, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {6741, 6742, 2297, 2299, 2178, 2306, 2309, 2360, 2366, 6482, 43, 2356, 2288} \begin {gather*} -\frac {12 \text {Ei}(2 (\log (x)+3))}{e^6}+\frac {162 \text {Ei}(3 (\log (x)+3))}{e^9}-\frac {4 \log (x) \text {Ei}(2 (\log (x)+3))}{e^6}+\frac {54 \log (x) \text {Ei}(3 (\log (x)+3))}{e^9}+\frac {4 (\log (x)+3) \text {Ei}(2 (\log (x)+3))}{e^6}-\frac {54 (\log (x)+3) \text {Ei}(3 (\log (x)+3))}{e^9}+19 x^3-\frac {18 x^3 \log (x)}{\log (x)+3}-\frac {54 x^3}{\log (x)+3}-3 x^2+\frac {2 x^2 \log (x)}{\log (x)+3}+\frac {11 x^2}{\log (x)+3}-x+\frac {e^{-x} x (3 x+x \log (x))}{(\log (x)+3)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2178
Rule 2288
Rule 2297
Rule 2299
Rule 2306
Rule 2309
Rule 2356
Rule 2360
Rule 2366
Rule 6482
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{(3+\log (x))^2} \, dx\\ &=\int \left (-\frac {9}{(3+\log (x))^2}+\frac {7 x}{(3+\log (x))^2}+\frac {27 x^2}{(3+\log (x))^2}-\frac {6 \log (x)}{(3+\log (x))^2}-\frac {2 x \log (x)}{(3+\log (x))^2}+\frac {18 x^2 \log (x)}{(3+\log (x))^2}+\frac {(-1+x) (1+3 x) \log ^2(x)}{(3+\log (x))^2}-\frac {e^{-x} x (-5+3 x-2 \log (x)+x \log (x))}{(3+\log (x))^2}\right ) \, dx\\ &=-\left (2 \int \frac {x \log (x)}{(3+\log (x))^2} \, dx\right )-6 \int \frac {\log (x)}{(3+\log (x))^2} \, dx+7 \int \frac {x}{(3+\log (x))^2} \, dx-9 \int \frac {1}{(3+\log (x))^2} \, dx+18 \int \frac {x^2 \log (x)}{(3+\log (x))^2} \, dx+27 \int \frac {x^2}{(3+\log (x))^2} \, dx+\int \frac {(-1+x) (1+3 x) \log ^2(x)}{(3+\log (x))^2} \, dx-\int \frac {e^{-x} x (-5+3 x-2 \log (x)+x \log (x))}{(3+\log (x))^2} \, dx\\ &=-\frac {4 \text {Ei}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \text {Ei}(3 (3+\log (x))) \log (x)}{e^9}+\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}+2 \int \left (\frac {2 \text {Ei}(2 (3+\log (x)))}{e^6 x}-\frac {x}{3+\log (x)}\right ) \, dx-6 \int \left (-\frac {3}{(3+\log (x))^2}+\frac {1}{3+\log (x)}\right ) \, dx-9 \int \frac {1}{3+\log (x)} \, dx+14 \int \frac {x}{3+\log (x)} \, dx-18 \int \left (\frac {3 \text {Ei}(3 (3+\log (x)))}{e^9 x}-\frac {x^2}{3+\log (x)}\right ) \, dx+81 \int \frac {x^2}{3+\log (x)} \, dx+\int \left ((-1+x) (1+3 x)+\frac {9 (-1+x) (1+3 x)}{(3+\log (x))^2}-\frac {6 (-1+x) (1+3 x)}{3+\log (x)}\right ) \, dx\\ &=-\frac {4 \text {Ei}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \text {Ei}(3 (3+\log (x))) \log (x)}{e^9}+\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}-2 \int \frac {x}{3+\log (x)} \, dx-6 \int \frac {1}{3+\log (x)} \, dx-6 \int \frac {(-1+x) (1+3 x)}{3+\log (x)} \, dx+9 \int \frac {(-1+x) (1+3 x)}{(3+\log (x))^2} \, dx-9 \operatorname {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )+14 \operatorname {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )+18 \int \frac {1}{(3+\log (x))^2} \, dx+18 \int \frac {x^2}{3+\log (x)} \, dx+81 \operatorname {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right )-\frac {54 \int \frac {\text {Ei}(3 (3+\log (x)))}{x} \, dx}{e^9}+\frac {4 \int \frac {\text {Ei}(2 (3+\log (x)))}{x} \, dx}{e^6}+\int (-1+x) (1+3 x) \, dx\\ &=-\frac {9 \text {Ei}(3+\log (x))}{e^3}+\frac {14 \text {Ei}(2 (3+\log (x)))}{e^6}+\frac {81 \text {Ei}(3 (3+\log (x)))}{e^9}-\frac {4 \text {Ei}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \text {Ei}(3 (3+\log (x))) \log (x)}{e^9}-\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}-2 \operatorname {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )-6 \int \left (-\frac {1}{3+\log (x)}-\frac {2 x}{3+\log (x)}+\frac {3 x^2}{3+\log (x)}\right ) \, dx-6 \operatorname {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )+9 \int \left (-\frac {1}{(3+\log (x))^2}-\frac {2 x}{(3+\log (x))^2}+\frac {3 x^2}{(3+\log (x))^2}\right ) \, dx+18 \int \frac {1}{3+\log (x)} \, dx+18 \operatorname {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right )-\frac {54 \operatorname {Subst}(\int \text {Ei}(3 (3+x)) \, dx,x,\log (x))}{e^9}+\frac {4 \operatorname {Subst}(\int \text {Ei}(2 (3+x)) \, dx,x,\log (x))}{e^6}+\int \left (-1-2 x+3 x^2\right ) \, dx\\ &=-x-x^2+x^3-\frac {15 \text {Ei}(3+\log (x))}{e^3}+\frac {12 \text {Ei}(2 (3+\log (x)))}{e^6}+\frac {99 \text {Ei}(3 (3+\log (x)))}{e^9}-\frac {4 \text {Ei}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \text {Ei}(3 (3+\log (x))) \log (x)}{e^9}-\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}+6 \int \frac {1}{3+\log (x)} \, dx-9 \int \frac {1}{(3+\log (x))^2} \, dx+12 \int \frac {x}{3+\log (x)} \, dx-18 \int \frac {x}{(3+\log (x))^2} \, dx-18 \int \frac {x^2}{3+\log (x)} \, dx+18 \operatorname {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )+27 \int \frac {x^2}{(3+\log (x))^2} \, dx-\frac {18 \operatorname {Subst}(\int \text {Ei}(x) \, dx,x,9+3 \log (x))}{e^9}+\frac {2 \operatorname {Subst}(\int \text {Ei}(x) \, dx,x,6+2 \log (x))}{e^6}\\ &=-x-3 x^2+19 x^3+\frac {3 \text {Ei}(3+\log (x))}{e^3}+\frac {12 \text {Ei}(2 (3+\log (x)))}{e^6}+\frac {99 \text {Ei}(3 (3+\log (x)))}{e^9}-\frac {4 \text {Ei}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \text {Ei}(3 (3+\log (x))) \log (x)}{e^9}+\frac {11 x^2}{3+\log (x)}-\frac {54 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {4 \text {Ei}(6+2 \log (x)) (3+\log (x))}{e^6}-\frac {54 \text {Ei}(9+3 \log (x)) (3+\log (x))}{e^9}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}+6 \operatorname {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )-9 \int \frac {1}{3+\log (x)} \, dx+12 \operatorname {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )-18 \operatorname {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right )-36 \int \frac {x}{3+\log (x)} \, dx+81 \int \frac {x^2}{3+\log (x)} \, dx\\ &=-x-3 x^2+19 x^3+\frac {9 \text {Ei}(3+\log (x))}{e^3}+\frac {24 \text {Ei}(2 (3+\log (x)))}{e^6}+\frac {81 \text {Ei}(3 (3+\log (x)))}{e^9}-\frac {4 \text {Ei}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \text {Ei}(3 (3+\log (x))) \log (x)}{e^9}+\frac {11 x^2}{3+\log (x)}-\frac {54 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {4 \text {Ei}(6+2 \log (x)) (3+\log (x))}{e^6}-\frac {54 \text {Ei}(9+3 \log (x)) (3+\log (x))}{e^9}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}-9 \operatorname {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )-36 \operatorname {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )+81 \operatorname {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right )\\ &=-x-3 x^2+19 x^3-\frac {12 \text {Ei}(2 (3+\log (x)))}{e^6}+\frac {162 \text {Ei}(3 (3+\log (x)))}{e^9}-\frac {4 \text {Ei}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \text {Ei}(3 (3+\log (x))) \log (x)}{e^9}+\frac {11 x^2}{3+\log (x)}-\frac {54 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {4 \text {Ei}(6+2 \log (x)) (3+\log (x))}{e^6}-\frac {54 \text {Ei}(9+3 \log (x)) (3+\log (x))}{e^9}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.51, size = 25, normalized size = 1.00 \begin {gather*} x \left (-1-x+x^2+\frac {\left (5+e^{-x}\right ) x}{3+\log (x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.97, size = 44, normalized size = 1.76 \begin {gather*} \frac {3 \, x^{3} + x^{2} e^{\left (-x\right )} + 2 \, x^{2} + {\left (x^{3} - x^{2} - x\right )} \log \relax (x) - 3 \, x}{\log \relax (x) + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.31, size = 47, normalized size = 1.88 \begin {gather*} \frac {x^{3} \log \relax (x) + 3 \, x^{3} + x^{2} e^{\left (-x\right )} - x^{2} \log \relax (x) + 2 \, x^{2} - x \log \relax (x) - 3 \, x}{\log \relax (x) + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 29, normalized size = 1.16
method | result | size |
risch | \(x^{3}-x^{2}-x +\frac {x^{2} \left ({\mathrm e}^{-x}+5\right )}{3+\ln \relax (x )}\) | \(29\) |
norman | \(\frac {x^{2} {\mathrm e}^{-x}+x^{3} \ln \relax (x )-3 x +2 x^{2}+3 x^{3}-x \ln \relax (x )-x^{2} \ln \relax (x )}{3+\ln \relax (x )}\) | \(48\) |
default | \(\frac {x^{3} \ln \relax (x )-3 x +2 x^{2}+3 x^{3}-x^{2} \ln \relax (x )-x \ln \relax (x )}{3+\ln \relax (x )}+\frac {x^{2} {\mathrm e}^{-x}}{3+\ln \relax (x )}\) | \(55\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {9 \, e^{\left (-3\right )} E_{2}\left (-\log \relax (x) - 3\right )}{\log \relax (x) + 3} - \frac {7 \, e^{\left (-6\right )} E_{2}\left (-2 \, \log \relax (x) - 6\right )}{\log \relax (x) + 3} - \frac {27 \, e^{\left (-9\right )} E_{2}\left (-3 \, \log \relax (x) - 9\right )}{\log \relax (x) + 3} + \frac {30 \, x^{3} + x^{2} e^{\left (-x\right )} + 9 \, x^{2} + {\left (x^{3} - x^{2} - x\right )} \log \relax (x) - 12 \, x}{\log \relax (x) + 3} - \int \frac {81 \, x^{2} + 14 \, x - 9}{\log \relax (x) + 3}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.44, size = 27, normalized size = 1.08 \begin {gather*} x^3-x+\frac {x^2\,\left ({\mathrm {e}}^{-x}-\ln \relax (x)+2\right )}{\ln \relax (x)+3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.33, size = 29, normalized size = 1.16 \begin {gather*} x^{3} - x^{2} + \frac {5 x^{2}}{\log {\relax (x )} + 3} + \frac {x^{2} e^{- x}}{\log {\relax (x )} + 3} - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________