Optimal. Leaf size=21 \[ \left (6+e^{1-\frac {1}{x}-\frac {x}{4}}-2 x\right ) x \]
________________________________________________________________________________________
Rubi [B] time = 0.09, antiderivative size = 63, normalized size of antiderivative = 3.00, number of steps used = 4, number of rules used = 3, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {12, 14, 2288} \begin {gather*} \frac {e^{-\frac {(2-x)^2}{4 x}} \left (4-x^2\right )}{\left (\frac {(2-x)^2}{x^2}+\frac {2 (2-x)}{x}\right ) x}-\frac {1}{2} (3-2 x)^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2288
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{4} \int \frac {24 x-16 x^2+e^{\frac {-4+4 x-x^2}{4 x}} \left (4+4 x-x^2\right )}{x} \, dx\\ &=\frac {1}{4} \int \left (-8 (-3+2 x)+\frac {e^{-\frac {(-2+x)^2}{4 x}} \left (4+4 x-x^2\right )}{x}\right ) \, dx\\ &=-\frac {1}{2} (3-2 x)^2+\frac {1}{4} \int \frac {e^{-\frac {(-2+x)^2}{4 x}} \left (4+4 x-x^2\right )}{x} \, dx\\ &=-\frac {1}{2} (3-2 x)^2+\frac {e^{-\frac {(2-x)^2}{4 x}} \left (4-x^2\right )}{\left (\frac {(2-x)^2}{x^2}+\frac {2 (2-x)}{x}\right ) x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 21, normalized size = 1.00 \begin {gather*} \left (6+e^{1-\frac {1}{x}-\frac {x}{4}}-2 x\right ) x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 25, normalized size = 1.19 \begin {gather*} -2 \, x^{2} + x e^{\left (-\frac {x^{2} - 4 \, x + 4}{4 \, x}\right )} + 6 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 25, normalized size = 1.19 \begin {gather*} -2 \, x^{2} + x e^{\left (-\frac {x^{2} - 4 \, x + 4}{4 \, x}\right )} + 6 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 23, normalized size = 1.10
method | result | size |
risch | \(x \,{\mathrm e}^{-\frac {\left (x -2\right )^{2}}{4 x}}+6 x -2 x^{2}\) | \(23\) |
norman | \(x \,{\mathrm e}^{\frac {-x^{2}+4 x -4}{4 x}}+6 x -2 x^{2}\) | \(28\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 22, normalized size = 1.05 \begin {gather*} -2 \, x^{2} + x e^{\left (-\frac {1}{4} \, x - \frac {1}{x} + 1\right )} + 6 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.99, size = 18, normalized size = 0.86 \begin {gather*} x\,\left ({\mathrm {e}}^{1-\frac {1}{x}-\frac {x}{4}}-2\,x+6\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 20, normalized size = 0.95 \begin {gather*} - 2 x^{2} + x e^{\frac {- \frac {x^{2}}{4} + x - 1}{x}} + 6 x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________