Optimal. Leaf size=25 \[ e^x-2 \left (-2+e^4\right ) x+\frac {2}{x+\frac {x^2}{4}} \]
________________________________________________________________________________________
Rubi [A] time = 0.49, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 6, integrand size = 75, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1594, 27, 6742, 2194, 44, 43} \begin {gather*} -2 e^4 x+4 x+e^x-\frac {2}{x+4}+\frac {2}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 43
Rule 44
Rule 1594
Rule 2194
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-32-16 x+64 x^2+32 x^3+4 x^4+e^4 \left (-32 x^2-16 x^3-2 x^4\right )+e^x \left (16 x^2+8 x^3+x^4\right )}{x^2 \left (16+8 x+x^2\right )} \, dx\\ &=\int \frac {-32-16 x+64 x^2+32 x^3+4 x^4+e^4 \left (-32 x^2-16 x^3-2 x^4\right )+e^x \left (16 x^2+8 x^3+x^4\right )}{x^2 (4+x)^2} \, dx\\ &=\int \left (-2 e^4+e^x+\frac {64}{(4+x)^2}-\frac {32}{x^2 (4+x)^2}-\frac {16}{x (4+x)^2}+\frac {32 x}{(4+x)^2}+\frac {4 x^2}{(4+x)^2}\right ) \, dx\\ &=-2 e^4 x-\frac {64}{4+x}+4 \int \frac {x^2}{(4+x)^2} \, dx-16 \int \frac {1}{x (4+x)^2} \, dx-32 \int \frac {1}{x^2 (4+x)^2} \, dx+32 \int \frac {x}{(4+x)^2} \, dx+\int e^x \, dx\\ &=e^x-2 e^4 x-\frac {64}{4+x}+4 \int \left (1+\frac {16}{(4+x)^2}-\frac {8}{4+x}\right ) \, dx-16 \int \left (\frac {1}{16 x}-\frac {1}{4 (4+x)^2}-\frac {1}{16 (4+x)}\right ) \, dx-32 \int \left (\frac {1}{16 x^2}-\frac {1}{32 x}+\frac {1}{16 (4+x)^2}+\frac {1}{32 (4+x)}\right ) \, dx+32 \int \left (-\frac {4}{(4+x)^2}+\frac {1}{4+x}\right ) \, dx\\ &=e^x+\frac {2}{x}+4 x-2 e^4 x-\frac {2}{4+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 25, normalized size = 1.00 \begin {gather*} e^x+\frac {2}{x}+4 x-2 e^4 x-\frac {2}{4+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.72, size = 45, normalized size = 1.80 \begin {gather*} \frac {4 \, x^{3} + 16 \, x^{2} - 2 \, {\left (x^{3} + 4 \, x^{2}\right )} e^{4} + {\left (x^{2} + 4 \, x\right )} e^{x} + 8}{x^{2} + 4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.16, size = 49, normalized size = 1.96 \begin {gather*} -\frac {2 \, x^{3} e^{4} - 4 \, x^{3} + 8 \, x^{2} e^{4} - x^{2} e^{x} - 16 \, x^{2} - 4 \, x e^{x} - 8}{x^{2} + 4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 22, normalized size = 0.88
method | result | size |
risch | \(-2 x \,{\mathrm e}^{4}+4 x +\frac {8}{x \left (4+x \right )}+{\mathrm e}^{x}\) | \(22\) |
default | \({\mathrm e}^{x}-\frac {2}{4+x}+\frac {2}{x}+4 x -2 x \,{\mathrm e}^{4}\) | \(24\) |
norman | \(\frac {8+\left (-2 \,{\mathrm e}^{4}+4\right ) x^{3}+\left (-64+32 \,{\mathrm e}^{4}\right ) x +{\mathrm e}^{x} x^{2}+4 \,{\mathrm e}^{x} x}{\left (4+x \right ) x}\) | \(41\) |
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*} -2 \, {\left (x - \frac {16}{x + 4} - 8 \, \log \left (x + 4\right )\right )} e^{4} - 16 \, {\left (\frac {4}{x + 4} + \log \left (x + 4\right )\right )} e^{4} + 4 \, x + \frac {{\left (x^{2} + 8 \, x\right )} e^{x}}{x^{2} + 8 \, x + 16} - \frac {16 \, e^{\left (-4\right )} E_{2}\left (-x - 4\right )}{x + 4} + \frac {4 \, {\left (x + 2\right )}}{x^{2} + 4 \, x} + \frac {32 \, e^{4}}{x + 4} - \frac {4}{x + 4} - 32 \, \int \frac {e^{x}}{x^{3} + 12 \, x^{2} + 48 \, x + 64}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.13, size = 23, normalized size = 0.92 \begin {gather*} {\mathrm {e}}^x+\frac {8}{x^2+4\,x}-x\,\left (2\,{\mathrm {e}}^4-4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.19, size = 19, normalized size = 0.76 \begin {gather*} x \left (4 - 2 e^{4}\right ) + e^{x} + \frac {8}{x^{2} + 4 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________