Optimal. Leaf size=24 \[ \frac {e^{4+x} (-4+x)}{x}+x+\frac {x}{x-\log (4)} \]
________________________________________________________________________________________
Rubi [A] time = 0.77, antiderivative size = 28, normalized size of antiderivative = 1.17, number of steps used = 12, number of rules used = 8, integrand size = 107, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {1594, 27, 6688, 2199, 2194, 2177, 2178, 683} \begin {gather*} x+e^{x+4}-\frac {4 e^{x+4}}{x}+\frac {\log (4)}{x-\log (4)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 683
Rule 1594
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {x^4+\left (-x^2-2 x^3\right ) \log (4)+x^2 \log ^2(4)+e^x \left (e^4 \left (4 x^2-4 x^3+x^4\right )+e^4 \left (-8 x+8 x^2-2 x^3\right ) \log (4)+e^4 \left (4-4 x+x^2\right ) \log ^2(4)\right )}{x^2 \left (x^2-2 x \log (4)+\log ^2(4)\right )} \, dx\\ &=\int \frac {x^4+\left (-x^2-2 x^3\right ) \log (4)+x^2 \log ^2(4)+e^x \left (e^4 \left (4 x^2-4 x^3+x^4\right )+e^4 \left (-8 x+8 x^2-2 x^3\right ) \log (4)+e^4 \left (4-4 x+x^2\right ) \log ^2(4)\right )}{x^2 (x-\log (4))^2} \, dx\\ &=\int \left (\frac {e^{4+x} (-2+x)^2}{x^2}+\frac {x^2-2 x \log (4)-(1-\log (4)) \log (4)}{(x-\log (4))^2}\right ) \, dx\\ &=\int \frac {e^{4+x} (-2+x)^2}{x^2} \, dx+\int \frac {x^2-2 x \log (4)-(1-\log (4)) \log (4)}{(x-\log (4))^2} \, dx\\ &=\int \left (e^{4+x}+\frac {4 e^{4+x}}{x^2}-\frac {4 e^{4+x}}{x}\right ) \, dx+\int \left (1-\frac {\log (4)}{(x-\log (4))^2}\right ) \, dx\\ &=x+\frac {\log (4)}{x-\log (4)}+4 \int \frac {e^{4+x}}{x^2} \, dx-4 \int \frac {e^{4+x}}{x} \, dx+\int e^{4+x} \, dx\\ &=e^{4+x}-\frac {4 e^{4+x}}{x}+x-4 e^4 \text {Ei}(x)+\frac {\log (4)}{x-\log (4)}+4 \int \frac {e^{4+x}}{x} \, dx\\ &=e^{4+x}-\frac {4 e^{4+x}}{x}+x+\frac {\log (4)}{x-\log (4)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 28, normalized size = 1.17 \begin {gather*} e^{4+x}-\frac {4 e^{4+x}}{x}+x+\frac {\log (4)}{x-\log (4)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.63, size = 52, normalized size = 2.17 \begin {gather*} \frac {x^{3} - {\left (2 \, {\left (x - 4\right )} e^{4} \log \relax (2) - {\left (x^{2} - 4 \, x\right )} e^{4}\right )} e^{x} - 2 \, {\left (x^{2} - x\right )} \log \relax (2)}{x^{2} - 2 \, x \log \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.22, size = 60, normalized size = 2.50 \begin {gather*} \frac {x^{3} + x^{2} e^{\left (x + 4\right )} - 2 \, x^{2} \log \relax (2) - 2 \, x e^{\left (x + 4\right )} \log \relax (2) - 4 \, x e^{\left (x + 4\right )} + 2 \, x \log \relax (2) + 8 \, e^{\left (x + 4\right )} \log \relax (2)}{x^{2} - 2 \, x \log \relax (2)} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 26, normalized size = 1.08
method | result | size |
risch | \(x -\frac {\ln \relax (2)}{\ln \relax (2)-\frac {x}{2}}+\frac {\left (x -4\right ) {\mathrm e}^{4+x}}{x}\) | \(26\) |
default | \(x +{\mathrm e}^{4} {\mathrm e}^{x}+\frac {2 \ln \relax (2)}{x -2 \ln \relax (2)}-\frac {4 \,{\mathrm e}^{4} {\mathrm e}^{x}}{x}\) | \(29\) |
norman | \(\frac {\left (4 \ln \relax (2)^{2}-2 \ln \relax (2)\right ) x +\left (2 \,{\mathrm e}^{4} \ln \relax (2)+4 \,{\mathrm e}^{4}\right ) x \,{\mathrm e}^{x}-x^{3}-x^{2} {\mathrm e}^{4} {\mathrm e}^{x}-8 \,{\mathrm e}^{4} \ln \relax (2) {\mathrm e}^{x}}{x \left (2 \ln \relax (2)-x \right )}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.65, size = 80, normalized size = 3.33 \begin {gather*} 4 \, {\left (\frac {2 \, \log \relax (2)}{x - 2 \, \log \relax (2)} - \log \left (x - 2 \, \log \relax (2)\right )\right )} \log \relax (2) + 4 \, \log \relax (2) \log \left (x - 2 \, \log \relax (2)\right ) + x + \frac {{\left (x e^{4} - 4 \, e^{4}\right )} e^{x}}{x} - \frac {8 \, \log \relax (2)^{2}}{x - 2 \, \log \relax (2)} + \frac {2 \, \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 = 2.01, size = 69, normalized size = 2.88 \begin {gather*} x-\frac {{\mathrm {e}}^x\,\left (4\,{\mathrm {e}}^4-x\,{\mathrm {e}}^4\right )}{x}+\frac {4\,\ln \relax (2)\,\mathrm {atanh}\left (\frac {2\,x-\ln \left (16\right )}{\sqrt {2\,\ln \relax (4)+\ln \left (16\right )}\,\sqrt {\ln \left (16\right )-2\,\ln \relax (4)}}\right )}{\sqrt {2\,\ln \relax (4)+\ln \left (16\right )}\,\sqrt {\ln \left (16\right )-2\,\ln \relax (4)}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.22, size = 27, normalized size = 1.12 \begin {gather*} x + \frac {2 \log {\relax (2 )}}{x - 2 \log {\relax (2 )}} + \frac {\left (x e^{4} - 4 e^{4}\right ) e^{x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________