Optimal. Leaf size=28 \[ -1+x-x^2+x \log (x) \left (-2+\log \left (3-\frac {e^2}{2 x}+x\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.00, antiderivative size = 30, normalized size of antiderivative = 1.07, number of steps used = 37, number of rules used = 15, integrand size = 125, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {6688, 2523, 1657, 634, 618, 206, 628, 6728, 2357, 2295, 2317, 2391, 2316, 2315, 2556} \begin {gather*} -x^2+x-2 x \log (x)+x \log (x) \log \left (x-\frac {e^2}{2 x}+3\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 1657
Rule 2295
Rule 2315
Rule 2316
Rule 2317
Rule 2357
Rule 2391
Rule 2523
Rule 2556
Rule 6688
Rule 6728
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-1-2 x+\log \left (3-\frac {e^2}{2 x}+x\right )+\frac {\log (x) \left (-3 e^2+2 x (6+x)+\left (e^2-2 x (3+x)\right ) \log \left (3-\frac {e^2}{2 x}+x\right )\right )}{e^2-6 x-2 x^2}\right ) \, dx\\ &=-x-x^2+\int \log \left (3-\frac {e^2}{2 x}+x\right ) \, dx+\int \frac {\log (x) \left (-3 e^2+2 x (6+x)+\left (e^2-2 x (3+x)\right ) \log \left (3-\frac {e^2}{2 x}+x\right )\right )}{e^2-6 x-2 x^2} \, dx\\ &=-x-x^2+x \log \left (3-\frac {e^2}{2 x}+x\right )-\int \frac {-e^2-2 x^2}{e^2-6 x-2 x^2} \, dx+\int \left (-\frac {\left (3 e^2-12 x-2 x^2\right ) \log (x)}{e^2-6 x-2 x^2}+\log (x) \log \left (3-\frac {e^2}{2 x}+x\right )\right ) \, dx\\ &=-x-x^2+x \log \left (3-\frac {e^2}{2 x}+x\right )-\int \left (1-\frac {2 \left (e^2-3 x\right )}{e^2-6 x-2 x^2}\right ) \, dx-\int \frac {\left (3 e^2-12 x-2 x^2\right ) \log (x)}{e^2-6 x-2 x^2} \, dx+\int \log (x) \log \left (3-\frac {e^2}{2 x}+x\right ) \, dx\\ &=-2 x-x^2+x \log \left (3-\frac {e^2}{2 x}+x\right )+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+2 \int \frac {e^2-3 x}{e^2-6 x-2 x^2} \, dx-\int \frac {\left (-e^2-2 x^2\right ) \log (x)}{e^2-6 x-2 x^2} \, dx-\int \left (\log (x)+\frac {2 \left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2}\right ) \, dx-\int \log \left (3-\frac {e^2}{2 x}+x\right ) \, dx\\ &=-2 x-x^2+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+\frac {3}{2} \int \frac {-6-4 x}{e^2-6 x-2 x^2} \, dx-2 \int \frac {\left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2} \, dx+\left (9+2 e^2\right ) \int \frac {1}{e^2-6 x-2 x^2} \, dx+\int \frac {-e^2-2 x^2}{e^2-6 x-2 x^2} \, dx-\int \log (x) \, dx-\int \left (\log (x)-\frac {2 \left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2}\right ) \, dx\\ &=-x-x^2-x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+\frac {3}{2} \log \left (e^2-6 x-2 x^2\right )+2 \int \frac {\left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2} \, dx-2 \int \left (\frac {\left (-3-\sqrt {9+2 e^2}\right ) \log (x)}{-6-2 \sqrt {9+2 e^2}-4 x}+\frac {\left (-3+\sqrt {9+2 e^2}\right ) \log (x)}{-6+2 \sqrt {9+2 e^2}-4 x}\right ) \, dx-\left (2 \left (9+2 e^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{4 \left (9+2 e^2\right )-x^2} \, dx,x,-6-4 x\right )+\int \left (1-\frac {2 \left (e^2-3 x\right )}{e^2-6 x-2 x^2}\right ) \, dx-\int \log (x) \, dx\\ &=x-x^2+\sqrt {9+2 e^2} \tanh ^{-1}\left (\frac {3+2 x}{\sqrt {9+2 e^2}}\right )-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+\frac {3}{2} \log \left (e^2-6 x-2 x^2\right )-2 \int \frac {e^2-3 x}{e^2-6 x-2 x^2} \, dx+2 \int \left (\frac {\left (-3-\sqrt {9+2 e^2}\right ) \log (x)}{-6-2 \sqrt {9+2 e^2}-4 x}+\frac {\left (-3+\sqrt {9+2 e^2}\right ) \log (x)}{-6+2 \sqrt {9+2 e^2}-4 x}\right ) \, dx+\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx+\left (2 \left (3+\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6-2 \sqrt {9+2 e^2}-4 x} \, dx\\ &=x-x^2+\sqrt {9+2 e^2} \tanh ^{-1}\left (\frac {3+2 x}{\sqrt {9+2 e^2}}\right )-\frac {1}{2} \left (3-\sqrt {9+2 e^2}\right ) \log \left (\frac {1}{2} \left (-3+\sqrt {9+2 e^2}\right )\right ) \log \left (-2 \left (3-\sqrt {9+2 e^2}\right )-4 x\right )-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )-\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \log (x) \log \left (1+\frac {2 x}{3+\sqrt {9+2 e^2}}\right )+\frac {3}{2} \log \left (e^2-6 x-2 x^2\right )-\frac {3}{2} \int \frac {-6-4 x}{e^2-6 x-2 x^2} \, dx-\left (9+2 e^2\right ) \int \frac {1}{e^2-6 x-2 x^2} \, dx-\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx+\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log \left (\frac {4 x}{-6+2 \sqrt {9+2 e^2}}\right )}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx+\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \int \frac {\log \left (1-\frac {4 x}{-6-2 \sqrt {9+2 e^2}}\right )}{x} \, dx-\left (2 \left (3+\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6-2 \sqrt {9+2 e^2}-4 x} \, dx\\ &=x-x^2+\sqrt {9+2 e^2} \tanh ^{-1}\left (\frac {3+2 x}{\sqrt {9+2 e^2}}\right )-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )-\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \text {Li}_2\left (-\frac {2 x}{3+\sqrt {9+2 e^2}}\right )+\frac {1}{2} \left (3-\sqrt {9+2 e^2}\right ) \text {Li}_2\left (1+\frac {2 x}{3-\sqrt {9+2 e^2}}\right )+\left (2 \left (9+2 e^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{4 \left (9+2 e^2\right )-x^2} \, dx,x,-6-4 x\right )-\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log \left (\frac {4 x}{-6+2 \sqrt {9+2 e^2}}\right )}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx-\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \int \frac {\log \left (1-\frac {4 x}{-6-2 \sqrt {9+2 e^2}}\right )}{x} \, dx\\ &=x-x^2-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 26, normalized size = 0.93 \begin {gather*} x \left (1-x+\log (x) \left (-2+\log \left (3-\frac {e^2}{2 x}+x\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.15, size = 35, normalized size = 1.25 \begin {gather*} -x^{2} + {\left (x \log \left (\frac {2 \, x^{2} + 6 \, x - e^{2}}{2 \, x}\right ) - 2 \, x\right )} \log \relax (x) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.28, size = 44, normalized size = 1.57 \begin {gather*} -x \log \relax (2) \log \relax (x) + x \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) \log \relax (x) - x \log \relax (x)^{2} - x^{2} - 2 \, x \log \relax (x) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.31, size = 227, normalized size = 8.11
method | result | size |
risch | \(\ln \relax (x ) x \ln \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )-x \ln \relax (x )^{2}-\frac {i \ln \relax (x ) \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}{2}+\frac {i \ln \relax (x ) \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )^{2}}{2}-i \ln \relax (x ) \pi x \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )^{2}+\frac {i \ln \relax (x ) \pi x \,\mathrm {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )^{2}}{2}+\frac {i \ln \relax (x ) \pi x \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )^{3}}{2}+i \pi x \ln \relax (x )-x \ln \relax (2) \ln \relax (x )-2 x \ln \relax (x )-x^{2}+x\) | \(227\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.52, size = 318, normalized size = 11.36 \begin {gather*} -x {\left (\log \relax (2) + 2\right )} \log \relax (x) + x \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) \log \relax (x) - x \log \relax (x)^{2} - x^{2} - \frac {1}{2} \, {\left (\frac {3 \, \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{\sqrt {2 \, e^{2} + 9}} - \log \left (2 \, x^{2} + 6 \, x - e^{2}\right )\right )} e^{2} - \frac {1}{2} \, {\left (e^{2} + 18\right )} \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) - \frac {7 \, {\left (e^{2} + 9\right )} \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + \frac {9 \, {\left (e^{2} + 6\right )} \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + \frac {e^{2} \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + x + \frac {9 \, \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + 9 \, \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.45, size = 32, normalized size = 1.14 \begin {gather*} x-2\,x\,\ln \relax (x)-x^2+x\,\ln \left (\frac {x^2+3\,x-\frac {{\mathrm {e}}^2}{2}}{x}\right )\,\ln \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: CoercionFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________