Optimal. Leaf size=28 \[ \frac {1}{x^4}+\frac {5-e^x-x-\log \left (-x+x^3\right )}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.70, antiderivative size = 33, normalized size of antiderivative = 1.18, number of steps used = 16, number of rules used = 9, integrand size = 68, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {1593, 6725, 2197, 207, 266, 44, 325, 2525, 453} \begin {gather*} \frac {1}{x^4}-\frac {\log \left (-x \left (1-x^2\right )\right )}{x}-\frac {e^x}{x}+\frac {5}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 207
Rule 266
Rule 325
Rule 453
Rule 1593
Rule 2197
Rule 2525
Rule 6725
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4-4 x^2+6 x^3-8 x^5+e^x \left (-x^3+x^4+x^5-x^6\right )+\left (-x^3+x^5\right ) \log \left (-x+x^3\right )}{x^5 \left (-1+x^2\right )} \, dx\\ &=\int \left (-\frac {e^x (-1+x)}{x^2}-\frac {8}{-1+x^2}+\frac {4}{x^5 \left (-1+x^2\right )}-\frac {4}{x^3 \left (-1+x^2\right )}+\frac {6}{x^2 \left (-1+x^2\right )}+\frac {\log \left (x \left (-1+x^2\right )\right )}{x^2}\right ) \, dx\\ &=4 \int \frac {1}{x^5 \left (-1+x^2\right )} \, dx-4 \int \frac {1}{x^3 \left (-1+x^2\right )} \, dx+6 \int \frac {1}{x^2 \left (-1+x^2\right )} \, dx-8 \int \frac {1}{-1+x^2} \, dx-\int \frac {e^x (-1+x)}{x^2} \, dx+\int \frac {\log \left (x \left (-1+x^2\right )\right )}{x^2} \, dx\\ &=\frac {6}{x}-\frac {e^x}{x}+8 \tanh ^{-1}(x)-\frac {\log \left (-x \left (1-x^2\right )\right )}{x}+2 \operatorname {Subst}\left (\int \frac {1}{(-1+x) x^3} \, dx,x,x^2\right )-2 \operatorname {Subst}\left (\int \frac {1}{(-1+x) x^2} \, dx,x,x^2\right )+6 \int \frac {1}{-1+x^2} \, dx+\int \frac {-1+3 x^2}{x^2 \left (-1+x^2\right )} \, dx\\ &=\frac {5}{x}-\frac {e^x}{x}+2 \tanh ^{-1}(x)-\frac {\log \left (-x \left (1-x^2\right )\right )}{x}+2 \int \frac {1}{-1+x^2} \, dx-2 \operatorname {Subst}\left (\int \left (\frac {1}{-1+x}-\frac {1}{x^2}-\frac {1}{x}\right ) \, dx,x,x^2\right )+2 \operatorname {Subst}\left (\int \left (\frac {1}{-1+x}-\frac {1}{x^3}-\frac {1}{x^2}-\frac {1}{x}\right ) \, dx,x,x^2\right )\\ &=\frac {1}{x^4}+\frac {5}{x}-\frac {e^x}{x}-\frac {\log \left (-x \left (1-x^2\right )\right )}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 0.18, size = 50, normalized size = 1.79 \begin {gather*} \frac {1}{x^4}-\frac {1}{x}-\frac {e^x}{x}+6 \tanh ^{-1}(x)+\frac {6 \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};x^2\right )}{x}-\frac {\log \left (x \left (-1+x^2\right )\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.67, size = 30, normalized size = 1.07 \begin {gather*} -\frac {x^{3} e^{x} + x^{3} \log \left (x^{3} - x\right ) - 5 \, x^{3} - 1}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.48, size = 30, normalized size = 1.07 \begin {gather*} -\frac {x^{3} e^{x} + x^{3} \log \left (x^{3} - x\right ) - 5 \, x^{3} - 1}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 30, normalized size = 1.07
method | result | size |
default | \(-\frac {\ln \left (x^{3}-x \right )}{x}+\frac {5}{x}-\frac {{\mathrm e}^{x}}{x}+\frac {1}{x^{4}}\) | \(30\) |
risch | \(-\frac {\ln \left (x^{2}-1\right )}{x}-\frac {-i \pi \,x^{3} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (x^{2}-1\right )\right ) \mathrm {csgn}\left (i x \left (x^{2}-1\right )\right )+i \pi \,x^{3} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (x^{2}-1\right )\right )^{2}+i \pi \,x^{3} \mathrm {csgn}\left (i \left (x^{2}-1\right )\right ) \mathrm {csgn}\left (i x \left (x^{2}-1\right )\right )^{2}-i \pi \,x^{3} \mathrm {csgn}\left (i x \left (x^{2}-1\right )\right )^{3}+2 \,{\mathrm e}^{x} x^{3}+2 x^{3} \ln \relax (x )-10 x^{3}-2}{2 x^{4}}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.50, size = 60, normalized size = 2.14 \begin {gather*} -\frac {{\left (x + 1\right )} \log \left (x + 1\right ) - {\left (x - 1\right )} \log \left (x - 1\right ) + e^{x} + \log \relax (x) + 1}{x} + \frac {6}{x} - \frac {2}{x^{2}} + \frac {2 \, x^{2} + 1}{x^{4}} + \log \left (x + 1\right ) - \log \left (x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.42, size = 30, normalized size = 1.07 \begin {gather*} -\frac {x^3\,{\mathrm {e}}^x+x^3\,\ln \left (x^3-x\right )-5\,x^3-1}{x^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.40, size = 26, normalized size = 0.93 \begin {gather*} - \frac {e^{x}}{x} - \frac {\log {\left (x^{3} - x \right )}}{x} - \frac {- 5 x^{3} - 1}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________