Optimal. Leaf size=28 \[ \left (3+x^2\right ) \left (-4+e^x-x-\log (2)+\frac {x}{x-\log (4)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(267\) vs. \(2(28)=56\).
time = 0.68, antiderivative size = 267, normalized size of antiderivative = 9.54, number of steps
used = 22, number of rules used = 9, integrand size = 132, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.068, Rules used = {6, 27, 6874,
2227, 2225, 2207, 45, 712, 1864} \begin {gather*} -x^3+e^x x^2-\frac {3}{2} x^2 \log (16)+3 x^2 \log (4)-x^2 (3+\log (2))-3 x+3 e^x+\frac {3 \log ^4(4)}{x-\log (4)}-12 \log ^3(4) \log (x-\log (4))+\frac {2 (3+\log (2)) \log ^3(4)}{x-\log (4)}-12 x \log ^2(4)+2 \log (4) \left (3+9 \log ^2(4)+\log (4) (13+\log (16))\right ) \log (x-\log (4))-\log ^2(4) (8+7 \log (4)) \log (x-\log (4))-6 (3+\log (2)) \log ^2(4) \log (x-\log (4))+\frac {\log ^2(4) \left (3+4 \log ^2(4)+8 \log (4)\right )}{x-\log (4)}+\frac {3 \log ^2(4)}{x-\log (4)}+\frac {\log (4) \left (3-6 \log ^3(4)-\log ^2(4) (13+\log (16))-6 \log (4)\right )}{x-\log (4)}+13 x \log (4) \left (1+\log \left (4\ 2^{2/13}\right )\right )-2 x (3+\log (2)) \log (16)-3 \log (16) \log (x-\log (4)) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 6
Rule 27
Rule 45
Rule 712
Rule 1864
Rule 2207
Rule 2225
Rule 2227
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-3 x^2-3 x^4+x^3 (-6-2 \log (2))+\left (-3+6 x+13 x^2+6 x^3+4 x^2 \log (2)\right ) \log (4)+\left (-3-8 x-3 x^2-2 x \log (2)\right ) \log ^2(4)+e^x \left (3 x^2+2 x^3+x^4+\left (-6 x-4 x^2-2 x^3\right ) \log (4)+\left (3+2 x+x^2\right ) \log ^2(4)\right )}{x^2-2 x \log (4)+\log ^2(4)} \, dx\\ &=\int \frac {-3 x^2-3 x^4+x^3 (-6-2 \log (2))+\left (-3+6 x+13 x^2+6 x^3+4 x^2 \log (2)\right ) \log (4)+\left (-3-8 x-3 x^2-2 x \log (2)\right ) \log ^2(4)+e^x \left (3 x^2+2 x^3+x^4+\left (-6 x-4 x^2-2 x^3\right ) \log (4)+\left (3+2 x+x^2\right ) \log ^2(4)\right )}{(x-\log (4))^2} \, dx\\ &=\int \left (e^x \left (3+2 x+x^2\right )-\frac {3 x^2}{(x-\log (4))^2}-\frac {3 x^4}{(x-\log (4))^2}-\frac {2 x^3 (3+\log (2))}{(x-\log (4))^2}+\frac {\log ^2(4) \left (-3-3 x^2-x (8+\log (4))\right )}{(x-\log (4))^2}+\frac {\log (4) \left (-3+6 x+6 x^3+x^2 (13+\log (16))\right )}{(x-\log (4))^2}\right ) \, dx\\ &=-\left (3 \int \frac {x^2}{(x-\log (4))^2} \, dx\right )-3 \int \frac {x^4}{(x-\log (4))^2} \, dx-(2 (3+\log (2))) \int \frac {x^3}{(x-\log (4))^2} \, dx+\log (4) \int \frac {-3+6 x+6 x^3+x^2 (13+\log (16))}{(x-\log (4))^2} \, dx+\log ^2(4) \int \frac {-3-3 x^2-x (8+\log (4))}{(x-\log (4))^2} \, dx+\int e^x \left (3+2 x+x^2\right ) \, dx\\ &=-\left (3 \int \left (x^2+3 \log ^2(4)+\frac {4 \log ^3(4)}{x-\log (4)}+\frac {\log ^4(4)}{(x-\log (4))^2}+x \log (16)\right ) \, dx\right )-3 \int \left (1+\frac {\log ^2(4)}{(x-\log (4))^2}+\frac {\log (16)}{x-\log (4)}\right ) \, dx-(2 (3+\log (2))) \int \left (x+\frac {3 \log ^2(4)}{x-\log (4)}+\frac {\log ^3(4)}{(x-\log (4))^2}+\log (16)\right ) \, dx+\log (4) \int \left (6 x+\frac {2 \left (3+9 \log ^2(4)+\log (4) (13+\log (16))\right )}{x-\log (4)}+\frac {-3+6 \log (4)+6 \log ^3(4)+\log ^2(4) (13+\log (16))}{(x-\log (4))^2}+13 \left (1+\log \left (4\ 2^{2/13}\right )\right )\right ) \, dx+\log ^2(4) \int \left (-3+\frac {-8-7 \log (4)}{x-\log (4)}+\frac {-3-8 \log (4)-4 \log ^2(4)}{(x-\log (4))^2}\right ) \, dx+\int \left (3 e^x+2 e^x x+e^x x^2\right ) \, dx\\ &=-3 x-x^3-x^2 (3+\log (2))+3 x^2 \log (4)-12 x \log ^2(4)+\frac {3 \log ^2(4)}{x-\log (4)}+\frac {2 (3+\log (2)) \log ^3(4)}{x-\log (4)}+\frac {3 \log ^4(4)}{x-\log (4)}+\frac {\log ^2(4) \left (3+8 \log (4)+4 \log ^2(4)\right )}{x-\log (4)}-\frac {3}{2} x^2 \log (16)-2 x (3+\log (2)) \log (16)+\frac {\log (4) \left (3-6 \log (4)-6 \log ^3(4)-\log ^2(4) (13+\log (16))\right )}{x-\log (4)}+13 x \log (4) \left (1+\log \left (4\ 2^{2/13}\right )\right )-6 (3+\log (2)) \log ^2(4) \log (x-\log (4))-12 \log ^3(4) \log (x-\log (4))-\log ^2(4) (8+7 \log (4)) \log (x-\log (4))-3 \log (16) \log (x-\log (4))+2 \log (4) \left (3+9 \log ^2(4)+\log (4) (13+\log (16))\right ) \log (x-\log (4))+2 \int e^x x \, dx+3 \int e^x \, dx+\int e^x x^2 \, dx\\ &=3 e^x-3 x+2 e^x x+e^x x^2-x^3-x^2 (3+\log (2))+3 x^2 \log (4)-12 x \log ^2(4)+\frac {3 \log ^2(4)}{x-\log (4)}+\frac {2 (3+\log (2)) \log ^3(4)}{x-\log (4)}+\frac {3 \log ^4(4)}{x-\log (4)}+\frac {\log ^2(4) \left (3+8 \log (4)+4 \log ^2(4)\right )}{x-\log (4)}-\frac {3}{2} x^2 \log (16)-2 x (3+\log (2)) \log (16)+\frac {\log (4) \left (3-6 \log (4)-6 \log ^3(4)-\log ^2(4) (13+\log (16))\right )}{x-\log (4)}+13 x \log (4) \left (1+\log \left (4\ 2^{2/13}\right )\right )-6 (3+\log (2)) \log ^2(4) \log (x-\log (4))-12 \log ^3(4) \log (x-\log (4))-\log ^2(4) (8+7 \log (4)) \log (x-\log (4))-3 \log (16) \log (x-\log (4))+2 \log (4) \left (3+9 \log ^2(4)+\log (4) (13+\log (16))\right ) \log (x-\log (4))-2 \int e^x \, dx-2 \int e^x x \, dx\\ &=e^x-3 x+e^x x^2-x^3-x^2 (3+\log (2))+3 x^2 \log (4)-12 x \log ^2(4)+\frac {3 \log ^2(4)}{x-\log (4)}+\frac {2 (3+\log (2)) \log ^3(4)}{x-\log (4)}+\frac {3 \log ^4(4)}{x-\log (4)}+\frac {\log ^2(4) \left (3+8 \log (4)+4 \log ^2(4)\right )}{x-\log (4)}-\frac {3}{2} x^2 \log (16)-2 x (3+\log (2)) \log (16)+\frac {\log (4) \left (3-6 \log (4)-6 \log ^3(4)-\log ^2(4) (13+\log (16))\right )}{x-\log (4)}+13 x \log (4) \left (1+\log \left (4\ 2^{2/13}\right )\right )-6 (3+\log (2)) \log ^2(4) \log (x-\log (4))-12 \log ^3(4) \log (x-\log (4))-\log ^2(4) (8+7 \log (4)) \log (x-\log (4))-3 \log (16) \log (x-\log (4))+2 \log (4) \left (3+9 \log ^2(4)+\log (4) (13+\log (16))\right ) \log (x-\log (4))+2 \int e^x \, dx\\ &=3 e^x-3 x+e^x x^2-x^3-x^2 (3+\log (2))+3 x^2 \log (4)-12 x \log ^2(4)+\frac {3 \log ^2(4)}{x-\log (4)}+\frac {2 (3+\log (2)) \log ^3(4)}{x-\log (4)}+\frac {3 \log ^4(4)}{x-\log (4)}+\frac {\log ^2(4) \left (3+8 \log (4)+4 \log ^2(4)\right )}{x-\log (4)}-\frac {3}{2} x^2 \log (16)-2 x (3+\log (2)) \log (16)+\frac {\log (4) \left (3-6 \log (4)-6 \log ^3(4)-\log ^2(4) (13+\log (16))\right )}{x-\log (4)}+13 x \log (4) \left (1+\log \left (4\ 2^{2/13}\right )\right )-6 (3+\log (2)) \log ^2(4) \log (x-\log (4))-12 \log ^3(4) \log (x-\log (4))-\log ^2(4) (8+7 \log (4)) \log (x-\log (4))-3 \log (16) \log (x-\log (4))+2 \log (4) \left (3+9 \log ^2(4)+\log (4) (13+\log (16))\right ) \log (x-\log (4))\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(70\) vs. \(2(28)=56\).
time = 0.13, size = 70, normalized size = 2.50 \begin {gather*} -x^3+e^x \left (3+x^2\right )-\frac {1}{2} x^2 (6+\log (4))+x \left (-3-2 \log ^2(4)+\log (4) (1+\log (16))\right )+\frac {-2 \log ^4(4)+\log ^3(4) (1+\log (16))+\log (64)}{x-\log (4)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(62\) vs.
\(2(27)=54\).
time = 0.21, size = 63, normalized size = 2.25
method | result | size |
risch | \(-x^{2} \ln \left (2\right )-x^{3}+2 x \ln \left (2\right )-3 x^{2}-3 x -\frac {4 \ln \left (2\right )^{3}}{\ln \left (2\right )-\frac {x}{2}}-\frac {3 \ln \left (2\right )}{\ln \left (2\right )-\frac {x}{2}}+\left (x^{2}+3\right ) {\mathrm e}^{x}\) | \(61\) |
default | \(-3 x +2 x \ln \left (2\right )-x^{2} \ln \left (2\right )+{\mathrm e}^{x} x^{2}+\frac {6 \ln \left (2\right )}{x -2 \ln \left (2\right )}+\frac {8 \ln \left (2\right )^{3}}{x -2 \ln \left (2\right )}-x^{3}-3 x^{2}+3 \,{\mathrm e}^{x}\) | \(63\) |
norman | \(\frac {x^{4}+\left (-\ln \left (2\right )+3\right ) x^{3}+\left (-2 \ln \left (2\right )^{2}-8 \ln \left (2\right )+3\right ) x^{2}-3 \,{\mathrm e}^{x} x -{\mathrm e}^{x} x^{3}+6 \,{\mathrm e}^{x} \ln \left (2\right )+2 x^{2} \ln \left (2\right ) {\mathrm e}^{x}-12 \ln \left (2\right )^{2}-6 \ln \left (2\right )}{2 \ln \left (2\right )-x}\) | \(79\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \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. 80 vs.
\(2 (27) = 54\).
time = 0.58, size = 80, normalized size = 2.86 \begin {gather*} -\frac {x^{4} + 3 \, x^{3} - 2 \, {\left (x^{2} - 2 \, x\right )} \log \left (2\right )^{2} - 8 \, \log \left (2\right )^{3} + 3 \, x^{2} - {\left (x^{3} - 2 \, {\left (x^{2} + 3\right )} \log \left (2\right ) + 3 \, x\right )} e^{x} - {\left (x^{3} + 8 \, x^{2} + 6 \, x + 6\right )} \log \left (2\right )}{x - 2 \, \log \left (2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 48 vs.
\(2 (22) = 44\).
time = 0.17, size = 48, normalized size = 1.71 \begin {gather*} - x^{3} - x^{2} \left (\log {\left (2 \right )} + 3\right ) - x \left (3 - 2 \log {\left (2 \right )}\right ) + \left (x^{2} + 3\right ) e^{x} - \frac {- 6 \log {\left (2 \right )} - 8 \log {\left (2 \right )}^{3}}{x - 2 \log {\left (2 \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. 96 vs.
\(2 (27) = 54\).
time = 0.41, size = 96, normalized size = 3.43 \begin {gather*} -\frac {x^{4} - x^{3} e^{x} - x^{3} \log \left (2\right ) + 2 \, x^{2} e^{x} \log \left (2\right ) - 2 \, x^{2} \log \left (2\right )^{2} + 3 \, x^{3} - 8 \, x^{2} \log \left (2\right ) + 4 \, x \log \left (2\right )^{2} - 8 \, \log \left (2\right )^{3} + 3 \, x^{2} - 3 \, x e^{x} - 6 \, x \log \left (2\right ) + 6 \, e^{x} \log \left (2\right ) - 6 \, \log \left (2\right )}{x - 2 \, \log \left (2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.63, size = 67, normalized size = 2.39 \begin {gather*} x\,\left (26\,\ln \left (2\right )+8\,{\ln \left (2\right )}^2-4\,\ln \left (2\right )\,\left (2\,\ln \left (2\right )+6\right )-3\right )-x^2\,\left (\ln \left (2\right )+3\right )+{\mathrm {e}}^x\,\left (x^2+3\right )+\frac {6\,\ln \left (2\right )+8\,{\ln \left (2\right )}^3}{x-2\,\ln \left (2\right )}-x^3 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________