Optimal. Leaf size=22 \[ -\left (\left (2+3 \left (3+e^x\right )\right ) x^2 \log \left (\frac {-1+x}{x}\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.60, antiderivative size = 30, normalized size of antiderivative = 1.36, number of steps
used = 24, number of rules used = 12, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {6820, 6874,
2230, 2225, 2209, 2227, 2207, 2634, 14, 45, 2505, 199} \begin {gather*} -3 e^x x^2 \log \left (1-\frac {1}{x}\right )-11 x^2 \log \left (1-\frac {1}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 45
Rule 199
Rule 2207
Rule 2209
Rule 2225
Rule 2227
Rule 2230
Rule 2505
Rule 2634
Rule 6820
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {x \left (11+3 e^x+(-1+x) \left (22+3 e^x (2+x)\right ) \log \left (\frac {-1+x}{x}\right )\right )}{1-x} \, dx\\ &=\int \left (-\frac {3 e^x x \left (1-2 \log \left (\frac {-1+x}{x}\right )+x \log \left (\frac {-1+x}{x}\right )+x^2 \log \left (\frac {-1+x}{x}\right )\right )}{-1+x}-\frac {11 \left (x-2 x \log \left (\frac {-1+x}{x}\right )+2 x^2 \log \left (\frac {-1+x}{x}\right )\right )}{-1+x}\right ) \, dx\\ &=-\left (3 \int \frac {e^x x \left (1-2 \log \left (\frac {-1+x}{x}\right )+x \log \left (\frac {-1+x}{x}\right )+x^2 \log \left (\frac {-1+x}{x}\right )\right )}{-1+x} \, dx\right )-11 \int \frac {x-2 x \log \left (\frac {-1+x}{x}\right )+2 x^2 \log \left (\frac {-1+x}{x}\right )}{-1+x} \, dx\\ &=-\left (3 \int \frac {e^x x \left (-1-\left (-2+x+x^2\right ) \log \left (\frac {-1+x}{x}\right )\right )}{1-x} \, dx\right )-11 \int x \left (\frac {1}{-1+x}+2 \log \left (\frac {-1+x}{x}\right )\right ) \, dx\\ &=-\left (3 \int \left (\frac {e^x x}{-1+x}+e^x x (2+x) \log \left (1-\frac {1}{x}\right )\right ) \, dx\right )-11 \int \left (\frac {x}{-1+x}+2 x \log \left (1-\frac {1}{x}\right )\right ) \, dx\\ &=-\left (3 \int \frac {e^x x}{-1+x} \, dx\right )-3 \int e^x x (2+x) \log \left (1-\frac {1}{x}\right ) \, dx-11 \int \frac {x}{-1+x} \, dx-22 \int x \log \left (1-\frac {1}{x}\right ) \, dx\\ &=-11 x^2 \log \left (1-\frac {1}{x}\right )-3 e^x x^2 \log \left (1-\frac {1}{x}\right )-3 \int \left (e^x+\frac {e^x}{-1+x}\right ) \, dx+3 \int \frac {e^x x}{-1+x} \, dx-11 \int \left (1+\frac {1}{-1+x}\right ) \, dx+11 \int \frac {1}{1-\frac {1}{x}} \, dx\\ &=-11 x-11 x^2 \log \left (1-\frac {1}{x}\right )-3 e^x x^2 \log \left (1-\frac {1}{x}\right )-11 \log (1-x)-3 \int e^x \, dx+3 \int \left (e^x+\frac {e^x}{-1+x}\right ) \, dx-3 \int \frac {e^x}{-1+x} \, dx+11 \int \frac {x}{-1+x} \, dx\\ &=-3 e^x-11 x-3 e \text {Ei}(-1+x)-11 x^2 \log \left (1-\frac {1}{x}\right )-3 e^x x^2 \log \left (1-\frac {1}{x}\right )-11 \log (1-x)+3 \int e^x \, dx+3 \int \frac {e^x}{-1+x} \, dx+11 \int \left (1+\frac {1}{-1+x}\right ) \, dx\\ &=-11 x^2 \log \left (1-\frac {1}{x}\right )-3 e^x x^2 \log \left (1-\frac {1}{x}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 20, normalized size = 0.91 \begin {gather*} -\left (\left (11+3 e^x\right ) x^2 \log \left (\frac {-1+x}{x}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(57\) vs.
\(2(19)=38\).
time = 0.90, size = 58, normalized size = 2.64
method | result | size |
norman | \(-11 \ln \left (\frac {x -1}{x}\right ) x^{2}-3 \,{\mathrm e}^{x} \ln \left (\frac {x -1}{x}\right ) x^{2}\) | \(30\) |
default | \(-3 \,{\mathrm e}^{x} \ln \left (\frac {x -1}{x}\right ) x^{2}-11 \ln \left (x -1\right )-11 \ln \left (-\frac {1}{x}\right )+11 \ln \left (1-\frac {1}{x}\right ) \left (1-\frac {1}{x}\right ) \left (-\frac {1}{x}-1\right ) x^{2}\) | \(58\) |
risch | \(\left (-3 \,{\mathrm e}^{x} x^{2}-11 x^{2}\right ) \ln \left (x -1\right )+3 x^{2} {\mathrm e}^{x} \ln \left (x \right )+11 x^{2} \ln \left (x \right )-\frac {11 i \pi \,x^{2} \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2}}{2}+\frac {11 i \pi \,x^{2} \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right ) \mathrm {csgn}\left (\frac {i}{x}\right )}{2}+\frac {11 i \pi \,x^{2} \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{3}}{2}-\frac {11 i \pi \,x^{2} \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2} \mathrm {csgn}\left (\frac {i}{x}\right )}{2}-\frac {3 i \pi \,x^{2} \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2} {\mathrm e}^{x}}{2}+\frac {3 i \pi \,x^{2} \mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right ) \mathrm {csgn}\left (\frac {i}{x}\right ) {\mathrm e}^{x}}{2}+\frac {3 i \pi \,x^{2} \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{3} {\mathrm e}^{x}}{2}-\frac {3 i \pi \,x^{2} \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) {\mathrm e}^{x}}{2}\) | \(248\) |
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. 43 vs.
\(2 (19) = 38\).
time = 0.39, size = 43, normalized size = 1.95 \begin {gather*} 3 \, x^{2} e^{x} \log \left (x\right ) + 11 \, x^{2} \log \left (x\right ) - {\left (3 \, x^{2} e^{x} + 11 \, x^{2} - 11\right )} \log \left (x - 1\right ) - 11 \, \log \left (x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 23, normalized size = 1.05 \begin {gather*} -{\left (3 \, x^{2} e^{x} + 11 \, x^{2}\right )} \log \left (\frac {x - 1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.16, size = 27, normalized size = 1.23 \begin {gather*} - 3 x^{2} e^{x} \log {\left (\frac {x - 1}{x} \right )} - 11 x^{2} \log {\left (\frac {x - 1}{x} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 29, normalized size = 1.32 \begin {gather*} -3 \, x^{2} e^{x} \log \left (\frac {x - 1}{x}\right ) - 11 \, x^{2} \log \left (\frac {x - 1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.37, size = 19, normalized size = 0.86 \begin {gather*} -x^2\,\ln \left (\frac {x-1}{x}\right )\,\left (3\,{\mathrm {e}}^x+11\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________