Optimal. Leaf size=32 \[ -2-e^{2 x}+x+\left (-\frac {e^x}{x}+x \left (1-x^2\right )^2\right )^2 \]
________________________________________________________________________________________
Rubi [A] time = 0.33, antiderivative size = 60, normalized size of antiderivative = 1.88, number of steps used = 27, number of rules used = 7, integrand size = 79, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {14, 2196, 2194, 2176, 2199, 2177, 2178} \begin {gather*} x^{10}-4 x^8+6 x^6-2 e^x x^4-4 x^4+4 e^x x^2+x^2+\frac {e^{2 x}}{x^2}+x-2 e^x-e^{2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2196
Rule 2199
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (1+2 x-16 x^3+36 x^5-32 x^7+10 x^9-2 e^x (-1+x) (1+x) \left (-1+4 x+x^2\right )-\frac {2 e^{2 x} \left (1-x+x^3\right )}{x^3}\right ) \, dx\\ &=x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-2 \int e^x (-1+x) (1+x) \left (-1+4 x+x^2\right ) \, dx-2 \int \frac {e^{2 x} \left (1-x+x^3\right )}{x^3} \, dx\\ &=x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-2 \int \left (e^{2 x}+\frac {e^{2 x}}{x^3}-\frac {e^{2 x}}{x^2}\right ) \, dx-2 \int \left (e^x-4 e^x x-2 e^x x^2+4 e^x x^3+e^x x^4\right ) \, dx\\ &=x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-2 \int e^x \, dx-2 \int e^{2 x} \, dx-2 \int \frac {e^{2 x}}{x^3} \, dx+2 \int \frac {e^{2 x}}{x^2} \, dx-2 \int e^x x^4 \, dx+4 \int e^x x^2 \, dx+8 \int e^x x \, dx-8 \int e^x x^3 \, dx\\ &=-2 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}-\frac {2 e^{2 x}}{x}+x+8 e^x x+x^2+4 e^x x^2-8 e^x x^3-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}-2 \int \frac {e^{2 x}}{x^2} \, dx+4 \int \frac {e^{2 x}}{x} \, dx-8 \int e^x \, dx-8 \int e^x x \, dx+8 \int e^x x^3 \, dx+24 \int e^x x^2 \, dx\\ &=-10 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x+x^2+28 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}+4 \text {Ei}(2 x)-4 \int \frac {e^{2 x}}{x} \, dx+8 \int e^x \, dx-24 \int e^x x^2 \, dx-48 \int e^x x \, dx\\ &=-2 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x-48 e^x x+x^2+4 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}+48 \int e^x \, dx+48 \int e^x x \, dx\\ &=46 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x+x^2+4 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}-48 \int e^x \, dx\\ &=-2 e^x-e^{2 x}+\frac {e^{2 x}}{x^2}+x+x^2+4 e^x x^2-4 x^4-2 e^x x^4+6 x^6-4 x^8+x^{10}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 55, normalized size = 1.72 \begin {gather*} x+x^2-4 x^4+6 x^6-4 x^8+x^{10}-\frac {e^{2 x} \left (-x+x^3\right )}{x^3}-2 e^x \left (1-2 x^2+x^4\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 56, normalized size = 1.75 \begin {gather*} \frac {x^{12} - 4 \, x^{10} + 6 \, x^{8} - 4 \, x^{6} + x^{4} + x^{3} - {\left (x^{2} - 1\right )} e^{\left (2 \, x\right )} - 2 \, {\left (x^{6} - 2 \, x^{4} + x^{2}\right )} e^{x}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.27, size = 63, normalized size = 1.97 \begin {gather*} \frac {x^{12} - 4 \, x^{10} + 6 \, x^{8} - 2 \, x^{6} e^{x} - 4 \, x^{6} + 4 \, x^{4} e^{x} + x^{4} + x^{3} - x^{2} e^{\left (2 \, x\right )} - 2 \, x^{2} e^{x} + e^{\left (2 \, x\right )}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 53, normalized size = 1.66
method | result | size |
risch | \(x^{10}-4 x^{8}+6 x^{6}-4 x^{4}+x^{2}+x -\frac {\left (x^{2}-1\right ) {\mathrm e}^{2 x}}{x^{2}}+\left (-2 x^{4}+4 x^{2}-2\right ) {\mathrm e}^{x}\) | \(53\) |
default | \(x^{10}-4 x^{8}+6 x^{6}-4 x^{4}+x^{2}+x -{\mathrm e}^{2 x}+\frac {{\mathrm e}^{2 x}}{x^{2}}+4 \,{\mathrm e}^{x} x^{2}-2 \,{\mathrm e}^{x} x^{4}-2 \,{\mathrm e}^{x}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.61, size = 105, normalized size = 3.28 \begin {gather*} x^{10} - 4 \, x^{8} + 6 \, x^{6} - 4 \, x^{4} + x^{2} - 2 \, {\left (x^{4} - 4 \, x^{3} + 12 \, x^{2} - 24 \, x + 24\right )} e^{x} - 8 \, {\left (x^{3} - 3 \, x^{2} + 6 \, x - 6\right )} e^{x} + 4 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 8 \, {\left (x - 1\right )} e^{x} + x - e^{\left (2 \, x\right )} - 2 \, e^{x} + 4 \, \Gamma \left (-1, -2 \, x\right ) + 8 \, \Gamma \left (-2, -2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.08, size = 54, normalized size = 1.69 \begin {gather*} x-{\mathrm {e}}^{2\,x}-2\,{\mathrm {e}}^x+\frac {{\mathrm {e}}^{2\,x}}{x^2}+x^2\,\left (4\,{\mathrm {e}}^x+1\right )-x^4\,\left (2\,{\mathrm {e}}^x+4\right )+6\,x^6-4\,x^8+x^{10} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.14, size = 54, normalized size = 1.69 \begin {gather*} x^{10} - 4 x^{8} + 6 x^{6} - 4 x^{4} + x^{2} + x + \frac {\left (1 - x^{2}\right ) e^{2 x} + \left (- 2 x^{6} + 4 x^{4} - 2 x^{2}\right ) e^{x}}{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________