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} \]
[Out]
________________________________________________________________________________________
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, 6820, 2225,
697} \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 697
Rule 2225
Rule 6820
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.04, 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]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 2.60, size = 76, normalized size = 2.38
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} \expIntegral \left (1, -x -1\right )\right )+{\mathrm e}^{2} \left ({\mathrm e}^{x}-\frac {{\mathrm e}^{x}}{x +1}+{\mathrm e}^{-1} \expIntegral \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*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.07, 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]
________________________________________________________________________________________
Giac [A]
time = 0.40, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________