Optimal. Leaf size=29 \[ \left (5+e^x\right ) x \left (1+x \left (1+\left (5-\frac {5}{2+e^2}-x\right ) x\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.40, antiderivative size = 227, normalized size of antiderivative = 7.83, number of steps used = 37, number of rules used = 4, integrand size = 88, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {12, 2196, 2194, 2176} \begin {gather*} -\frac {2 e^x x^4}{2+e^2}-\frac {e^{x+2} x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {10 x^4}{2+e^2}+\frac {5 e^x x^3}{2+e^2}+\frac {5 e^{x+2} x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {2 e^x x^2}{2+e^2}+\frac {e^{x+2} x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {2 e^x x}{2+e^2}+\frac {e^{x+2} x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {10 x}{2+e^2} \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 {\int \left (10+20 x+75 x^2-40 x^3+e^2 \left (5+10 x+75 x^2-20 x^3\right )+e^x \left (2+6 x+17 x^2-3 x^3-2 x^4+e^2 \left (1+3 x+16 x^2+x^3-x^4\right )\right )\right ) \, dx}{2+e^2}\\ &=\frac {10 x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {25 x^3}{2+e^2}-\frac {10 x^4}{2+e^2}+\frac {\int e^x \left (2+6 x+17 x^2-3 x^3-2 x^4+e^2 \left (1+3 x+16 x^2+x^3-x^4\right )\right ) \, dx}{2+e^2}+\frac {e^2 \int \left (5+10 x+75 x^2-20 x^3\right ) \, dx}{2+e^2}\\ &=\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}+\frac {\int \left (2 e^x+6 e^x x+17 e^x x^2-3 e^x x^3-2 e^x x^4-e^{2+x} \left (-1-3 x-16 x^2-x^3+x^4\right )\right ) \, dx}{2+e^2}\\ &=\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {\int e^{2+x} \left (-1-3 x-16 x^2-x^3+x^4\right ) \, dx}{2+e^2}+\frac {2 \int e^x \, dx}{2+e^2}-\frac {2 \int e^x x^4 \, dx}{2+e^2}-\frac {3 \int e^x x^3 \, dx}{2+e^2}+\frac {6 \int e^x x \, dx}{2+e^2}+\frac {17 \int e^x x^2 \, dx}{2+e^2}\\ &=\frac {2 e^x}{2+e^2}+\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {6 e^x x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {17 e^x x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}-\frac {3 e^x x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {2 e^x x^4}{2+e^2}-\frac {\int \left (-e^{2+x}-3 e^{2+x} x-16 e^{2+x} x^2-e^{2+x} x^3+e^{2+x} x^4\right ) \, dx}{2+e^2}-\frac {6 \int e^x \, dx}{2+e^2}+\frac {8 \int e^x x^3 \, dx}{2+e^2}+\frac {9 \int e^x x^2 \, dx}{2+e^2}-\frac {34 \int e^x x \, dx}{2+e^2}\\ &=-\frac {4 e^x}{2+e^2}+\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}-\frac {28 e^x x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {26 e^x x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}+\frac {5 e^x x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {2 e^x x^4}{2+e^2}+\frac {\int e^{2+x} \, dx}{2+e^2}+\frac {\int e^{2+x} x^3 \, dx}{2+e^2}-\frac {\int e^{2+x} x^4 \, dx}{2+e^2}+\frac {3 \int e^{2+x} x \, dx}{2+e^2}+\frac {16 \int e^{2+x} x^2 \, dx}{2+e^2}-\frac {18 \int e^x x \, dx}{2+e^2}-\frac {24 \int e^x x^2 \, dx}{2+e^2}+\frac {34 \int e^x \, dx}{2+e^2}\\ &=\frac {30 e^x}{2+e^2}+\frac {e^{2+x}}{2+e^2}+\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}-\frac {46 e^x x}{2+e^2}+\frac {3 e^{2+x} x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {2 e^x x^2}{2+e^2}+\frac {16 e^{2+x} x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}+\frac {5 e^x x^3}{2+e^2}+\frac {e^{2+x} x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {2 e^x x^4}{2+e^2}-\frac {e^{2+x} x^4}{2+e^2}-\frac {3 \int e^{2+x} \, dx}{2+e^2}-\frac {3 \int e^{2+x} x^2 \, dx}{2+e^2}+\frac {4 \int e^{2+x} x^3 \, dx}{2+e^2}+\frac {18 \int e^x \, dx}{2+e^2}-\frac {32 \int e^{2+x} x \, dx}{2+e^2}+\frac {48 \int e^x x \, dx}{2+e^2}\\ &=\frac {48 e^x}{2+e^2}-\frac {2 e^{2+x}}{2+e^2}+\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {2 e^x x}{2+e^2}-\frac {29 e^{2+x} x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {2 e^x x^2}{2+e^2}+\frac {13 e^{2+x} x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}+\frac {5 e^x x^3}{2+e^2}+\frac {5 e^{2+x} x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {2 e^x x^4}{2+e^2}-\frac {e^{2+x} x^4}{2+e^2}+\frac {6 \int e^{2+x} x \, dx}{2+e^2}-\frac {12 \int e^{2+x} x^2 \, dx}{2+e^2}+\frac {32 \int e^{2+x} \, dx}{2+e^2}-\frac {48 \int e^x \, dx}{2+e^2}\\ &=\frac {30 e^{2+x}}{2+e^2}+\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {2 e^x x}{2+e^2}-\frac {23 e^{2+x} x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {2 e^x x^2}{2+e^2}+\frac {e^{2+x} x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}+\frac {5 e^x x^3}{2+e^2}+\frac {5 e^{2+x} x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {2 e^x x^4}{2+e^2}-\frac {e^{2+x} x^4}{2+e^2}-\frac {6 \int e^{2+x} \, dx}{2+e^2}+\frac {24 \int e^{2+x} x \, dx}{2+e^2}\\ &=\frac {24 e^{2+x}}{2+e^2}+\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {2 e^x x}{2+e^2}+\frac {e^{2+x} x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {2 e^x x^2}{2+e^2}+\frac {e^{2+x} x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}+\frac {5 e^x x^3}{2+e^2}+\frac {5 e^{2+x} x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {2 e^x x^4}{2+e^2}-\frac {e^{2+x} x^4}{2+e^2}-\frac {24 \int e^{2+x} \, dx}{2+e^2}\\ &=\frac {10 x}{2+e^2}+\frac {5 e^2 x}{2+e^2}+\frac {2 e^x x}{2+e^2}+\frac {e^{2+x} x}{2+e^2}+\frac {10 x^2}{2+e^2}+\frac {5 e^2 x^2}{2+e^2}+\frac {2 e^x x^2}{2+e^2}+\frac {e^{2+x} x^2}{2+e^2}+\frac {25 x^3}{2+e^2}+\frac {25 e^2 x^3}{2+e^2}+\frac {5 e^x x^3}{2+e^2}+\frac {5 e^{2+x} x^3}{2+e^2}-\frac {10 x^4}{2+e^2}-\frac {5 e^2 x^4}{2+e^2}-\frac {2 e^x x^4}{2+e^2}-\frac {e^{2+x} x^4}{2+e^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 47, normalized size = 1.62 \begin {gather*} -\frac {\left (5+e^x\right ) x \left (-2-2 x-5 x^2+2 x^3+e^2 \left (-1-x-5 x^2+x^3\right )\right )}{2+e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.66, size = 90, normalized size = 3.10 \begin {gather*} -\frac {10 \, x^{4} - 25 \, x^{3} - 10 \, x^{2} + 5 \, {\left (x^{4} - 5 \, x^{3} - x^{2} - x\right )} e^{2} + {\left (2 \, x^{4} - 5 \, x^{3} - 2 \, x^{2} + {\left (x^{4} - 5 \, x^{3} - x^{2} - x\right )} e^{2} - 2 \, x\right )} e^{x} - 10 \, x}{e^{2} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 92, normalized size = 3.17 \begin {gather*} -\frac {10 \, x^{4} - 25 \, x^{3} - 10 \, x^{2} + 5 \, {\left (x^{4} - 5 \, x^{3} - x^{2} - x\right )} e^{2} + {\left (x^{4} - 5 \, x^{3} - x^{2} - x\right )} e^{\left (x + 2\right )} + {\left (2 \, x^{4} - 5 \, x^{3} - 2 \, x^{2} - 2 \, x\right )} e^{x} - 10 \, x}{e^{2} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.04, size = 64, normalized size = 2.21
method | result | size |
norman | \({\mathrm e}^{x} x +{\mathrm e}^{x} x^{2}+5 x +5 x^{2}-5 x^{4}-{\mathrm e}^{x} x^{4}+\frac {25 \left ({\mathrm e}^{2}+1\right ) x^{3}}{{\mathrm e}^{2}+2}+\frac {5 \left ({\mathrm e}^{2}+1\right ) x^{3} {\mathrm e}^{x}}{{\mathrm e}^{2}+2}\) | \(64\) |
risch | \(-\frac {5 x^{4} {\mathrm e}^{2}}{{\mathrm e}^{2}+2}+\frac {25 x^{3} {\mathrm e}^{2}}{{\mathrm e}^{2}+2}-\frac {10 x^{4}}{{\mathrm e}^{2}+2}+\frac {5 x^{2} {\mathrm e}^{2}}{{\mathrm e}^{2}+2}+\frac {25 x^{3}}{{\mathrm e}^{2}+2}+\frac {5 \,{\mathrm e}^{2} x}{{\mathrm e}^{2}+2}+\frac {10 x^{2}}{{\mathrm e}^{2}+2}+\frac {10 x}{{\mathrm e}^{2}+2}+\frac {\left (-x^{4} {\mathrm e}^{2}+5 x^{3} {\mathrm e}^{2}-2 x^{4}+x^{2} {\mathrm e}^{2}+5 x^{3}+{\mathrm e}^{2} x +2 x^{2}+2 x \right ) {\mathrm e}^{x}}{{\mathrm e}^{2}+2}\) | \(146\) |
default | \(\frac {10 x +{\mathrm e}^{2} {\mathrm e}^{x}+{\mathrm e}^{2} \left ({\mathrm e}^{x} x^{3}-3 \,{\mathrm e}^{x} x^{2}+6 \,{\mathrm e}^{x} x -6 \,{\mathrm e}^{x}\right )+2 \,{\mathrm e}^{x} x +2 \,{\mathrm e}^{x} x^{2}+5 \,{\mathrm e}^{x} x^{3}-2 \,{\mathrm e}^{x} x^{4}+3 \,{\mathrm e}^{2} \left ({\mathrm e}^{x} x -{\mathrm e}^{x}\right )+16 \,{\mathrm e}^{2} \left ({\mathrm e}^{x} x^{2}-2 \,{\mathrm e}^{x} x +2 \,{\mathrm e}^{x}\right )-{\mathrm e}^{2} \left ({\mathrm e}^{x} x^{4}-4 \,{\mathrm e}^{x} x^{3}+12 \,{\mathrm e}^{x} x^{2}-24 \,{\mathrm e}^{x} x +24 \,{\mathrm e}^{x}\right )+{\mathrm e}^{2} \left (-5 x^{4}+25 x^{3}+5 x^{2}+5 x \right )+10 x^{2}+25 x^{3}-10 x^{4}}{{\mathrm e}^{2}+2}\) | \(173\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.38, size = 85, normalized size = 2.93 \begin {gather*} -\frac {10 \, x^{4} - 25 \, x^{3} - 10 \, x^{2} + 5 \, {\left (x^{4} - 5 \, x^{3} - x^{2} - x\right )} e^{2} + {\left (x^{4} {\left (e^{2} + 2\right )} - 5 \, x^{3} {\left (e^{2} + 1\right )} - x^{2} {\left (e^{2} + 2\right )} - x {\left (e^{2} + 2\right )}\right )} e^{x} - 10 \, x}{e^{2} + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.04, size = 47, normalized size = 1.62 \begin {gather*} \frac {x\,\left ({\mathrm {e}}^x+5\right )\,\left (2\,x+{\mathrm {e}}^2+x\,{\mathrm {e}}^2+5\,x^2\,{\mathrm {e}}^2-x^3\,{\mathrm {e}}^2+5\,x^2-2\,x^3+2\right )}{{\mathrm {e}}^2+2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.23, size = 82, normalized size = 2.83 \begin {gather*} - 5 x^{4} + \frac {x^{3} \left (25 + 25 e^{2}\right )}{2 + e^{2}} + 5 x^{2} + 5 x + \frac {\left (- x^{4} e^{2} - 2 x^{4} + 5 x^{3} + 5 x^{3} e^{2} + 2 x^{2} + x^{2} e^{2} + 2 x + x e^{2}\right ) e^{x}}{2 + e^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________