Optimal. Leaf size=31 \[ 3+e^3+\frac {x^2}{-x+x^2+\log (2)}-x \left (4+\log \left (\frac {5}{x^2}\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.64, antiderivative size = 410, normalized size of antiderivative = 13.23, number of steps used = 26, number of rules used = 13, integrand size = 106, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.123, Rules used = {6688, 6742, 738, 773, 634, 618, 204, 628, 800, 614, 722, 638, 2295} \begin {gather*} \frac {2 (1-2 x) \log ^2(2)}{(1-\log (16)) \left (-x^2+x-\log (2)\right )}+\frac {4 x^2 (x-\log (4))}{(1-\log (16)) \left (-x^2+x-\log (2)\right )}-\frac {2 x^2}{1-\log (16)}-x \log \left (\frac {5}{x^2}\right )-\frac {x (3+\log (16)) (x-\log (4))}{(1-\log (16)) \left (-x^2+x-\log (2)\right )}-\frac {(2-\log (256)) \log \left (-x^2+x-\log (2)\right )}{1-\log (16)}+2 \log \left (-x^2+x-\log (2)\right )+\frac {\log (64) (x-\log (4))}{(1-\log (16)) \left (-x^2+x-\log (2)\right )}-\frac {2 x^3 (x-\log (4))}{(1-\log (16)) \left (-x^2+x-\log (2)\right )}-2 x-\frac {2 x (2-\log (64))}{1-\log (16)}+\frac {4 x}{1-\log (16)}+\frac {8 \log ^2(2) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {\log (16)-1}}\right )}{(\log (16)-1)^{3/2}}-\frac {2 (2+\log (4) \log (64)-\log (4096)) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {\log (16)-1}}\right )}{(\log (16)-1)^{3/2}}-\frac {2 \log (64) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {\log (16)-1}}\right )}{(\log (16)-1)^{3/2}}+\frac {4 (1-\log (64)) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {\log (16)-1}}\right )}{(\log (16)-1)^{3/2}}+\frac {4 \log (2) (3+\log (16)) \tan ^{-1}\left (\frac {1-2 x}{\sqrt {\log (16)-1}}\right )}{(\log (16)-1)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 614
Rule 618
Rule 628
Rule 634
Rule 638
Rule 722
Rule 738
Rule 773
Rule 800
Rule 2295
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4 x^3-2 x^4-2 \log ^2(2)-x^2 (3+\log (16))+x \log (64)-\left (-x+x^2+\log (2)\right )^2 \log \left (\frac {5}{x^2}\right )}{\left (x-x^2-\log (2)\right )^2} \, dx\\ &=\int \left (\frac {4 x^3}{\left (-x+x^2+\log (2)\right )^2}-\frac {2 x^4}{\left (-x+x^2+\log (2)\right )^2}-\frac {2 \log ^2(2)}{\left (-x+x^2+\log (2)\right )^2}-\frac {x^2 (3+\log (16))}{\left (-x+x^2+\log (2)\right )^2}+\frac {x \log (64)}{\left (-x+x^2+\log (2)\right )^2}-\log \left (\frac {5}{x^2}\right )\right ) \, dx\\ &=-\left (2 \int \frac {x^4}{\left (-x+x^2+\log (2)\right )^2} \, dx\right )+4 \int \frac {x^3}{\left (-x+x^2+\log (2)\right )^2} \, dx-\left (2 \log ^2(2)\right ) \int \frac {1}{\left (-x+x^2+\log (2)\right )^2} \, dx+(-3-\log (16)) \int \frac {x^2}{\left (-x+x^2+\log (2)\right )^2} \, dx+\log (64) \int \frac {x}{\left (-x+x^2+\log (2)\right )^2} \, dx-\int \log \left (\frac {5}{x^2}\right ) \, dx\\ &=-2 x+\frac {2 (1-2 x) \log ^2(2)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 x^2 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 x^3 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {x (x-\log (4)) (3+\log (16))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {(x-\log (4)) \log (64)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-x \log \left (\frac {5}{x^2}\right )+\frac {2 \int \frac {x^2 (-2 x+\log (64))}{-x+x^2+\log (2)} \, dx}{1-\log (16)}-\frac {4 \int \frac {x (-x+\log (16))}{-x+x^2+\log (2)} \, dx}{1-\log (16)}+\frac {\left (4 \log ^2(2)\right ) \int \frac {1}{-x+x^2+\log (2)} \, dx}{1-\log (16)}+\frac {(2 \log (2) (3+\log (16))) \int \frac {1}{-x+x^2+\log (2)} \, dx}{1-\log (16)}-\frac {\log (64) \int \frac {1}{-x+x^2+\log (2)} \, dx}{1-\log (16)}\\ &=-2 x+\frac {4 x}{1-\log (16)}+\frac {2 (1-2 x) \log ^2(2)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 x^2 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 x^3 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {x (x-\log (4)) (3+\log (16))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {(x-\log (4)) \log (64)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-x \log \left (\frac {5}{x^2}\right )+\frac {2 \int \left (-2-2 x+\log (64)-\frac {-\log (2) (2-\log (64))+x (2-\log (256))}{-x+x^2+\log (2)}\right ) \, dx}{1-\log (16)}-\frac {4 \int \frac {\log (2)+x (-1+\log (16))}{-x+x^2+\log (2)} \, dx}{1-\log (16)}-\frac {\left (8 \log ^2(2)\right ) \operatorname {Subst}\left (\int \frac {1}{1-x^2-4 \log (2)} \, dx,x,-1+2 x\right )}{1-\log (16)}-\frac {(4 \log (2) (3+\log (16))) \operatorname {Subst}\left (\int \frac {1}{1-x^2-4 \log (2)} \, dx,x,-1+2 x\right )}{1-\log (16)}+\frac {(2 \log (64)) \operatorname {Subst}\left (\int \frac {1}{1-x^2-4 \log (2)} \, dx,x,-1+2 x\right )}{1-\log (16)}\\ &=-2 x+\frac {4 x}{1-\log (16)}-\frac {2 x^2}{1-\log (16)}+\frac {2 (1-2 x) \log ^2(2)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 x^2 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 x^3 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {8 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log ^2(2)}{(-1+\log (16))^{3/2}}-\frac {x (x-\log (4)) (3+\log (16))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (2) (3+\log (16))}{(-1+\log (16))^{3/2}}-\frac {2 x (2-\log (64))}{1-\log (16)}+\frac {(x-\log (4)) \log (64)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (64)}{(-1+\log (16))^{3/2}}-x \log \left (\frac {5}{x^2}\right )+2 \int \frac {-1+2 x}{-x+x^2+\log (2)} \, dx-\frac {2 \int \frac {-\log (2) (2-\log (64))+x (2-\log (256))}{-x+x^2+\log (2)} \, dx}{1-\log (16)}+\frac {(2 (1-\log (64))) \int \frac {1}{-x+x^2+\log (2)} \, dx}{1-\log (16)}\\ &=-2 x+\frac {4 x}{1-\log (16)}-\frac {2 x^2}{1-\log (16)}+\frac {2 (1-2 x) \log ^2(2)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 x^2 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 x^3 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {8 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log ^2(2)}{(-1+\log (16))^{3/2}}-\frac {x (x-\log (4)) (3+\log (16))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (2) (3+\log (16))}{(-1+\log (16))^{3/2}}-\frac {2 x (2-\log (64))}{1-\log (16)}+\frac {(x-\log (4)) \log (64)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (64)}{(-1+\log (16))^{3/2}}-x \log \left (\frac {5}{x^2}\right )+2 \log \left (x-x^2-\log (2)\right )-\frac {(4 (1-\log (64))) \operatorname {Subst}\left (\int \frac {1}{1-x^2-4 \log (2)} \, dx,x,-1+2 x\right )}{1-\log (16)}-\frac {(2-\log (256)) \int \frac {-1+2 x}{-x+x^2+\log (2)} \, dx}{1-\log (16)}-\frac {(2+\log (4) \log (64)-\log (4096)) \int \frac {1}{-x+x^2+\log (2)} \, dx}{1-\log (16)}\\ &=-2 x+\frac {4 x}{1-\log (16)}-\frac {2 x^2}{1-\log (16)}+\frac {2 (1-2 x) \log ^2(2)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 x^2 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 x^3 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {8 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log ^2(2)}{(-1+\log (16))^{3/2}}-\frac {x (x-\log (4)) (3+\log (16))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (2) (3+\log (16))}{(-1+\log (16))^{3/2}}+\frac {4 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) (1-\log (64))}{(-1+\log (16))^{3/2}}-\frac {2 x (2-\log (64))}{1-\log (16)}+\frac {(x-\log (4)) \log (64)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (64)}{(-1+\log (16))^{3/2}}-x \log \left (\frac {5}{x^2}\right )+2 \log \left (x-x^2-\log (2)\right )-\frac {(2-\log (256)) \log \left (x-x^2-\log (2)\right )}{1-\log (16)}+\frac {(2 (2+\log (4) \log (64)-\log (4096))) \operatorname {Subst}\left (\int \frac {1}{1-x^2-4 \log (2)} \, dx,x,-1+2 x\right )}{1-\log (16)}\\ &=-2 x+\frac {4 x}{1-\log (16)}-\frac {2 x^2}{1-\log (16)}+\frac {2 (1-2 x) \log ^2(2)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 x^2 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 x^3 (x-\log (4))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {8 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log ^2(2)}{(-1+\log (16))^{3/2}}-\frac {x (x-\log (4)) (3+\log (16))}{\left (x-x^2-\log (2)\right ) (1-\log (16))}+\frac {4 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (2) (3+\log (16))}{(-1+\log (16))^{3/2}}+\frac {4 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) (1-\log (64))}{(-1+\log (16))^{3/2}}-\frac {2 x (2-\log (64))}{1-\log (16)}+\frac {(x-\log (4)) \log (64)}{\left (x-x^2-\log (2)\right ) (1-\log (16))}-\frac {2 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) \log (64)}{(-1+\log (16))^{3/2}}-\frac {2 \tan ^{-1}\left (\frac {1-2 x}{\sqrt {-1+\log (16)}}\right ) (2+\log (4) \log (64)-\log (4096))}{(-1+\log (16))^{3/2}}-x \log \left (\frac {5}{x^2}\right )+2 \log \left (x-x^2-\log (2)\right )-\frac {(2-\log (256)) \log \left (x-x^2-\log (2)\right )}{1-\log (16)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.21, size = 69, normalized size = 2.23 \begin {gather*} -4 x-\frac {x-4 \log ^2(2)+8 x \log ^2(2)-x (1+\log (4)) \log (16)-\log (2) (1+\log (16))+\log (4) \log (64)}{\left (-x+x^2+\log (2)\right ) (-1+\log (16))}-x \log \left (\frac {5}{x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.97, size = 55, normalized size = 1.77 \begin {gather*} -\frac {4 \, x^{3} - 4 \, x^{2} + {\left (4 \, x + 1\right )} \log \relax (2) + {\left (x^{3} - x^{2} + x \log \relax (2)\right )} \log \left (\frac {5}{x^{2}}\right ) - x}{x^{2} - x + \log \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 32, normalized size = 1.03 \begin {gather*} -x {\left (\log \relax (5) + 4\right )} + x \log \left (x^{2}\right ) + \frac {x - \log \relax (2)}{x^{2} - x + \log \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.27, size = 32, normalized size = 1.03
method | result | size |
derivativedivides | \(-x \ln \relax (5)-x \ln \left (\frac {1}{x^{2}}\right )-4 x +\frac {1}{\frac {\ln \relax (2)}{x^{2}}-\frac {1}{x}+1}\) | \(32\) |
default | \(-x \ln \relax (5)-x \ln \left (\frac {1}{x^{2}}\right )-4 x +\frac {1}{\frac {\ln \relax (2)}{x^{2}}-\frac {1}{x}+1}\) | \(32\) |
risch | \(-x \ln \left (\frac {5}{x^{2}}\right )-\frac {4 x^{3}+4 x \ln \relax (2)-4 x^{2}+\ln \relax (2)-x}{\ln \relax (2)+x^{2}-x}\) | \(45\) |
norman | \(\frac {x^{2} \ln \left (\frac {5}{x^{2}}\right )+\left (5-4 \ln \relax (2)\right ) x -4 x^{3}-\ln \left (\frac {5}{x^{2}}\right ) x^{3}-\ln \relax (2) \ln \left (\frac {5}{x^{2}}\right ) x -5 \ln \relax (2)}{\ln \relax (2)+x^{2}-x}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.06, size = 243, normalized size = 7.84 \begin {gather*} -2 \, {\left (\frac {2 \, x - 1}{x^{2} {\left (4 \, \log \relax (2) - 1\right )} - x {\left (4 \, \log \relax (2) - 1\right )} + 4 \, \log \relax (2)^{2} - \log \relax (2)} + \frac {4 \, \arctan \left (\frac {2 \, x - 1}{\sqrt {4 \, \log \relax (2) - 1}}\right )}{{\left (4 \, \log \relax (2) - 1\right )}^{\frac {3}{2}}}\right )} \log \relax (2)^{2} + \frac {8 \, \arctan \left (\frac {2 \, x - 1}{\sqrt {4 \, \log \relax (2) - 1}}\right ) \log \relax (2)^{2}}{{\left (4 \, \log \relax (2) - 1\right )}^{\frac {3}{2}}} - \frac {{\left (4 \, {\left (\log \relax (5) + 4\right )} \log \relax (2) - \log \relax (5) - 4\right )} x^{3} - {\left (4 \, {\left (\log \relax (5) + 4\right )} \log \relax (2) - \log \relax (5) - 4\right )} x^{2} + {\left (4 \, {\left (\log \relax (5) + 3\right )} \log \relax (2)^{2} - {\left (\log \relax (5) + 8\right )} \log \relax (2) + 1\right )} x + 6 \, \log \relax (2)^{2} - 2 \, {\left (x^{3} {\left (4 \, \log \relax (2) - 1\right )} - x^{2} {\left (4 \, \log \relax (2) - 1\right )} + {\left (4 \, \log \relax (2)^{2} - \log \relax (2)\right )} x\right )} \log \relax (x) - \log \relax (2)}{x^{2} {\left (4 \, \log \relax (2) - 1\right )} - x {\left (4 \, \log \relax (2) - 1\right )} + 4 \, \log \relax (2)^{2} - \log \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.90, size = 239, normalized size = 7.71 \begin {gather*} \left (\sum _{k=1}^4\ln \left (\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\,\ln \relax (2)\,2-\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\,x\,2-\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\,{\ln \relax (2)}^2\,14+\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\,{\ln \relax (2)}^3\,24-4\,x\,{\ln \relax (2)}^2+8\,x\,{\ln \relax (2)}^3+{\ln \relax (2)}^2+\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\,x\,\ln \relax (2)\,16-\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\,x\,{\ln \relax (2)}^2\,36+\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\,x\,{\ln \relax (2)}^3\,16\right )\,\mathrm {root}\left ({\ln \relax (2)}^2+16\,{\ln \relax (2)}^4-8\,{\ln \relax (2)}^3,z,k\right )\right )-x\,\ln \left (\frac {1}{x^2}\right )-4\,x-x\,\ln \relax (5) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.37, size = 26, normalized size = 0.84 \begin {gather*} - x \log {\left (\frac {5}{x^{2}} \right )} - 4 x - \frac {- x + \log {\relax (2 )}}{x^{2} - x + \log {\relax (2 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________