Optimal. Leaf size=30 \[ 5 \left (-5+e^4-e^x+x\right ) \left (5-(4-x)^2+\log \left (-\frac {4}{x}\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.32, antiderivative size = 81, normalized size of antiderivative = 2.70, number of steps used = 20, number of rules used = 8, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {14, 6742, 2199, 2194, 2178, 2176, 2554, 2295} \begin {gather*} -5 x^3+5 e^x x^2+5 \left (13-e^4\right ) x^2-40 e^x x-20 \left (13-2 e^4\right ) x+5 x+55 e^x+5 x \log \left (-\frac {4}{x}\right )-5 e^x \log \left (-\frac {4}{x}\right )+5 \left (5-e^4\right ) \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2176
Rule 2178
Rule 2194
Rule 2199
Rule 2295
Rule 2554
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {5 e^x \left (1+3 x-6 x^2+x^3-x \log \left (-\frac {4}{x}\right )\right )}{x}+\frac {5 \left (5 \left (1-\frac {e^4}{5}\right )-52 \left (1-\frac {2 e^4}{13}\right ) x+26 \left (1-\frac {e^4}{13}\right ) x^2-3 x^3+x \log \left (-\frac {4}{x}\right )\right )}{x}\right ) \, dx\\ &=5 \int \frac {e^x \left (1+3 x-6 x^2+x^3-x \log \left (-\frac {4}{x}\right )\right )}{x} \, dx+5 \int \frac {5 \left (1-\frac {e^4}{5}\right )-52 \left (1-\frac {2 e^4}{13}\right ) x+26 \left (1-\frac {e^4}{13}\right ) x^2-3 x^3+x \log \left (-\frac {4}{x}\right )}{x} \, dx\\ &=5 \int \left (\frac {5-e^4-4 \left (13-2 e^4\right ) x+2 \left (13-e^4\right ) x^2-3 x^3}{x}+\log \left (-\frac {4}{x}\right )\right ) \, dx+5 \int \left (\frac {e^x \left (1+3 x-6 x^2+x^3\right )}{x}-e^x \log \left (-\frac {4}{x}\right )\right ) \, dx\\ &=5 \int \frac {5-e^4-4 \left (13-2 e^4\right ) x+2 \left (13-e^4\right ) x^2-3 x^3}{x} \, dx+5 \int \frac {e^x \left (1+3 x-6 x^2+x^3\right )}{x} \, dx+5 \int \log \left (-\frac {4}{x}\right ) \, dx-5 \int e^x \log \left (-\frac {4}{x}\right ) \, dx\\ &=5 x-5 e^x \log \left (-\frac {4}{x}\right )+5 x \log \left (-\frac {4}{x}\right )-5 \int \frac {e^x}{x} \, dx+5 \int \left (-4 \left (13-2 e^4\right )+\frac {5-e^4}{x}+2 \left (13-e^4\right ) x-3 x^2\right ) \, dx+5 \int \left (3 e^x+\frac {e^x}{x}-6 e^x x+e^x x^2\right ) \, dx\\ &=5 x-20 \left (13-2 e^4\right ) x+5 \left (13-e^4\right ) x^2-5 x^3-5 \text {Ei}(x)-5 e^x \log \left (-\frac {4}{x}\right )+5 x \log \left (-\frac {4}{x}\right )+5 \left (5-e^4\right ) \log (x)+5 \int \frac {e^x}{x} \, dx+5 \int e^x x^2 \, dx+15 \int e^x \, dx-30 \int e^x x \, dx\\ &=15 e^x+5 x-30 e^x x-20 \left (13-2 e^4\right ) x+5 e^x x^2+5 \left (13-e^4\right ) x^2-5 x^3-5 e^x \log \left (-\frac {4}{x}\right )+5 x \log \left (-\frac {4}{x}\right )+5 \left (5-e^4\right ) \log (x)-10 \int e^x x \, dx+30 \int e^x \, dx\\ &=45 e^x+5 x-40 e^x x-20 \left (13-2 e^4\right ) x+5 e^x x^2+5 \left (13-e^4\right ) x^2-5 x^3-5 e^x \log \left (-\frac {4}{x}\right )+5 x \log \left (-\frac {4}{x}\right )+5 \left (5-e^4\right ) \log (x)+10 \int e^x \, dx\\ &=55 e^x+5 x-40 e^x x-20 \left (13-2 e^4\right ) x+5 e^x x^2+5 \left (13-e^4\right ) x^2-5 x^3-5 e^x \log \left (-\frac {4}{x}\right )+5 x \log \left (-\frac {4}{x}\right )+5 \left (5-e^4\right ) \log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.18, size = 64, normalized size = 2.13 \begin {gather*} 5 \left (\left (-51+8 e^4\right ) x+\left (13-e^4\right ) x^2-x^3+e^x \left (11-8 x+x^2\right )+\left (-e^x+x\right ) \log \left (-\frac {4}{x}\right )+\left (5-e^4\right ) \log (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.65, size = 54, normalized size = 1.80 \begin {gather*} -5 \, x^{3} + 65 \, x^{2} - 5 \, {\left (x^{2} - 8 \, x\right )} e^{4} + 5 \, {\left (x^{2} - 8 \, x + 11\right )} e^{x} + 5 \, {\left (x + e^{4} - e^{x} - 5\right )} \log \left (-\frac {4}{x}\right ) - 255 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 71, normalized size = 2.37 \begin {gather*} -5 \, x^{3} - 5 \, x^{2} e^{4} + 5 \, x^{2} e^{x} + 65 \, x^{2} + 40 \, x e^{4} - 40 \, x e^{x} - 5 \, e^{4} \log \relax (x) + 5 \, x \log \left (-\frac {4}{x}\right ) - 5 \, e^{x} \log \left (-\frac {4}{x}\right ) - 255 \, x + 55 \, e^{x} + 25 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.10, size = 73, normalized size = 2.43
method | result | size |
norman | \(\left (-255+40 \,{\mathrm e}^{4}\right ) x +\left (-5 \,{\mathrm e}^{4}+65\right ) x^{2}+\left (5 \,{\mathrm e}^{4}-25\right ) \ln \left (-\frac {4}{x}\right )-5 x^{3}-40 \,{\mathrm e}^{x} x +5 \,{\mathrm e}^{x} x^{2}-5 \,{\mathrm e}^{x} \ln \left (-\frac {4}{x}\right )+5 \ln \left (-\frac {4}{x}\right ) x +55 \,{\mathrm e}^{x}\) | \(73\) |
default | \(-5 \,{\mathrm e}^{x} \left (\ln \left (-\frac {4}{x}\right )+\ln \relax (x )\right )+55 \,{\mathrm e}^{x}+5 \,{\mathrm e}^{x} x^{2}+5 \,{\mathrm e}^{x} \ln \relax (x )-40 \,{\mathrm e}^{x} x -5 x^{2} {\mathrm e}^{4}-5 x^{3}+40 x \,{\mathrm e}^{4}+65 x^{2}-255 x -5 \,{\mathrm e}^{4} \ln \relax (x )+25 \ln \relax (x )+5 \ln \left (-\frac {4}{x}\right ) x\) | \(81\) |
risch | \(\left (5 \,{\mathrm e}^{x}-5 x \right ) \ln \relax (x )-5 i {\mathrm e}^{x} \pi +5 i \pi x +5 i \pi x \mathrm {csgn}\left (\frac {i}{x}\right )^{3}-5 i \pi x \mathrm {csgn}\left (\frac {i}{x}\right )^{2}+5 i {\mathrm e}^{x} \pi \mathrm {csgn}\left (\frac {i}{x}\right )^{2}-5 x^{2} {\mathrm e}^{4}-5 x^{3}+40 x \,{\mathrm e}^{4}+10 x \ln \relax (2)+65 x^{2}-255 x -5 \,{\mathrm e}^{4} \ln \relax (x )+25 \ln \relax (x )-5 i {\mathrm e}^{x} \pi \mathrm {csgn}\left (\frac {i}{x}\right )^{3}-10 \,{\mathrm e}^{x} \ln \relax (2)+55 \,{\mathrm e}^{x}-40 \,{\mathrm e}^{x} x +5 \,{\mathrm e}^{x} x^{2}\) | \(144\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.41, size = 78, normalized size = 2.60 \begin {gather*} -5 \, x^{3} - 5 \, x^{2} e^{4} + 65 \, x^{2} + 40 \, x e^{4} + 5 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} - 30 \, {\left (x - 1\right )} e^{x} - 5 \, e^{4} \log \relax (x) + 5 \, x \log \left (-\frac {4}{x}\right ) - 5 \, e^{x} \log \left (-\frac {4}{x}\right ) - 255 \, x + 15 \, e^{x} + 25 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.04, size = 65, normalized size = 2.17 \begin {gather*} 55\,{\mathrm {e}}^x+x\,\left (40\,{\mathrm {e}}^4+5\,\ln \left (-\frac {4}{x}\right )-40\,{\mathrm {e}}^x-255\right )+x^2\,\left (5\,{\mathrm {e}}^x-5\,{\mathrm {e}}^4+65\right )+\ln \left (\frac {1}{x}\right )\,\left (5\,{\mathrm {e}}^4-25\right )-5\,x^3-5\,{\mathrm {e}}^x\,\ln \left (-\frac {4}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.46, size = 65, normalized size = 2.17 \begin {gather*} - 5 x^{3} - x^{2} \left (-65 + 5 e^{4}\right ) + 5 x \log {\left (- \frac {4}{x} \right )} - x \left (255 - 40 e^{4}\right ) + \left (5 x^{2} - 40 x - 5 \log {\left (- \frac {4}{x} \right )} + 55\right ) e^{x} - 5 \left (-5 + e^{4}\right ) \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________