Optimal. Leaf size=20 \[ -5+\left (-2-\frac {1}{3} e^{2+\frac {x}{2}} x\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(42\) vs. \(2(20)=40\).
time = 0.05, antiderivative size = 42, normalized size of antiderivative = 2.10, number of steps
used = 12, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {12, 2207,
2225, 1607, 2227} \begin {gather*} \frac {1}{9} e^{x+4} x^2-\frac {8}{3} e^{\frac {x}{2}+2}+\frac {4}{3} e^{\frac {x}{2}+2} (x+2) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1607
Rule 2207
Rule 2225
Rule 2227
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{9} \int \left (e^{2+\frac {x}{2}} (12+6 x)+e^{4+x} \left (2 x+x^2\right )\right ) \, dx\\ &=\frac {1}{9} \int e^{2+\frac {x}{2}} (12+6 x) \, dx+\frac {1}{9} \int e^{4+x} \left (2 x+x^2\right ) \, dx\\ &=\frac {4}{3} e^{2+\frac {x}{2}} (2+x)+\frac {1}{9} \int e^{4+x} x (2+x) \, dx-\frac {4}{3} \int e^{2+\frac {x}{2}} \, dx\\ &=-\frac {8}{3} e^{2+\frac {x}{2}}+\frac {4}{3} e^{2+\frac {x}{2}} (2+x)+\frac {1}{9} \int \left (2 e^{4+x} x+e^{4+x} x^2\right ) \, dx\\ &=-\frac {8}{3} e^{2+\frac {x}{2}}+\frac {4}{3} e^{2+\frac {x}{2}} (2+x)+\frac {1}{9} \int e^{4+x} x^2 \, dx+\frac {2}{9} \int e^{4+x} x \, dx\\ &=-\frac {8}{3} e^{2+\frac {x}{2}}+\frac {2}{9} e^{4+x} x+\frac {1}{9} e^{4+x} x^2+\frac {4}{3} e^{2+\frac {x}{2}} (2+x)-\frac {2}{9} \int e^{4+x} \, dx-\frac {2}{9} \int e^{4+x} x \, dx\\ &=-\frac {8}{3} e^{2+\frac {x}{2}}-\frac {2 e^{4+x}}{9}+\frac {1}{9} e^{4+x} x^2+\frac {4}{3} e^{2+\frac {x}{2}} (2+x)+\frac {2}{9} \int e^{4+x} \, dx\\ &=-\frac {8}{3} e^{2+\frac {x}{2}}+\frac {1}{9} e^{4+x} x^2+\frac {4}{3} e^{2+\frac {x}{2}} (2+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 27, normalized size = 1.35 \begin {gather*} \frac {1}{9} e^{2+\frac {x}{2}} x \left (12+e^{2+\frac {x}{2}} x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 26, normalized size = 1.30
method | result | size |
risch | \(\frac {4 x \,{\mathrm e}^{2+\frac {x}{2}}}{3}+\frac {x^{2} {\mathrm e}^{4+x}}{9}\) | \(20\) |
derivativedivides | \(\frac {4 x \,{\mathrm e}^{2} {\mathrm e}^{\frac {x}{2}}}{3}+\frac {x^{2} {\mathrm e}^{4} {\mathrm e}^{x}}{9}\) | \(26\) |
default | \(\frac {4 x \,{\mathrm e}^{2} {\mathrm e}^{\frac {x}{2}}}{3}+\frac {x^{2} {\mathrm e}^{4} {\mathrm e}^{x}}{9}\) | \(26\) |
norman | \(\frac {4 x \,{\mathrm e}^{2} {\mathrm e}^{\frac {x}{2}}}{3}+\frac {x^{2} {\mathrm e}^{4} {\mathrm e}^{x}}{9}\) | \(26\) |
meijerg | \(-\frac {{\mathrm e}^{4} \left (2-\frac {\left (3 x^{2}-6 x +6\right ) {\mathrm e}^{x}}{3}\right )}{9}+\frac {2 \,{\mathrm e}^{4} \left (1-\frac {\left (-2 x +2\right ) {\mathrm e}^{x}}{2}\right )}{9}-\frac {8 \,{\mathrm e}^{2} \left (1-{\mathrm e}^{\frac {x}{2}}\right )}{3}+\frac {8 \,{\mathrm e}^{2} \left (1-\frac {\left (2-x \right ) {\mathrm e}^{\frac {x}{2}}}{2}\right )}{3}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 33 vs.
\(2 (16) = 32\).
time = 0.26, size = 33, normalized size = 1.65 \begin {gather*} \frac {1}{9} \, x^{2} e^{\left (x + 4\right )} + \frac {4}{3} \, {\left (x e^{2} - 2 \, e^{2}\right )} e^{\left (\frac {1}{2} \, x\right )} + \frac {8}{3} \, e^{\left (\frac {1}{2} \, x + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 19, normalized size = 0.95 \begin {gather*} \frac {1}{9} \, x^{2} e^{\left (x + 4\right )} + \frac {4}{3} \, x e^{\left (\frac {1}{2} \, x + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.06, size = 24, normalized size = 1.20 \begin {gather*} \frac {x^{2} e^{4} e^{x}}{9} + \frac {4 x e^{2} e^{\frac {x}{2}}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.38, size = 19, normalized size = 0.95 \begin {gather*} \frac {1}{9} \, x^{2} e^{\left (x + 4\right )} + \frac {4}{3} \, x e^{\left (\frac {1}{2} \, x + 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 19, normalized size = 0.95 \begin {gather*} \frac {x\,{\mathrm {e}}^{\frac {x}{2}+2}\,\left (x\,{\mathrm {e}}^{\frac {x}{2}+2}+12\right )}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________