Optimal. Leaf size=22 \[ x+\left (-\frac {1}{4}+e^x \left (x-\frac {1}{2} x (5+x)\right )\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.19, antiderivative size = 56, normalized size of antiderivative = 2.55, number of steps used = 26, number of rules used = 4, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {12, 2196, 2194, 2176} \begin {gather*} \frac {1}{4} e^{2 x} x^4+\frac {3}{2} e^{2 x} x^3+\frac {e^x x^2}{4}+\frac {9}{4} e^{2 x} x^2+\frac {3 e^x x}{4}+x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{4} \int \left (4+e^x \left (3+5 x+x^2\right )+e^{2 x} \left (18 x+36 x^2+16 x^3+2 x^4\right )\right ) \, dx\\ &=x+\frac {1}{4} \int e^x \left (3+5 x+x^2\right ) \, dx+\frac {1}{4} \int e^{2 x} \left (18 x+36 x^2+16 x^3+2 x^4\right ) \, dx\\ &=x+\frac {1}{4} \int \left (3 e^x+5 e^x x+e^x x^2\right ) \, dx+\frac {1}{4} \int \left (18 e^{2 x} x+36 e^{2 x} x^2+16 e^{2 x} x^3+2 e^{2 x} x^4\right ) \, dx\\ &=x+\frac {1}{4} \int e^x x^2 \, dx+\frac {1}{2} \int e^{2 x} x^4 \, dx+\frac {3 \int e^x \, dx}{4}+\frac {5}{4} \int e^x x \, dx+4 \int e^{2 x} x^3 \, dx+\frac {9}{2} \int e^{2 x} x \, dx+9 \int e^{2 x} x^2 \, dx\\ &=\frac {3 e^x}{4}+x+\frac {5 e^x x}{4}+\frac {9}{4} e^{2 x} x+\frac {e^x x^2}{4}+\frac {9}{2} e^{2 x} x^2+2 e^{2 x} x^3+\frac {1}{4} e^{2 x} x^4-\frac {1}{2} \int e^x x \, dx-\frac {5 \int e^x \, dx}{4}-\frac {9}{4} \int e^{2 x} \, dx-6 \int e^{2 x} x^2 \, dx-9 \int e^{2 x} x \, dx-\int e^{2 x} x^3 \, dx\\ &=-\frac {e^x}{2}-\frac {9 e^{2 x}}{8}+x+\frac {3 e^x x}{4}-\frac {9}{4} e^{2 x} x+\frac {e^x x^2}{4}+\frac {3}{2} e^{2 x} x^2+\frac {3}{2} e^{2 x} x^3+\frac {1}{4} e^{2 x} x^4+\frac {\int e^x \, dx}{2}+\frac {3}{2} \int e^{2 x} x^2 \, dx+\frac {9}{2} \int e^{2 x} \, dx+6 \int e^{2 x} x \, dx\\ &=\frac {9 e^{2 x}}{8}+x+\frac {3 e^x x}{4}+\frac {3}{4} e^{2 x} x+\frac {e^x x^2}{4}+\frac {9}{4} e^{2 x} x^2+\frac {3}{2} e^{2 x} x^3+\frac {1}{4} e^{2 x} x^4-\frac {3}{2} \int e^{2 x} x \, dx-3 \int e^{2 x} \, dx\\ &=-\frac {3 e^{2 x}}{8}+x+\frac {3 e^x x}{4}+\frac {e^x x^2}{4}+\frac {9}{4} e^{2 x} x^2+\frac {3}{2} e^{2 x} x^3+\frac {1}{4} e^{2 x} x^4+\frac {3}{4} \int e^{2 x} \, dx\\ &=x+\frac {3 e^x x}{4}+\frac {e^x x^2}{4}+\frac {9}{4} e^{2 x} x^2+\frac {3}{2} e^{2 x} x^3+\frac {1}{4} e^{2 x} x^4\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 26, normalized size = 1.18 \begin {gather*} \frac {1}{4} x \left (4+e^x (3+x)+e^{2 x} x (3+x)^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.03, size = 33, normalized size = 1.50 \begin {gather*} \frac {1}{4} \, {\left (x^{4} + 6 \, x^{3} + 9 \, x^{2}\right )} e^{\left (2 \, x\right )} + \frac {1}{4} \, {\left (x^{2} + 3 \, x\right )} e^{x} + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.92, size = 33, normalized size = 1.50 \begin {gather*} \frac {1}{4} \, {\left (x^{4} + 6 \, x^{3} + 9 \, x^{2}\right )} e^{\left (2 \, x\right )} + \frac {1}{4} \, {\left (x^{2} + 3 \, x\right )} e^{x} + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 34, normalized size = 1.55
method | result | size |
risch | \(\frac {\left (x^{4}+6 x^{3}+9 x^{2}\right ) {\mathrm e}^{2 x}}{4}+\frac {\left (x^{2}+3 x \right ) {\mathrm e}^{x}}{4}+x\) | \(34\) |
default | \(x +\frac {{\mathrm e}^{x} x^{2}}{4}+\frac {3 \,{\mathrm e}^{x} x}{4}+\frac {{\mathrm e}^{2 x} x^{4}}{4}+\frac {3 \,{\mathrm e}^{2 x} x^{3}}{2}+\frac {9 \,{\mathrm e}^{2 x} x^{2}}{4}\) | \(42\) |
norman | \(x +\frac {{\mathrm e}^{x} x^{2}}{4}+\frac {3 \,{\mathrm e}^{x} x}{4}+\frac {{\mathrm e}^{2 x} x^{4}}{4}+\frac {3 \,{\mathrm e}^{2 x} x^{3}}{2}+\frac {9 \,{\mathrm e}^{2 x} x^{2}}{4}\) | \(42\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.35, size = 45, normalized size = 2.05 \begin {gather*} \frac {1}{4} \, {\left (x^{4} + 6 \, x^{3} + 9 \, x^{2}\right )} e^{\left (2 \, x\right )} + \frac {1}{4} \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + \frac {5}{4} \, {\left (x - 1\right )} e^{x} + x + \frac {3}{4} \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 37, normalized size = 1.68 \begin {gather*} \frac {x\,\left (3\,{\mathrm {e}}^x+9\,x\,{\mathrm {e}}^{2\,x}+6\,x^2\,{\mathrm {e}}^{2\,x}+x^3\,{\mathrm {e}}^{2\,x}+x\,{\mathrm {e}}^x+4\right )}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 36, normalized size = 1.64 \begin {gather*} x + \frac {\left (4 x^{2} + 12 x\right ) e^{x}}{16} + \frac {\left (4 x^{4} + 24 x^{3} + 36 x^{2}\right ) e^{2 x}}{16} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________