Optimal. Leaf size=51 \[ 871 e^x-870 e^x x+435 e^x x^2-145 e^x x^3+36 e^x x^4-7 e^x x^5+e^x x^6 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 25, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2227, 2225,
2207} \begin {gather*} e^x x^6-7 e^x x^5+36 e^x x^4-145 e^x x^3+435 e^x x^2-870 e^x x+871 e^x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2207
Rule 2225
Rule 2227
Rubi steps
\begin {align*} \int e^x \left (1-x^3+x^4-x^5+x^6\right ) \, dx &=\int \left (e^x-e^x x^3+e^x x^4-e^x x^5+e^x x^6\right ) \, dx\\ &=\int e^x \, dx-\int e^x x^3 \, dx+\int e^x x^4 \, dx-\int e^x x^5 \, dx+\int e^x x^6 \, dx\\ &=e^x-e^x x^3+e^x x^4-e^x x^5+e^x x^6+3 \int e^x x^2 \, dx-4 \int e^x x^3 \, dx+5 \int e^x x^4 \, dx-6 \int e^x x^5 \, dx\\ &=e^x+3 e^x x^2-5 e^x x^3+6 e^x x^4-7 e^x x^5+e^x x^6-6 \int e^x x \, dx+12 \int e^x x^2 \, dx-20 \int e^x x^3 \, dx+30 \int e^x x^4 \, dx\\ &=e^x-6 e^x x+15 e^x x^2-25 e^x x^3+36 e^x x^4-7 e^x x^5+e^x x^6+6 \int e^x \, dx-24 \int e^x x \, dx+60 \int e^x x^2 \, dx-120 \int e^x x^3 \, dx\\ &=7 e^x-30 e^x x+75 e^x x^2-145 e^x x^3+36 e^x x^4-7 e^x x^5+e^x x^6+24 \int e^x \, dx-120 \int e^x x \, dx+360 \int e^x x^2 \, dx\\ &=31 e^x-150 e^x x+435 e^x x^2-145 e^x x^3+36 e^x x^4-7 e^x x^5+e^x x^6+120 \int e^x \, dx-720 \int e^x x \, dx\\ &=151 e^x-870 e^x x+435 e^x x^2-145 e^x x^3+36 e^x x^4-7 e^x x^5+e^x x^6+720 \int e^x \, dx\\ &=871 e^x-870 e^x x+435 e^x x^2-145 e^x x^3+36 e^x x^4-7 e^x x^5+e^x x^6\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 32, normalized size = 0.63 \begin {gather*} e^x \left (871-870 x+435 x^2-145 x^3+36 x^4-7 x^5+x^6\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 45, normalized size = 0.88
method | result | size |
gosper | \(\left (x^{6}-7 x^{5}+36 x^{4}-145 x^{3}+435 x^{2}-870 x +871\right ) {\mathrm e}^{x}\) | \(32\) |
risch | \(\left (x^{6}-7 x^{5}+36 x^{4}-145 x^{3}+435 x^{2}-870 x +871\right ) {\mathrm e}^{x}\) | \(32\) |
default | \(871 \,{\mathrm e}^{x}-870 \,{\mathrm e}^{x} x +435 \,{\mathrm e}^{x} x^{2}-145 \,{\mathrm e}^{x} x^{3}+36 \,{\mathrm e}^{x} x^{4}-7 \,{\mathrm e}^{x} x^{5}+{\mathrm e}^{x} x^{6}\) | \(45\) |
norman | \(871 \,{\mathrm e}^{x}-870 \,{\mathrm e}^{x} x +435 \,{\mathrm e}^{x} x^{2}-145 \,{\mathrm e}^{x} x^{3}+36 \,{\mathrm e}^{x} x^{4}-7 \,{\mathrm e}^{x} x^{5}+{\mathrm e}^{x} x^{6}\) | \(45\) |
meijerg | \(-871+\frac {\left (7 x^{6}-42 x^{5}+210 x^{4}-840 x^{3}+2520 x^{2}-5040 x +5040\right ) {\mathrm e}^{x}}{7}+\frac {\left (-6 x^{5}+30 x^{4}-120 x^{3}+360 x^{2}-720 x +720\right ) {\mathrm e}^{x}}{6}+\frac {\left (5 x^{4}-20 x^{3}+60 x^{2}-120 x +120\right ) {\mathrm e}^{x}}{5}+\frac {\left (-4 x^{3}+12 x^{2}-24 x +24\right ) {\mathrm e}^{x}}{4}+{\mathrm e}^{x}\) | \(111\) |
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. 99 vs.
\(2 (44) = 88\).
time = 2.40, size = 99, normalized size = 1.94 \begin {gather*} {\left (x^{6} - 6 \, x^{5} + 30 \, x^{4} - 120 \, x^{3} + 360 \, x^{2} - 720 \, x + 720\right )} e^{x} - {\left (x^{5} - 5 \, x^{4} + 20 \, x^{3} - 60 \, x^{2} + 120 \, x - 120\right )} e^{x} + {\left (x^{4} - 4 \, x^{3} + 12 \, x^{2} - 24 \, x + 24\right )} e^{x} - {\left (x^{3} - 3 \, x^{2} + 6 \, x - 6\right )} e^{x} + e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.66, size = 31, normalized size = 0.61 \begin {gather*} {\left (x^{6} - 7 \, x^{5} + 36 \, x^{4} - 145 \, x^{3} + 435 \, x^{2} - 870 \, x + 871\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.03, size = 31, normalized size = 0.61 \begin {gather*} \left (x^{6} - 7 x^{5} + 36 x^{4} - 145 x^{3} + 435 x^{2} - 870 x + 871\right ) e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 31, normalized size = 0.61 \begin {gather*} {\left (x^{6} - 7 \, x^{5} + 36 \, x^{4} - 145 \, x^{3} + 435 \, x^{2} - 870 \, x + 871\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 31, normalized size = 0.61 \begin {gather*} {\mathrm {e}}^x\,\left (x^6-7\,x^5+36\,x^4-145\,x^3+435\,x^2-870\,x+871\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________