Optimal. Leaf size=28 \[ \left (3+x^2\right ) \left (-4+e^x-x-\log (2)+\frac {x}{x-\log (4)}\right ) \]
________________________________________________________________________________________
Rubi [B] time = 1.02, 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, 6742, 2196, 2194, 2176, 43, 698, 1850} \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 43
Rule 698
Rule 1850
Rule 2176
Rule 2194
Rule 2196
Rule 6742
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] time = 0.18, 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]
________________________________________________________________________________________
fricas [B] time = 0.79, size = 80, normalized size = 2.86 \begin {gather*} -\frac {x^{4} + 3 \, x^{3} - 2 \, {\left (x^{2} - 2 \, x\right )} \log \relax (2)^{2} - 8 \, \log \relax (2)^{3} + 3 \, x^{2} - {\left (x^{3} - 2 \, {\left (x^{2} + 3\right )} \log \relax (2) + 3 \, x\right )} e^{x} - {\left (x^{3} + 8 \, x^{2} + 6 \, x + 6\right )} \log \relax (2)}{x - 2 \, \log \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.33, size = 96, normalized size = 3.43 \begin {gather*} -\frac {x^{4} - x^{3} e^{x} - x^{3} \log \relax (2) + 2 \, x^{2} e^{x} \log \relax (2) - 2 \, x^{2} \log \relax (2)^{2} + 3 \, x^{3} - 8 \, x^{2} \log \relax (2) + 4 \, x \log \relax (2)^{2} - 8 \, \log \relax (2)^{3} + 3 \, x^{2} - 3 \, x e^{x} - 6 \, x \log \relax (2) + 6 \, e^{x} \log \relax (2) - 6 \, \log \relax (2)}{x - 2 \, \log \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.19, size = 61, normalized size = 2.18
method | result | size |
risch | \(-x^{2} \ln \relax (2)-x^{3}+2 x \ln \relax (2)-3 x^{2}-3 x -\frac {4 \ln \relax (2)^{3}}{\ln \relax (2)-\frac {x}{2}}-\frac {3 \ln \relax (2)}{\ln \relax (2)-\frac {x}{2}}+\left (x^{2}+3\right ) {\mathrm e}^{x}\) | \(61\) |
default | \(-3 x -x^{3}-3 x^{2}+3 \,{\mathrm e}^{x}+2 x \ln \relax (2)-x^{2} \ln \relax (2)+{\mathrm e}^{x} x^{2}+\frac {6 \ln \relax (2)}{x -2 \ln \relax (2)}+\frac {8 \ln \relax (2)^{3}}{x -2 \ln \relax (2)}\) | \(63\) |
norman | \(\frac {x^{4}+\left (-\ln \relax (2)+3\right ) x^{3}+\left (-2 \ln \relax (2)^{2}-8 \ln \relax (2)+3\right ) x^{2}-3 \,{\mathrm e}^{x} x -{\mathrm e}^{x} x^{3}+6 \,{\mathrm e}^{x} \ln \relax (2)+2 x^{2} \ln \relax (2) {\mathrm e}^{x}-12 \ln \relax (2)^{2}-6 \ln \relax (2)}{2 \ln \relax (2)-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*} 8 \, {\left (\frac {2 \, \log \relax (2)}{x - 2 \, \log \relax (2)} - \log \left (x - 2 \, \log \relax (2)\right )\right )} \log \relax (2)^{3} - 96 \, \log \relax (2)^{3} \log \left (x - 2 \, \log \relax (2)\right ) - x^{3} - 6 \, x^{2} \log \relax (2) - 4 \, {\left (4 \, \log \relax (2) \log \left (x - 2 \, \log \relax (2)\right ) + x - \frac {4 \, \log \relax (2)^{2}}{x - 2 \, \log \relax (2)}\right )} \log \relax (2)^{2} - 36 \, x \log \relax (2)^{2} + 32 \, {\left (\frac {2 \, \log \relax (2)}{x - 2 \, \log \relax (2)} - \log \left (x - 2 \, \log \relax (2)\right )\right )} \log \relax (2)^{2} - 24 \, \int \frac {e^{x}}{x^{3} - 6 \, x^{2} \log \relax (2) + 12 \, x \log \relax (2)^{2} - 8 \, \log \relax (2)^{3}}\,{d x} \log \relax (2)^{2} + \frac {48 \, \log \relax (2)^{4}}{x - 2 \, \log \relax (2)} - 72 \, \log \relax (2)^{2} \log \left (x - 2 \, \log \relax (2)\right ) - 3 \, x^{2} + 5 \, {\left (24 \, \log \relax (2)^{2} \log \left (x - 2 \, \log \relax (2)\right ) + x^{2} + 8 \, x \log \relax (2) - \frac {16 \, \log \relax (2)^{3}}{x - 2 \, \log \relax (2)}\right )} \log \relax (2) + 26 \, {\left (4 \, \log \relax (2) \log \left (x - 2 \, \log \relax (2)\right ) + x - \frac {4 \, \log \relax (2)^{2}}{x - 2 \, \log \relax (2)}\right )} \log \relax (2) - 24 \, x \log \relax (2) - 12 \, {\left (\frac {2 \, \log \relax (2)}{x - 2 \, \log \relax (2)} - \log \left (x - 2 \, \log \relax (2)\right )\right )} \log \relax (2) - \frac {48 \, E_{2}\left (-x + 2 \, \log \relax (2)\right ) \log \relax (2)^{2}}{x - 2 \, \log \relax (2)} + \frac {48 \, \log \relax (2)^{3}}{x - 2 \, \log \relax (2)} - 12 \, \log \relax (2) \log \left (x - 2 \, \log \relax (2)\right ) - 3 \, x + \frac {{\left (x^{4} - 4 \, x^{3} \log \relax (2) + {\left (4 \, \log \relax (2)^{2} + 3\right )} x^{2} - 12 \, x \log \relax (2)\right )} e^{x}}{x^{2} - 4 \, x \log \relax (2) + 4 \, \log \relax (2)^{2}} + \frac {24 \, \log \relax (2)^{2}}{x - 2 \, \log \relax (2)} + \frac {6 \, \log \relax (2)}{x - 2 \, \log \relax (2)} \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 \relax (2)+8\,{\ln \relax (2)}^2-4\,\ln \relax (2)\,\left (2\,\ln \relax (2)+6\right )-3\right )-x^2\,\left (\ln \relax (2)+3\right )+{\mathrm {e}}^x\,\left (x^2+3\right )+\frac {6\,\ln \relax (2)+8\,{\ln \relax (2)}^3}{x-2\,\ln \relax (2)}-x^3 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.30, size = 48, normalized size = 1.71 \begin {gather*} - x^{3} - x^{2} \left (\log {\relax (2 )} + 3\right ) - x \left (3 - 2 \log {\relax (2 )}\right ) + \left (x^{2} + 3\right ) e^{x} - \frac {- 6 \log {\relax (2 )} - 8 \log {\relax (2 )}^{3}}{x - 2 \log {\relax (2 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________