Optimal. Leaf size=25 \[ e^x-2 \left (-2+e^4\right ) x+\frac {2}{x+\frac {x^2}{4}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, 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 = {1608, 27,
6874, 2225, 46, 45} \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 45
Rule 46
Rule 1608
Rule 2225
Rule 6874
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.54, size = 24, normalized size = 0.96 \begin {gather*} e^x+\frac {2}{x}-2 \left (-2+e^4\right ) x-\frac {2}{4+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.33, size = 24, normalized size = 0.96
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}{x}-\frac {2}{4+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*} \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. 45 vs.
\(2 (21) = 42\).
time = 0.37, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.10, 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]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 49 vs.
\(2 (21) = 42\).
time = 0.41, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________