Optimal. Leaf size=25 \[ \log (x) \left (3-x \left (x-\frac {e^x (1+x) \log \left (x^2\right )}{x}\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.79, antiderivative size = 33, normalized size of antiderivative = 1.32, number of steps used = 50, number of rules used = 13, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.236, Rules used = {14, 2304, 6688, 6742, 2199, 2194, 2178, 2554, 6483, 6475, 2176, 12, 2557} \begin {gather*} x^2 (-\log (x))+e^x x \log (x) \log \left (x^2\right )+e^x \log (x) \log \left (x^2\right )+3 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2176
Rule 2178
Rule 2194
Rule 2199
Rule 2304
Rule 2554
Rule 2557
Rule 6475
Rule 6483
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {3-x^2-2 x^2 \log (x)}{x}+\frac {e^x \left (2 \log (x)+2 x \log (x)+\log \left (x^2\right )+x \log \left (x^2\right )+2 x \log (x) \log \left (x^2\right )+x^2 \log (x) \log \left (x^2\right )\right )}{x}\right ) \, dx\\ &=\int \frac {3-x^2-2 x^2 \log (x)}{x} \, dx+\int \frac {e^x \left (2 \log (x)+2 x \log (x)+\log \left (x^2\right )+x \log \left (x^2\right )+2 x \log (x) \log \left (x^2\right )+x^2 \log (x) \log \left (x^2\right )\right )}{x} \, dx\\ &=\int \left (\frac {3-x^2}{x}-2 x \log (x)\right ) \, dx+\int \frac {e^x \left ((1+x) \log \left (x^2\right )+\log (x) \left (2 (1+x)+x (2+x) \log \left (x^2\right )\right )\right )}{x} \, dx\\ &=-(2 \int x \log (x) \, dx)+\int \frac {3-x^2}{x} \, dx+\int \left (\frac {2 e^x (1+x) \log (x)}{x}+\frac {e^x \left (1+x+2 x \log (x)+x^2 \log (x)\right ) \log \left (x^2\right )}{x}\right ) \, dx\\ &=\frac {x^2}{2}-x^2 \log (x)+2 \int \frac {e^x (1+x) \log (x)}{x} \, dx+\int \left (\frac {3}{x}-x\right ) \, dx+\int \frac {e^x \left (1+x+2 x \log (x)+x^2 \log (x)\right ) \log \left (x^2\right )}{x} \, dx\\ &=3 \log (x)+2 e^x \log (x)-x^2 \log (x)+2 \text {Ei}(x) \log (x)-2 \int \frac {e^x+\text {Ei}(x)}{x} \, dx+\int \frac {e^x (1+x+x (2+x) \log (x)) \log \left (x^2\right )}{x} \, dx\\ &=3 \log (x)+2 e^x \log (x)-x^2 \log (x)+2 \text {Ei}(x) \log (x)-2 \int \left (\frac {e^x}{x}+\frac {\text {Ei}(x)}{x}\right ) \, dx+\int \left (e^x \log \left (x^2\right )+\frac {e^x \log \left (x^2\right )}{x}+2 e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )\right ) \, dx\\ &=3 \log (x)+2 e^x \log (x)-x^2 \log (x)+2 \text {Ei}(x) \log (x)-2 \int \frac {e^x}{x} \, dx-2 \int \frac {\text {Ei}(x)}{x} \, dx+2 \int e^x \log (x) \log \left (x^2\right ) \, dx+\int e^x \log \left (x^2\right ) \, dx+\int \frac {e^x \log \left (x^2\right )}{x} \, dx+\int e^x x \log (x) \log \left (x^2\right ) \, dx\\ &=-2 \text {Ei}(x)+3 \log (x)+2 e^x \log (x)-x^2 \log (x)+2 \text {Ei}(x) \log (x)-2 (E_1(-x)+\text {Ei}(x)) \log (x)+e^x \log \left (x^2\right )+\text {Ei}(x) \log \left (x^2\right )+e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )+2 \int \frac {E_1(-x)}{x} \, dx-2 \int \frac {2 e^x \log (x)}{x} \, dx-2 \int \frac {e^x \log \left (x^2\right )}{x} \, dx-\int \frac {2 e^x}{x} \, dx-\int \frac {2 \text {Ei}(x)}{x} \, dx-\int \frac {2 e^x (-1+x) \log (x)}{x} \, dx-\int \frac {e^x (-1+x) \log \left (x^2\right )}{x} \, dx\\ &=-2 \text {Ei}(x)-2 x \, _3F_3(1,1,1;2,2,2;x)-\log ^2(-x)+3 \log (x)+2 e^x \log (x)-2 \gamma \log (x)-x^2 \log (x)+2 \text {Ei}(x) \log (x)-2 (E_1(-x)+\text {Ei}(x)) \log (x)+e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )-2 \int \frac {e^x}{x} \, dx-2 \int \frac {\text {Ei}(x)}{x} \, dx+2 \int \frac {2 \text {Ei}(x)}{x} \, dx-2 \int \frac {e^x (-1+x) \log (x)}{x} \, dx-4 \int \frac {e^x \log (x)}{x} \, dx+\int \frac {2 \left (e^x-\text {Ei}(x)\right )}{x} \, dx\\ &=-4 \text {Ei}(x)-2 x \, _3F_3(1,1,1;2,2,2;x)-\log ^2(-x)+3 \log (x)-2 \gamma \log (x)-x^2 \log (x)-4 (E_1(-x)+\text {Ei}(x)) \log (x)+e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )+2 \int \frac {E_1(-x)}{x} \, dx+2 \left (2 \int \frac {e^x-\text {Ei}(x)}{x} \, dx\right )+2 \left (4 \int \frac {\text {Ei}(x)}{x} \, dx\right )\\ &=-4 \text {Ei}(x)-4 x \, _3F_3(1,1,1;2,2,2;x)-2 \log ^2(-x)+3 \log (x)-4 \gamma \log (x)-x^2 \log (x)-4 (E_1(-x)+\text {Ei}(x)) \log (x)+e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )+2 \left (2 \int \left (\frac {e^x}{x}-\frac {\text {Ei}(x)}{x}\right ) \, dx\right )+2 \left (4 (E_1(-x)+\text {Ei}(x)) \log (x)-4 \int \frac {E_1(-x)}{x} \, dx\right )\\ &=-4 \text {Ei}(x)-4 x \, _3F_3(1,1,1;2,2,2;x)-2 \log ^2(-x)+3 \log (x)-4 \gamma \log (x)-x^2 \log (x)-4 (E_1(-x)+\text {Ei}(x)) \log (x)+2 \left (4 x \, _3F_3(1,1,1;2,2,2;x)+2 \log ^2(-x)+4 \gamma \log (x)+4 (E_1(-x)+\text {Ei}(x)) \log (x)\right )+e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )+2 \left (2 \int \frac {e^x}{x} \, dx-2 \int \frac {\text {Ei}(x)}{x} \, dx\right )\\ &=-4 \text {Ei}(x)-4 x \, _3F_3(1,1,1;2,2,2;x)-2 \log ^2(-x)+3 \log (x)-4 \gamma \log (x)-x^2 \log (x)-4 (E_1(-x)+\text {Ei}(x)) \log (x)+2 \left (4 x \, _3F_3(1,1,1;2,2,2;x)+2 \log ^2(-x)+4 \gamma \log (x)+4 (E_1(-x)+\text {Ei}(x)) \log (x)\right )+e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )+2 \left (2 \text {Ei}(x)-2 (E_1(-x)+\text {Ei}(x)) \log (x)+2 \int \frac {E_1(-x)}{x} \, dx\right )\\ &=-4 \text {Ei}(x)-4 x \, _3F_3(1,1,1;2,2,2;x)-2 \log ^2(-x)+3 \log (x)-4 \gamma \log (x)-x^2 \log (x)-4 (E_1(-x)+\text {Ei}(x)) \log (x)+2 \left (2 \text {Ei}(x)-2 x \, _3F_3(1,1,1;2,2,2;x)-\log ^2(-x)-2 \gamma \log (x)-2 (E_1(-x)+\text {Ei}(x)) \log (x)\right )+2 \left (4 x \, _3F_3(1,1,1;2,2,2;x)+2 \log ^2(-x)+4 \gamma \log (x)+4 (E_1(-x)+\text {Ei}(x)) \log (x)\right )+e^x \log (x) \log \left (x^2\right )+e^x x \log (x) \log \left (x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.24, size = 21, normalized size = 0.84 \begin {gather*} -\log (x) \left (-3+x^2-e^x (1+x) \log \left (x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 21, normalized size = 0.84 \begin {gather*} 2 \, {\left (x + 1\right )} e^{x} \log \relax (x)^{2} - {\left (x^{2} - 3\right )} \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 29, normalized size = 1.16 \begin {gather*} 2 \, x e^{x} \log \relax (x)^{2} - x^{2} \log \relax (x) + 2 \, e^{x} \log \relax (x)^{2} + 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.09, size = 59, normalized size = 2.36
method | result | size |
default | \(\left (\ln \left (x^{2}\right )-2 \ln \relax (x )\right ) {\mathrm e}^{x} \ln \relax (x )+x \left (\ln \left (x^{2}\right )-2 \ln \relax (x )\right ) {\mathrm e}^{x} \ln \relax (x )+2 \,{\mathrm e}^{x} \ln \relax (x )^{2}+2 x \,{\mathrm e}^{x} \ln \relax (x )^{2}-x^{2} \ln \relax (x )+3 \ln \relax (x )\) | \(59\) |
risch | \(2 \left (x +1\right ) {\mathrm e}^{x} \ln \relax (x )^{2}+\left (-x^{2}-\frac {i \pi x \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right ) {\mathrm e}^{x}}{2}+i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2} {\mathrm e}^{x}-\frac {i \pi x \mathrm {csgn}\left (i x^{2}\right )^{3} {\mathrm e}^{x}}{2}-\frac {i \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right ) {\mathrm e}^{x}}{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2} {\mathrm e}^{x}-\frac {i \pi \mathrm {csgn}\left (i x^{2}\right )^{3} {\mathrm e}^{x}}{2}\right ) \ln \relax (x )+3 \ln \relax (x )\) | \(139\) |
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*} -x^{2} \log \relax (x) + 2 \, {\left ({\left (x + 1\right )} \log \relax (x)^{2} - \log \relax (x)\right )} e^{x} + 2 \, e^{x} \log \relax (x) - 2 \, {\rm Ei}\relax (x) + 2 \, \int \frac {e^{x}}{x}\,{d x} + 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.21, size = 25, normalized size = 1.00 \begin {gather*} \ln \relax (x)\,\left (\ln \left (x^2\right )\,{\mathrm {e}}^x-x^2+x\,\ln \left (x^2\right )\,{\mathrm {e}}^x+3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.37, size = 29, normalized size = 1.16 \begin {gather*} - x^{2} \log {\relax (x )} + \left (2 x \log {\relax (x )}^{2} + 2 \log {\relax (x )}^{2}\right ) e^{x} + 3 \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________