Optimal. Leaf size=21 \[ -4+e^{-4+x}-x+\frac {x^2}{(1+x)^2}+\log (x) \]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 23, normalized size of antiderivative = 1.10, number of steps used = 5, number of rules used = 3, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {6688, 2194, 1620} \begin {gather*} -x+e^{x-4}-\frac {2}{x+1}+\frac {1}{(x+1)^2}+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1620
Rule 2194
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (e^{-4+x}+\frac {1+2 x+2 x^2-2 x^3-x^4}{x (1+x)^3}\right ) \, dx\\ &=\int e^{-4+x} \, dx+\int \frac {1+2 x+2 x^2-2 x^3-x^4}{x (1+x)^3} \, dx\\ &=e^{-4+x}+\int \left (-1+\frac {1}{x}-\frac {2}{(1+x)^3}+\frac {2}{(1+x)^2}\right ) \, dx\\ &=e^{-4+x}-x+\frac {1}{(1+x)^2}-\frac {2}{1+x}+\log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 23, normalized size = 1.10 \begin {gather*} e^{-4+x}-x+\frac {1}{(1+x)^2}-\frac {2}{1+x}+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.60, size = 51, normalized size = 2.43 \begin {gather*} -\frac {x^{3} + 2 \, x^{2} - {\left (x^{2} + 2 \, x + 1\right )} e^{\left (x - 4\right )} - {\left (x^{2} + 2 \, x + 1\right )} \log \relax (x) + 3 \, x + 1}{x^{2} + 2 \, x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.25, size = 77, normalized size = 3.67 \begin {gather*} -\frac {x^{3} e^{4} - x^{2} e^{4} \log \relax (x) + 2 \, x^{2} e^{4} - x^{2} e^{x} - 2 \, x e^{4} \log \relax (x) + 3 \, x e^{4} - 2 \, x e^{x} - e^{4} \log \relax (x) + e^{4} - e^{x}}{x^{2} e^{4} + 2 \, x e^{4} + e^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 24, normalized size = 1.14
method | result | size |
derivativedivides | \({\mathrm e}^{x -4}+\ln \relax (x )+\frac {1}{\left (x +1\right )^{2}}-\frac {2}{x +1}-x +4\) | \(24\) |
default | \({\mathrm e}^{x -4}+\ln \relax (x )+\frac {1}{\left (x +1\right )^{2}}-\frac {2}{x +1}-x +4\) | \(24\) |
risch | \(-x +\frac {-2 x -1}{x^{2}+2 x +1}+\ln \relax (x )+{\mathrm e}^{x -4}\) | \(27\) |
norman | \(\frac {x^{2} {\mathrm e}^{x -4}+x -x^{3}+2 x \,{\mathrm e}^{x -4}+1+{\mathrm e}^{x -4}}{\left (x +1\right )^{2}}+\ln \relax (x )\) | \(37\) |
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 {{\left (x^{3} + 3 \, x^{2} + 3 \, x\right )} e^{x}}{x^{3} e^{4} + 3 \, x^{2} e^{4} + 3 \, x e^{4} + e^{4}} + \frac {6 \, x + 5}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} - \frac {4 \, x + 3}{x^{2} + 2 \, x + 1} + \frac {2 \, x + 3}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} - \frac {2 \, x + 1}{x^{2} + 2 \, x + 1} - \frac {e^{\left (-5\right )} E_{3}\left (-x - 1\right )}{{\left (x + 1\right )}^{2}} - \frac {1}{x^{2} + 2 \, x + 1} - 3 \, \int \frac {e^{x}}{x^{4} e^{4} + 4 \, x^{3} e^{4} + 6 \, x^{2} e^{4} + 4 \, x e^{4} + e^{4}}\,{d x} + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 22, normalized size = 1.05 \begin {gather*} {\mathrm {e}}^{x-4}-x+\ln \relax (x)-\frac {2\,x+1}{{\left (x+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 22, normalized size = 1.05 \begin {gather*} - x - \frac {2 x + 1}{x^{2} + 2 x + 1} + e^{x - 4} + \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________