Optimal. Leaf size=35 \[ 3 \left (4 e^{2 x} x^2+\frac {x^2 (5+x)^2}{(-1+x)^2}+\frac {5}{\log (-4+x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.49, antiderivative size = 57, normalized size of antiderivative = 1.63, number of steps
used = 21, number of rules used = 10, integrand size = 108, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {6820, 6874,
37, 45, 2227, 2207, 2225, 2437, 2339, 30} \begin {gather*} 12 e^{2 x} x^2+\frac {75 x^2}{(1-x)^2}+3 x^2+36 x-\frac {102}{1-x}+\frac {33}{(1-x)^2}+\frac {15}{\log (x-4)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 37
Rule 45
Rule 2207
Rule 2225
Rule 2227
Rule 2339
Rule 2437
Rule 6820
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {6 x \left (-25-15 x+3 x^2+x^3+4 e^{2 x} (-1+x)^3 (1+x)\right )}{(-1+x)^3}-\frac {15}{(-4+x) \log ^2(-4+x)}\right ) \, dx\\ &=6 \int \frac {x \left (-25-15 x+3 x^2+x^3+4 e^{2 x} (-1+x)^3 (1+x)\right )}{(-1+x)^3} \, dx-15 \int \frac {1}{(-4+x) \log ^2(-4+x)} \, dx\\ &=6 \int \left (-\frac {25 x}{(-1+x)^3}-\frac {15 x^2}{(-1+x)^3}+\frac {3 x^3}{(-1+x)^3}+\frac {x^4}{(-1+x)^3}+4 e^{2 x} x (1+x)\right ) \, dx-15 \text {Subst}\left (\int \frac {1}{x \log ^2(x)} \, dx,x,-4+x\right )\\ &=6 \int \frac {x^4}{(-1+x)^3} \, dx-15 \text {Subst}\left (\int \frac {1}{x^2} \, dx,x,\log (-4+x)\right )+18 \int \frac {x^3}{(-1+x)^3} \, dx+24 \int e^{2 x} x (1+x) \, dx-90 \int \frac {x^2}{(-1+x)^3} \, dx-150 \int \frac {x}{(-1+x)^3} \, dx\\ &=\frac {75 x^2}{(1-x)^2}+\frac {15}{\log (-4+x)}+6 \int \left (3+\frac {1}{(-1+x)^3}+\frac {4}{(-1+x)^2}+\frac {6}{-1+x}+x\right ) \, dx+18 \int \left (1+\frac {1}{(-1+x)^3}+\frac {3}{(-1+x)^2}+\frac {3}{-1+x}\right ) \, dx+24 \int \left (e^{2 x} x+e^{2 x} x^2\right ) \, dx-90 \int \left (\frac {1}{(-1+x)^3}+\frac {2}{(-1+x)^2}+\frac {1}{-1+x}\right ) \, dx\\ &=\frac {33}{(1-x)^2}-\frac {102}{1-x}+36 x+3 x^2+\frac {75 x^2}{(1-x)^2}+\frac {15}{\log (-4+x)}+24 \int e^{2 x} x \, dx+24 \int e^{2 x} x^2 \, dx\\ &=\frac {33}{(1-x)^2}-\frac {102}{1-x}+36 x+12 e^{2 x} x+3 x^2+12 e^{2 x} x^2+\frac {75 x^2}{(1-x)^2}+\frac {15}{\log (-4+x)}-12 \int e^{2 x} \, dx-24 \int e^{2 x} x \, dx\\ &=-6 e^{2 x}+\frac {33}{(1-x)^2}-\frac {102}{1-x}+36 x+3 x^2+12 e^{2 x} x^2+\frac {75 x^2}{(1-x)^2}+\frac {15}{\log (-4+x)}+12 \int e^{2 x} \, dx\\ &=\frac {33}{(1-x)^2}-\frac {102}{1-x}+36 x+3 x^2+12 e^{2 x} x^2+\frac {75 x^2}{(1-x)^2}+\frac {15}{\log (-4+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.95, size = 41, normalized size = 1.17 \begin {gather*} \frac {108}{(-1+x)^2}+\frac {252}{-1+x}+36 x+3 x^2+12 e^{2 x} x^2+\frac {15}{\log (-4+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 41, normalized size = 1.17
method | result | size |
default | \(\frac {15}{\ln \left (x -4\right )}+12 \,{\mathrm e}^{2 x} x^{2}+3 x^{2}+36 x +\frac {252}{x -1}+\frac {108}{\left (x -1\right )^{2}}\) | \(41\) |
risch | \(\frac {12 \,{\mathrm e}^{2 x} x^{4}-24 \,{\mathrm e}^{2 x} x^{3}+3 x^{4}+12 \,{\mathrm e}^{2 x} x^{2}+30 x^{3}-69 x^{2}+288 x -144}{x^{2}-2 x +1}+\frac {15}{\ln \left (x -4\right )}\) | \(67\) |
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. 69 vs.
\(2 (33) = 66\).
time = 0.30, size = 69, normalized size = 1.97 \begin {gather*} \frac {3 \, {\left (5 \, x^{2} + {\left (x^{4} + 10 \, x^{3} - 23 \, x^{2} + 4 \, {\left (x^{4} - 2 \, x^{3} + x^{2}\right )} e^{\left (2 \, x\right )} + 96 \, x - 48\right )} \log \left (x - 4\right ) - 10 \, x + 5\right )}}{{\left (x^{2} - 2 \, x + 1\right )} \log \left (x - 4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 69 vs.
\(2 (33) = 66\).
time = 0.43, size = 69, normalized size = 1.97 \begin {gather*} \frac {3 \, {\left (5 \, x^{2} + {\left (x^{4} + 10 \, x^{3} - 23 \, x^{2} + 4 \, {\left (x^{4} - 2 \, x^{3} + x^{2}\right )} e^{\left (2 \, x\right )} + 96 \, x - 48\right )} \log \left (x - 4\right ) - 10 \, x + 5\right )}}{{\left (x^{2} - 2 \, x + 1\right )} \log \left (x - 4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.19, size = 37, normalized size = 1.06 \begin {gather*} 12 x^{2} e^{2 x} + 3 x^{2} + 36 x + \frac {252 x - 144}{x^{2} - 2 x + 1} + \frac {15}{\log {\left (x - 4 \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 157 vs.
\(2 (33) = 66\).
time = 0.45, size = 157, normalized size = 4.49 \begin {gather*} \frac {3 \, {\left (4 \, {\left (x - 4\right )}^{4} e^{\left (2 \, x\right )} \log \left (x - 4\right ) + {\left (x - 4\right )}^{4} \log \left (x - 4\right ) + 56 \, {\left (x - 4\right )}^{3} e^{\left (2 \, x\right )} \log \left (x - 4\right ) + 26 \, {\left (x - 4\right )}^{3} \log \left (x - 4\right ) + 292 \, {\left (x - 4\right )}^{2} e^{\left (2 \, x\right )} \log \left (x - 4\right ) + 129 \, {\left (x - 4\right )}^{2} \log \left (x - 4\right ) + 672 \, {\left (x - 4\right )} e^{\left (2 \, x\right )} \log \left (x - 4\right ) + 5 \, {\left (x - 4\right )}^{2} + 264 \, {\left (x - 4\right )} \log \left (x - 4\right ) + 576 \, e^{\left (2 \, x\right )} \log \left (x - 4\right ) + 30 \, x + 288 \, \log \left (x - 4\right ) - 75\right )}}{{\left (x - 4\right )}^{2} \log \left (x - 4\right ) + 6 \, {\left (x - 4\right )} \log \left (x - 4\right ) + 9 \, \log \left (x - 4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.22, size = 42, normalized size = 1.20 \begin {gather*} 36\,x+\frac {252\,x-144}{x^2-2\,x+1}+12\,x^2\,{\mathrm {e}}^{2\,x}+\frac {15}{\ln \left (x-4\right )}+3\,x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________