Optimal. Leaf size=27 \[ \frac {2}{x}+e^{-x} (4+x)+\log \left (4 e^{2+x^2}+x\right ) \]
________________________________________________________________________________________
Rubi [F] time = 1.45, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {-3 x^3-x^4+e^x \left (-2 x+x^2\right )+e^{x^2} \left (e^2 \left (-12 x^2-4 x^3\right )+e^{2+x} \left (-8+8 x^3\right )\right )}{4 e^{2+x+x^2} x^2+e^x x^3} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (-3 x^3-x^4+e^x \left (-2 x+x^2\right )+e^{x^2} \left (e^2 \left (-12 x^2-4 x^3\right )+e^{2+x} \left (-8+8 x^3\right )\right )\right )}{x^2 \left (4 e^{2+x^2}+x\right )} \, dx\\ &=\int \left (-\frac {-1+2 x^2}{4 e^{2+x^2}+x}+\frac {e^{-x} \left (-2 e^x-3 x^2-x^3+2 e^x x^3\right )}{x^2}\right ) \, dx\\ &=-\int \frac {-1+2 x^2}{4 e^{2+x^2}+x} \, dx+\int \frac {e^{-x} \left (-2 e^x-3 x^2-x^3+2 e^x x^3\right )}{x^2} \, dx\\ &=\int \left (-\frac {2}{x^2}+2 x-e^{-x} (3+x)\right ) \, dx-\int \left (-\frac {1}{4 e^{2+x^2}+x}+\frac {2 x^2}{4 e^{2+x^2}+x}\right ) \, dx\\ &=\frac {2}{x}+x^2-2 \int \frac {x^2}{4 e^{2+x^2}+x} \, dx-\int e^{-x} (3+x) \, dx+\int \frac {1}{4 e^{2+x^2}+x} \, dx\\ &=\frac {2}{x}+x^2+e^{-x} (3+x)-2 \int \frac {x^2}{4 e^{2+x^2}+x} \, dx-\int e^{-x} \, dx+\int \frac {1}{4 e^{2+x^2}+x} \, dx\\ &=e^{-x}+\frac {2}{x}+x^2+e^{-x} (3+x)-2 \int \frac {x^2}{4 e^{2+x^2}+x} \, dx+\int \frac {1}{4 e^{2+x^2}+x} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.63, size = 27, normalized size = 1.00 \begin {gather*} \frac {2}{x}+e^{-x} (4+x)+\log \left (4 e^{2+x^2}+x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.38, size = 59, normalized size = 2.19 \begin {gather*} \frac {{\left (x e^{\left (x^{2} + x + 2\right )} \log \left (x + 4 \, e^{\left (x^{2} + 2\right )}\right ) + {\left (x^{2} + 4 \, x\right )} e^{\left (x^{2} + 2\right )} + 2 \, e^{\left (x^{2} + x + 2\right )}\right )} e^{\left (-x^{2} - x - 2\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 48, normalized size = 1.78 \begin {gather*} -\frac {{\left (x^{2} e^{x} - x e^{x} \log \left (x e^{x} + 4 \, e^{\left (x^{2} + x + 2\right )}\right ) - x^{2} - 4 \, x - 2 \, e^{x}\right )} e^{\left (-x\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 26, normalized size = 0.96
method | result | size |
risch | \(\frac {2}{x}+\left (4+x \right ) {\mathrm e}^{-x}+\ln \left ({\mathrm e}^{x^{2}}+\frac {x \,{\mathrm e}^{-2}}{4}\right )\) | \(26\) |
norman | \(\frac {\left (x^{2}+4 x +2 \,{\mathrm e}^{x}\right ) {\mathrm e}^{-x}}{x}+\ln \left (x +4 \,{\mathrm e}^{x^{2}} {\mathrm e}^{2}\right )\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 34, normalized size = 1.26 \begin {gather*} \frac {{\left (x^{2} + 4 \, x\right )} e^{\left (-x\right )} + 2}{x} + \log \left (\frac {1}{4} \, {\left (x + 4 \, e^{\left (x^{2} + 2\right )}\right )} e^{\left (-2\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.25, size = 29, normalized size = 1.07 \begin {gather*} 4\,{\mathrm {e}}^{-x}+\ln \left ({\mathrm {e}}^{x^2}+\frac {x\,{\mathrm {e}}^{-2}}{4}\right )+x\,{\mathrm {e}}^{-x}+\frac {2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.22, size = 22, normalized size = 0.81 \begin {gather*} \left (x + 4\right ) e^{- x} + \log {\left (\frac {x}{4 e^{2}} + e^{x^{2}} \right )} + \frac {2}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________