Optimal. Leaf size=27 \[ \frac {\log \left ((-1+x)^2+\frac {3}{x}-x-x (2+2 x)\right )}{x} \]
________________________________________________________________________________________
Rubi [A] time = 6.09, antiderivative size = 20, normalized size of antiderivative = 0.74, number of steps used = 26, number of rules used = 11, integrand size = 66, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {6741, 6742, 2100, 2081, 2079, 800, 634, 618, 206, 628, 2525} \begin {gather*} \frac {\log \left (-x^2-5 x+\frac {3}{x}+1\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 800
Rule 2079
Rule 2081
Rule 2100
Rule 2525
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-3-5 x^2-2 x^3-\left (3+x-5 x^2-x^3\right ) \log \left (\frac {3+x-5 x^2-x^3}{x}\right )}{x^2 \left (3+x-5 x^2-x^3\right )} \, dx\\ &=\int \left (\frac {3+5 x^2+2 x^3}{x^2 \left (-3-x+5 x^2+x^3\right )}-\frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x^2}\right ) \, dx\\ &=\int \frac {3+5 x^2+2 x^3}{x^2 \left (-3-x+5 x^2+x^3\right )} \, dx-\int \frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x^2} \, dx\\ &=\frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x}-\int \frac {-3-5 x^2-2 x^3}{x^2 \left (3+x-5 x^2-x^3\right )} \, dx+\int \left (-\frac {1}{x^2}+\frac {1}{3 x}+\frac {31+4 x-x^2}{3 \left (-3-x+5 x^2+x^3\right )}\right ) \, dx\\ &=\frac {1}{x}+\frac {\log (x)}{3}+\frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x}+\frac {1}{3} \int \frac {31+4 x-x^2}{-3-x+5 x^2+x^3} \, dx-\int \left (-\frac {1}{x^2}+\frac {1}{3 x}+\frac {31+4 x-x^2}{3 \left (-3-x+5 x^2+x^3\right )}\right ) \, dx\\ &=\frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x}-\frac {1}{9} \log \left (-3-x+5 x^2+x^3\right )+\frac {1}{9} \int \frac {92+22 x}{-3-x+5 x^2+x^3} \, dx-\frac {1}{3} \int \frac {31+4 x-x^2}{-3-x+5 x^2+x^3} \, dx\\ &=\frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x}-\frac {1}{9} \int \frac {92+22 x}{-3-x+5 x^2+x^3} \, dx+\frac {1}{9} \operatorname {Subst}\left (\int \frac {\frac {166}{3}+22 x}{\frac {214}{27}-\frac {28 x}{3}+x^3} \, dx,x,\frac {5}{3}+x\right )\\ &=\frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x}+\frac {1}{9} \operatorname {Subst}\left (\int \frac {\frac {166}{3}+22 x}{\left (\frac {28+\left (107-3 i \sqrt {1167}\right )^{2/3}}{3 \sqrt [3]{107-3 i \sqrt {1167}}}+x\right ) \left (\frac {1}{9} \left (-28+\frac {784}{\left (107-3 i \sqrt {1167}\right )^{2/3}}+\left (107-3 i \sqrt {1167}\right )^{2/3}\right )-\frac {\left (28+\left (107-3 i \sqrt {1167}\right )^{2/3}\right ) x}{3 \sqrt [3]{107-3 i \sqrt {1167}}}+x^2\right )} \, dx,x,\frac {5}{3}+x\right )-\frac {1}{9} \operatorname {Subst}\left (\int \frac {\frac {166}{3}+22 x}{\frac {214}{27}-\frac {28 x}{3}+x^3} \, dx,x,\frac {5}{3}+x\right )\\ &=\frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x}-\frac {1}{9} \operatorname {Subst}\left (\int \frac {\frac {166}{3}+22 x}{\left (\frac {28+\left (107-3 i \sqrt {1167}\right )^{2/3}}{3 \sqrt [3]{107-3 i \sqrt {1167}}}+x\right ) \left (\frac {1}{9} \left (-28+\frac {784}{\left (107-3 i \sqrt {1167}\right )^{2/3}}+\left (107-3 i \sqrt {1167}\right )^{2/3}\right )-\frac {\left (28+\left (107-3 i \sqrt {1167}\right )^{2/3}\right ) x}{3 \sqrt [3]{107-3 i \sqrt {1167}}}+x^2\right )} \, dx,x,\frac {5}{3}+x\right )+\frac {1}{9} \operatorname {Subst}\left (\int \left (\frac {6 \left (107-3 i \sqrt {1167}\right )^{2/3} \left (-308+83 \sqrt [3]{107-3 i \sqrt {1167}}-11 \left (107-3 i \sqrt {1167}\right )^{2/3}\right )}{\left (784+28 \left (107-3 i \sqrt {1167}\right )^{2/3}+\left (107-3 i \sqrt {1167}\right )^{4/3}\right ) \left (28+\left (107-3 i \sqrt {1167}\right )^{2/3}+3 \sqrt [3]{107-3 i \sqrt {1167}} x\right )}+\frac {6 \left (107-3 i \sqrt {1167}\right )^{2/3} \left (26386-498 i \sqrt {1167}-308 \left (107-3 i \sqrt {1167}\right )^{2/3}+\sqrt [3]{107-3 i \sqrt {1167}} \left (5825-33 i \sqrt {1167}\right )+3 \left (1177-33 i \sqrt {1167}+308 \sqrt [3]{107-3 i \sqrt {1167}}-83 \left (107-3 i \sqrt {1167}\right )^{2/3}\right ) x\right )}{\left (784+28 \left (107-3 i \sqrt {1167}\right )^{2/3}+\left (107-3 i \sqrt {1167}\right )^{4/3}\right ) \left (784-28 \left (107-3 i \sqrt {1167}\right )^{2/3}+\left (107-3 i \sqrt {1167}\right )^{4/3}-3 \left (107-3 i \sqrt {1167}+28 \sqrt [3]{107-3 i \sqrt {1167}}\right ) x+9 \left (107-3 i \sqrt {1167}\right )^{2/3} x^2\right )}\right ) \, dx,x,\frac {5}{3}+x\right )\\ &=\text {Rest of rules removed due to large latex content} \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 20, normalized size = 0.74 \begin {gather*} \frac {\log \left (1+\frac {3}{x}-5 x-x^2\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.86, size = 23, normalized size = 0.85 \begin {gather*} \frac {\log \left (-\frac {x^{3} + 5 \, x^{2} - x - 3}{x}\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 23, normalized size = 0.85 \begin {gather*} \frac {\log \left (-\frac {x^{3} + 5 \, x^{2} - x - 3}{x}\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 23, normalized size = 0.85
method | result | size |
default | \(\frac {\ln \left (\frac {-x^{3}-5 x^{2}+x +3}{x}\right )}{x}\) | \(23\) |
norman | \(\frac {\ln \left (\frac {-x^{3}-5 x^{2}+x +3}{x}\right )}{x}\) | \(23\) |
risch | \(\frac {\ln \left (\frac {-x^{3}-5 x^{2}+x +3}{x}\right )}{x}\) | \(23\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 23, normalized size = 0.85 \begin {gather*} \frac {\log \left (-x^{3} - 5 \, x^{2} + x + 3\right ) - \log \relax (x)}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.40, size = 20, normalized size = 0.74 \begin {gather*} \frac {\ln \left (\frac {3}{x}-5\,x-x^2+1\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.18, size = 15, normalized size = 0.56 \begin {gather*} \frac {\log {\left (\frac {- x^{3} - 5 x^{2} + x + 3}{x} \right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________