Optimal. Leaf size=27 \[ 6-\frac {x \left (-e^x+2 \left (-1-x^2\right )\right )}{2 (4+x)^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 50, normalized size of antiderivative = 1.85, number of steps used = 15, number of rules used = 6, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {6742, 37, 43, 2199, 2177, 2178} \begin {gather*} -\frac {x^2}{8 (x+4)^2}+x+\frac {e^x}{2 (x+4)}+\frac {48}{x+4}-\frac {2 e^x}{(x+4)^2}-\frac {66}{(x+4)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 43
Rule 2177
Rule 2178
Rule 2199
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {4}{(4+x)^3}-\frac {x}{(4+x)^3}+\frac {12 x^2}{(4+x)^3}+\frac {x^3}{(4+x)^3}+\frac {e^x \left (4+3 x+x^2\right )}{2 (4+x)^3}\right ) \, dx\\ &=-\frac {2}{(4+x)^2}+\frac {1}{2} \int \frac {e^x \left (4+3 x+x^2\right )}{(4+x)^3} \, dx+12 \int \frac {x^2}{(4+x)^3} \, dx-\int \frac {x}{(4+x)^3} \, dx+\int \frac {x^3}{(4+x)^3} \, dx\\ &=-\frac {2}{(4+x)^2}-\frac {x^2}{8 (4+x)^2}+\frac {1}{2} \int \left (\frac {8 e^x}{(4+x)^3}-\frac {5 e^x}{(4+x)^2}+\frac {e^x}{4+x}\right ) \, dx+12 \int \left (\frac {16}{(4+x)^3}-\frac {8}{(4+x)^2}+\frac {1}{4+x}\right ) \, dx+\int \left (1-\frac {64}{(4+x)^3}+\frac {48}{(4+x)^2}-\frac {12}{4+x}\right ) \, dx\\ &=x-\frac {66}{(4+x)^2}-\frac {x^2}{8 (4+x)^2}+\frac {48}{4+x}+\frac {1}{2} \int \frac {e^x}{4+x} \, dx-\frac {5}{2} \int \frac {e^x}{(4+x)^2} \, dx+4 \int \frac {e^x}{(4+x)^3} \, dx\\ &=x-\frac {66}{(4+x)^2}-\frac {2 e^x}{(4+x)^2}-\frac {x^2}{8 (4+x)^2}+\frac {48}{4+x}+\frac {5 e^x}{2 (4+x)}+\frac {\text {Ei}(4+x)}{2 e^4}+2 \int \frac {e^x}{(4+x)^2} \, dx-\frac {5}{2} \int \frac {e^x}{4+x} \, dx\\ &=x-\frac {66}{(4+x)^2}-\frac {2 e^x}{(4+x)^2}-\frac {x^2}{8 (4+x)^2}+\frac {48}{4+x}+\frac {e^x}{2 (4+x)}-\frac {2 \text {Ei}(4+x)}{e^4}+2 \int \frac {e^x}{4+x} \, dx\\ &=x-\frac {66}{(4+x)^2}-\frac {2 e^x}{(4+x)^2}-\frac {x^2}{8 (4+x)^2}+\frac {48}{4+x}+\frac {e^x}{2 (4+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 28, normalized size = 1.04 \begin {gather*} \frac {256+\left (130+e^x\right ) x+16 x^2+2 x^3}{2 (4+x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.43, size = 31, normalized size = 1.15 \begin {gather*} \frac {2 \, x^{3} + 16 \, x^{2} + x e^{x} + 130 \, x + 256}{2 \, {\left (x^{2} + 8 \, x + 16\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 31, normalized size = 1.15 \begin {gather*} \frac {2 \, x^{3} + 16 \, x^{2} + x e^{x} + 130 \, x + 256}{2 \, {\left (x^{2} + 8 \, x + 16\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 17, normalized size = 0.63
method | result | size |
norman | \(\frac {x^{3}+x +\frac {{\mathrm e}^{x} x}{2}}{\left (4+x \right )^{2}}\) | \(17\) |
risch | \(x +\frac {49 x +128}{x^{2}+8 x +16}+\frac {x \,{\mathrm e}^{x}}{2 \left (4+x \right )^{2}}\) | \(29\) |
default | \(-\frac {2 \,{\mathrm e}^{x}}{\left (4+x \right )^{2}}-\frac {68}{\left (4+x \right )^{2}}+\frac {49}{4+x}+x +\frac {{\mathrm e}^{x}}{2 x +8}\) | \(35\) |
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*} x + \frac {x e^{x}}{2 \, {\left (x^{2} + 8 \, x + 16\right )}} - \frac {16 \, {\left (3 \, x + 10\right )}}{x^{2} + 8 \, x + 16} + \frac {96 \, {\left (x + 3\right )}}{x^{2} + 8 \, x + 16} + \frac {x + 2}{x^{2} + 8 \, x + 16} - \frac {2 \, e^{\left (-4\right )} E_{3}\left (-x - 4\right )}{{\left (x + 4\right )}^{2}} - \frac {2}{x^{2} + 8 \, x + 16} - 2 \, \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 = 3.61, size = 17, normalized size = 0.63 \begin {gather*} \frac {x\,\left ({\mathrm {e}}^x+2\,x^2+2\right )}{2\,{\left (x+4\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 29, normalized size = 1.07 \begin {gather*} x + \frac {x e^{x}}{2 x^{2} + 16 x + 32} + \frac {49 x + 128}{x^{2} + 8 x + 16} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________