Optimal. Leaf size=19 \[ 2 \left (5+\frac {(1-2 x) x}{-4+\log (-1+x)}\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.58, antiderivative size = 48, normalized size of antiderivative = 2.53, number of steps used = 32, number of rules used = 13, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.245, Rules used = {6741, 6742, 2418, 2389, 2297, 2299, 2178, 2390, 2302, 30, 2400, 2399, 2309} \begin {gather*} -\frac {4 x (1-x)}{4-\log (x-1)}-\frac {2 (1-x)}{4-\log (x-1)}+\frac {2}{4-\log (x-1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2178
Rule 2297
Rule 2299
Rule 2302
Rule 2309
Rule 2389
Rule 2390
Rule 2399
Rule 2400
Rule 2418
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-8+42 x-36 x^2-\left (-2+10 x-8 x^2\right ) \log (-1+x)}{(1-x) (4-\log (-1+x))^2} \, dx\\ &=\int \left (\frac {2 x (-1+2 x)}{(-1+x) (-4+\log (-1+x))^2}-\frac {2 (-1+4 x)}{-4+\log (-1+x)}\right ) \, dx\\ &=2 \int \frac {x (-1+2 x)}{(-1+x) (-4+\log (-1+x))^2} \, dx-2 \int \frac {-1+4 x}{-4+\log (-1+x)} \, dx\\ &=2 \int \left (\frac {1}{(-4+\log (-1+x))^2}+\frac {1}{(-1+x) (-4+\log (-1+x))^2}+\frac {2 x}{(-4+\log (-1+x))^2}\right ) \, dx-2 \int \left (\frac {3}{-4+\log (-1+x)}+\frac {4 (-1+x)}{-4+\log (-1+x)}\right ) \, dx\\ &=2 \int \frac {1}{(-4+\log (-1+x))^2} \, dx+2 \int \frac {1}{(-1+x) (-4+\log (-1+x))^2} \, dx+4 \int \frac {x}{(-4+\log (-1+x))^2} \, dx-6 \int \frac {1}{-4+\log (-1+x)} \, dx-8 \int \frac {-1+x}{-4+\log (-1+x)} \, dx\\ &=-\frac {4 (1-x) x}{4-\log (-1+x)}+2 \operatorname {Subst}\left (\int \frac {1}{(-4+\log (x))^2} \, dx,x,-1+x\right )+2 \operatorname {Subst}\left (\int \frac {1}{x (-4+\log (x))^2} \, dx,x,-1+x\right )-4 \int \frac {1}{-4+\log (-1+x)} \, dx-6 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )+8 \int \frac {x}{-4+\log (-1+x)} \, dx-8 \operatorname {Subst}\left (\int \frac {x}{-4+\log (x)} \, dx,x,-1+x\right )\\ &=-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+2 \operatorname {Subst}\left (\int \frac {1}{x^2} \, dx,x,-4+\log (-1+x)\right )+2 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )-4 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )-6 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )+8 \int \left (\frac {1}{-4+\log (-1+x)}+\frac {-1+x}{-4+\log (-1+x)}\right ) \, dx-8 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-4+x} \, dx,x,\log (-1+x)\right )\\ &=-8 e^8 \text {Ei}(-2 (4-\log (-1+x)))-6 e^4 \text {Ei}(-4+\log (-1+x))+\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+2 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )-4 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )+8 \int \frac {1}{-4+\log (-1+x)} \, dx+8 \int \frac {-1+x}{-4+\log (-1+x)} \, dx\\ &=-8 e^8 \text {Ei}(-2 (4-\log (-1+x)))-8 e^4 \text {Ei}(-4+\log (-1+x))+\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+8 \operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,-1+x\right )+8 \operatorname {Subst}\left (\int \frac {x}{-4+\log (x)} \, dx,x,-1+x\right )\\ &=-8 e^8 \text {Ei}(-2 (4-\log (-1+x)))-8 e^4 \text {Ei}(-4+\log (-1+x))+\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}+8 \operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (-1+x)\right )+8 \operatorname {Subst}\left (\int \frac {e^{2 x}}{-4+x} \, dx,x,\log (-1+x)\right )\\ &=\frac {2}{4-\log (-1+x)}-\frac {2 (1-x)}{4-\log (-1+x)}-\frac {4 (1-x) x}{4-\log (-1+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 16, normalized size = 0.84 \begin {gather*} \frac {2 (1-2 x) x}{-4+\log (-1+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 19, normalized size = 1.00 \begin {gather*} -\frac {2 \, {\left (2 \, x^{2} - x\right )}}{\log \left (x - 1\right ) - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 19, normalized size = 1.00 \begin {gather*} -\frac {2 \, {\left (2 \, x^{2} - x\right )}}{\log \left (x - 1\right ) - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 17, normalized size = 0.89
method | result | size |
risch | \(-\frac {2 x \left (2 x -1\right )}{\ln \left (x -1\right )-4}\) | \(17\) |
norman | \(\frac {-4 x^{2}+2 x}{\ln \left (x -1\right )-4}\) | \(19\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.39, size = 44, normalized size = 2.32 \begin {gather*} -\frac {2 \, {\left (2 \, x^{2} - x\right )}}{\log \left (x - 1\right ) - 4} + \frac {2 \, \log \left (x - 1\right )}{\log \left (x - 1\right ) - 4} - \frac {8}{\log \left (x - 1\right ) - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.50, size = 16, normalized size = 0.84 \begin {gather*} -\frac {2\,x\,\left (2\,x-1\right )}{\ln \left (x-1\right )-4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 14, normalized size = 0.74 \begin {gather*} \frac {- 4 x^{2} + 2 x}{\log {\left (x - 1 \right )} - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________