Optimal. Leaf size=21 \[ -1+\frac {x}{20}+\left (e^{-x}-e^x+x\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.04, antiderivative size = 51, normalized size of antiderivative = 2.43, number of steps used = 8, number of rules used = 3, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.070, Rules used = {12, 2194, 2176} \begin {gather*} x^2+\frac {x}{20}+e^{-2 x}+2 e^{-x}+2 e^x+e^{2 x}-2 e^{-x} (1-x)-2 e^x (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2194
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{20} \int \left (1-40 e^{-2 x}+40 e^{2 x}+e^x (-40-40 x)+e^{-x} (40-40 x)+40 x\right ) \, dx\\ &=\frac {x}{20}+x^2+\frac {1}{20} \int e^x (-40-40 x) \, dx+\frac {1}{20} \int e^{-x} (40-40 x) \, dx-2 \int e^{-2 x} \, dx+2 \int e^{2 x} \, dx\\ &=e^{-2 x}+e^{2 x}-2 e^{-x} (1-x)+\frac {x}{20}+x^2-2 e^x (1+x)-2 \int e^{-x} \, dx+2 \int e^x \, dx\\ &=e^{-2 x}+2 e^{-x}+2 e^x+e^{2 x}-2 e^{-x} (1-x)+\frac {x}{20}+x^2-2 e^x (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 33, normalized size = 1.57 \begin {gather*} e^{-2 x}+e^{2 x}+\frac {x}{20}+2 e^{-x} x-2 e^x x+x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.58, size = 39, normalized size = 1.86 \begin {gather*} -\frac {1}{20} \, {\left (40 \, x e^{\left (3 \, x\right )} - {\left (20 \, x^{2} + x\right )} e^{\left (2 \, x\right )} - 40 \, x e^{x} - 20 \, e^{\left (4 \, x\right )} - 20\right )} e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 3.94, size = 27, normalized size = 1.29 \begin {gather*} x^{2} + 2 \, x e^{\left (-x\right )} - 2 \, x e^{x} + \frac {1}{20} \, x + e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 28, normalized size = 1.33
method | result | size |
risch | \(\frac {x}{20}+x^{2}+{\mathrm e}^{2 x}+{\mathrm e}^{-2 x}-2 \,{\mathrm e}^{x} x +2 x \,{\mathrm e}^{-x}\) | \(28\) |
default | \(\frac {x}{20}+x^{2}+{\mathrm e}^{2 x}+{\mathrm e}^{-2 x}-2 \,{\mathrm e}^{x} x +2 x \,{\mathrm e}^{-x}\) | \(30\) |
norman | \(\left (1+{\mathrm e}^{4 x}+{\mathrm e}^{2 x} x^{2}+\frac {x \,{\mathrm e}^{2 x}}{20}-2 x \,{\mathrm e}^{3 x}+2 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{-2 x}\) | \(39\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 27, normalized size = 1.29 \begin {gather*} x^{2} + 2 \, x e^{\left (-x\right )} - 2 \, x e^{x} + \frac {1}{20} \, x + e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 27, normalized size = 1.29 \begin {gather*} \frac {x}{20}+{\mathrm {e}}^{-2\,x}+{\mathrm {e}}^{2\,x}+2\,x\,{\mathrm {e}}^{-x}-2\,x\,{\mathrm {e}}^x+x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.15, size = 31, normalized size = 1.48 \begin {gather*} x^{2} - 2 x e^{x} + \frac {x}{20} + 2 x e^{- x} + e^{2 x} + e^{- 2 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________