Optimal. Leaf size=33 \[ \frac {1}{9} e^x \left (e^{-(4-x)^2+x-x^2} (7-x)+x\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.36, antiderivative size = 51, normalized size of antiderivative = 1.55, number of steps used = 17, number of rules used = 7, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {6742, 2176, 2194, 2234, 2205, 2240, 2241} \begin {gather*} -\frac {1}{9} e^{-2 x^2+10 x-16} x+\frac {7}{9} e^{-2 x^2+10 x-16}-\frac {e^x}{9}+\frac {1}{9} e^x (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2194
Rule 2205
Rule 2234
Rule 2240
Rule 2241
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1}{9} e^x (1+x)+\frac {1}{9} e^{-16+10 x-2 x^2} \left (69-38 x+4 x^2\right )\right ) \, dx\\ &=\frac {1}{9} \int e^x (1+x) \, dx+\frac {1}{9} \int e^{-16+10 x-2 x^2} \left (69-38 x+4 x^2\right ) \, dx\\ &=\frac {1}{9} e^x (1+x)-\frac {\int e^x \, dx}{9}+\frac {1}{9} \int \left (69 e^{-16+10 x-2 x^2}-38 e^{-16+10 x-2 x^2} x+4 e^{-16+10 x-2 x^2} x^2\right ) \, dx\\ &=-\frac {e^x}{9}+\frac {1}{9} e^x (1+x)+\frac {4}{9} \int e^{-16+10 x-2 x^2} x^2 \, dx-\frac {38}{9} \int e^{-16+10 x-2 x^2} x \, dx+\frac {23}{3} \int e^{-16+10 x-2 x^2} \, dx\\ &=-\frac {e^x}{9}+\frac {19}{18} e^{-16+10 x-2 x^2}-\frac {1}{9} e^{-16+10 x-2 x^2} x+\frac {1}{9} e^x (1+x)+\frac {1}{9} \int e^{-16+10 x-2 x^2} \, dx+\frac {10}{9} \int e^{-16+10 x-2 x^2} x \, dx-\frac {95}{9} \int e^{-16+10 x-2 x^2} \, dx+\frac {23 \int e^{-\frac {1}{8} (10-4 x)^2} \, dx}{3 e^{7/2}}\\ &=-\frac {e^x}{9}+\frac {7}{9} e^{-16+10 x-2 x^2}-\frac {1}{9} e^{-16+10 x-2 x^2} x+\frac {1}{9} e^x (1+x)-\frac {23 \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {5-2 x}{\sqrt {2}}\right )}{6 e^{7/2}}+\frac {25}{9} \int e^{-16+10 x-2 x^2} \, dx+\frac {\int e^{-\frac {1}{8} (10-4 x)^2} \, dx}{9 e^{7/2}}-\frac {95 \int e^{-\frac {1}{8} (10-4 x)^2} \, dx}{9 e^{7/2}}\\ &=-\frac {e^x}{9}+\frac {7}{9} e^{-16+10 x-2 x^2}-\frac {1}{9} e^{-16+10 x-2 x^2} x+\frac {1}{9} e^x (1+x)+\frac {25 \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {5-2 x}{\sqrt {2}}\right )}{18 e^{7/2}}+\frac {25 \int e^{-\frac {1}{8} (10-4 x)^2} \, dx}{9 e^{7/2}}\\ &=-\frac {e^x}{9}+\frac {7}{9} e^{-16+10 x-2 x^2}-\frac {1}{9} e^{-16+10 x-2 x^2} x+\frac {1}{9} e^x (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 36, normalized size = 1.09 \begin {gather*} \frac {1}{9} e^{-16+x-2 x^2} \left (-e^{9 x} (-7+x)+e^{2 \left (8+x^2\right )} x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 25, normalized size = 0.76 \begin {gather*} \frac {1}{9} \, x e^{x} + \frac {1}{9} \, e^{\left (-2 \, x^{2} + 10 \, x + \log \left (-x + 7\right ) - 16\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 36, normalized size = 1.09 \begin {gather*} -\frac {1}{9} \, {\left (x e^{\left (-2 \, x^{2} + 10 \, x\right )} - x e^{\left (x + 16\right )} - 7 \, e^{\left (-2 \, x^{2} + 10 \, x\right )}\right )} e^{\left (-16\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.28, size = 25, normalized size = 0.76
method | result | size |
risch | \(\frac {{\mathrm e}^{x} x}{9}+\frac {\left (-x +7\right ) {\mathrm e}^{-2 x^{2}+10 x -16}}{9}\) | \(25\) |
norman | \(\frac {{\mathrm e}^{x} x}{9}+\frac {{\mathrm e}^{x} {\mathrm e}^{\ln \left (-x +7\right )-2 x^{2}+9 x -16}}{9}\) | \(28\) |
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*} -\frac {1}{9} \, {\left ({\left (x - 7\right )} e^{\left (-2 \, x^{2} + 10 \, x\right )} - x e^{\left (x + 16\right )}\right )} e^{\left (-16\right )} + \frac {7}{9} \, e^{7} E_{1}\left (-x + 7\right ) + \frac {7}{9} \, \int \frac {e^{x}}{x - 7}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.10, size = 35, normalized size = 1.06 \begin {gather*} \frac {x\,{\mathrm {e}}^x}{9}+\frac {7\,{\mathrm {e}}^{10\,x}\,{\mathrm {e}}^{-16}\,{\mathrm {e}}^{-2\,x^2}}{9}-\frac {x\,{\mathrm {e}}^{10\,x}\,{\mathrm {e}}^{-16}\,{\mathrm {e}}^{-2\,x^2}}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.23, size = 29, normalized size = 0.88 \begin {gather*} \frac {x e^{x}}{9} + \frac {\left (- x e^{x} + 7 e^{x}\right ) e^{- 2 x^{2} + 9 x - 16}}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________