Optimal. Leaf size=32 \[ 5+e^5+e^{2+x}+2 \left (5 \left (5+3 e^x\right )-x\right )-\frac {4}{1+x} \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 21, normalized size of antiderivative = 0.66, number of steps used = 7, number of rules used = 4, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.082, Rules used = {27, 6688, 2194, 683} \begin {gather*} -2 x+30 e^x+e^{x+2}-\frac {4}{x+1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 683
Rule 2194
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2-4 x-2 x^2+e^{2+x} \left (1+2 x+x^2\right )+e^x \left (30+60 x+30 x^2\right )}{(1+x)^2} \, dx\\ &=\int \left (30 e^x+e^{2+x}-\frac {2 \left (-1+2 x+x^2\right )}{(1+x)^2}\right ) \, dx\\ &=-\left (2 \int \frac {-1+2 x+x^2}{(1+x)^2} \, dx\right )+30 \int e^x \, dx+\int e^{2+x} \, dx\\ &=30 e^x+e^{2+x}-2 \int \left (1-\frac {2}{(1+x)^2}\right ) \, dx\\ &=30 e^x+e^{2+x}-2 x-\frac {4}{1+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 21, normalized size = 0.66 \begin {gather*} 30 e^x+e^{2+x}-2 x-\frac {4}{1+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.78, size = 37, normalized size = 1.16 \begin {gather*} -\frac {{\left (2 \, {\left (x^{2} + x + 2\right )} e^{2} - {\left ({\left (x + 1\right )} e^{2} + 30 \, x + 30\right )} e^{\left (x + 2\right )}\right )} e^{\left (-2\right )}}{x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 39, normalized size = 1.22 \begin {gather*} -\frac {2 \, x^{2} - x e^{\left (x + 2\right )} - 30 \, x e^{x} + 2 \, x - e^{\left (x + 2\right )} - 30 \, e^{x} + 4}{x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.28, size = 21, normalized size = 0.66
method | result | size |
risch | \(-2 x -\frac {4}{x +1}+{\mathrm e}^{2} {\mathrm e}^{x}+30 \,{\mathrm e}^{x}\) | \(21\) |
norman | \(\frac {\left (30+{\mathrm e}^{2}\right ) {\mathrm e}^{x}+\left (30+{\mathrm e}^{2}\right ) x \,{\mathrm e}^{x}-2 x^{2}-2}{x +1}\) | \(29\) |
default | \({\mathrm e}^{2} \left (-\frac {{\mathrm e}^{x}}{x +1}-{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )+{\mathrm e}^{2} \left ({\mathrm e}^{x}-\frac {{\mathrm e}^{x}}{x +1}+{\mathrm e}^{-1} \expIntegralEi \left (1, -x -1\right )\right )-\frac {4}{x +1}-2 x +30 \,{\mathrm e}^{x}+\frac {2 \,{\mathrm e}^{2} {\mathrm e}^{x}}{x +1}\) | \(76\) |
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 \, x + \frac {{\left (x^{2} {\left (e^{2} + 30\right )} + 2 \, x e^{2}\right )} e^{x}}{x^{2} + 2 \, x + 1} - \frac {30 \, e^{\left (-1\right )} E_{2}\left (-x - 1\right )}{x + 1} + \frac {60 \, e^{x}}{x + 1} - \frac {4}{x + 1} + \int \frac {{\left (x {\left (e^{2} - 60\right )} - e^{2}\right )} e^{x}}{x^{3} + 3 \, x^{2} + 3 \, x + 1}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 18, normalized size = 0.56 \begin {gather*} {\mathrm {e}}^x\,\left ({\mathrm {e}}^2+30\right )-2\,x-\frac {4}{x+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 15, normalized size = 0.47 \begin {gather*} - 2 x + \left (e^{2} + 30\right ) e^{x} - \frac {4}{x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________