Optimal. Leaf size=38 \[ \frac {x^2}{2}+2 e^x x+\frac {1}{2} e^{2 x} x-2 e^x-\frac {e^{2 x}}{4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2183, 2176, 2194} \[ \frac {x^2}{2}+2 e^x x+\frac {1}{2} e^{2 x} x-2 e^x-\frac {e^{2 x}}{4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2183
Rule 2194
Rubi steps
\begin {align*} \int \left (1+e^x\right )^2 x \, dx &=\int \left (x+2 e^x x+e^{2 x} x\right ) \, dx\\ &=\frac {x^2}{2}+2 \int e^x x \, dx+\int e^{2 x} x \, dx\\ &=2 e^x x+\frac {1}{2} e^{2 x} x+\frac {x^2}{2}-\frac {1}{2} \int e^{2 x} \, dx-2 \int e^x \, dx\\ &=-2 e^x-\frac {e^{2 x}}{4}+2 e^x x+\frac {1}{2} e^{2 x} x+\frac {x^2}{2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 29, normalized size = 0.76 \[ \frac {1}{4} \left (2 x^2+8 e^x (x-1)+e^{2 x} (2 x-1)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 24, normalized size = 0.63 \[ \frac {1}{2} \, x^{2} + \frac {1}{4} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x - 1\right )} e^{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.95, size = 24, normalized size = 0.63 \[ \frac {1}{2} \, x^{2} + \frac {1}{4} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x - 1\right )} e^{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 29, normalized size = 0.76 \[ \frac {x^{2}}{2}+2 x \,{\mathrm e}^{x}+\frac {x \,{\mathrm e}^{2 x}}{2}-2 \,{\mathrm e}^{x}-\frac {{\mathrm e}^{2 x}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.62, size = 24, normalized size = 0.63 \[ \frac {1}{2} \, x^{2} + \frac {1}{4} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x - 1\right )} e^{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.16, size = 28, normalized size = 0.74 \[ \frac {x\,{\mathrm {e}}^{2\,x}}{2}-2\,{\mathrm {e}}^x-\frac {{\mathrm {e}}^{2\,x}}{4}+2\,x\,{\mathrm {e}}^x+\frac {x^2}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.09, size = 26, normalized size = 0.68 \[ \frac {x^{2}}{2} + \frac {\left (2 x - 1\right ) e^{2 x}}{4} + \frac {\left (8 x - 8\right ) e^{x}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________