Optimal. Leaf size=25 \[ e^{x^2}+\frac {4}{e^2 x}+2 x+\frac {x}{2+e+x} \]
________________________________________________________________________________________
Rubi [B] time = 1.07, antiderivative size = 213, normalized size of antiderivative = 8.52, number of steps used = 15, number of rules used = 9, integrand size = 148, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {6, 12, 6741, 27, 6742, 2209, 44, 77, 683} \begin {gather*} e^{x^2}+2 x+\frac {4 \left (4+e^2\right )}{e^2 (2+e)^2 (x+e+2)}-\frac {2+e}{x+e+2}-\frac {16}{e^2 (2+e) (x+e+2)}-\frac {8}{(2+e)^2 (x+e+2)}+\frac {4}{e^2 (x+e+2)}+\frac {4 \left (4+e^2\right )}{e^2 (2+e)^2 x}+\frac {16}{e (2+e)^2 x}+\frac {8 \left (4+e^2\right ) \log (x)}{e^2 (2+e)^3}-\frac {16 \log (x)}{e^2 (2+e)^2}+\frac {8 (2-e) \log (x)}{e (2+e)^3}-\frac {8 \left (4+e^2\right ) \log (x+e+2)}{e^2 (2+e)^3}+\frac {16 \log (x+e+2)}{e^2 (2+e)^2}-\frac {8 (2-e) \log (x+e+2)}{e (2+e)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 12
Rule 27
Rule 44
Rule 77
Rule 683
Rule 2209
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-16-4 e^2+e (-16-8 x)-16 x-4 x^2+e^2 \left (10 x^2+2 e^2 x^2+8 x^3+2 x^4+e \left (9 x^2+4 x^3\right )\right )+e^{2+x^2} \left (8 x^3+2 e^2 x^3+8 x^4+2 x^5+e \left (8 x^3+4 x^4\right )\right )}{e^2 \left (\left (4+e^2\right ) x^2+4 x^3+x^4+e \left (4 x^2+2 x^3\right )\right )} \, dx\\ &=\frac {\int \frac {-16-4 e^2+e (-16-8 x)-16 x-4 x^2+e^2 \left (10 x^2+2 e^2 x^2+8 x^3+2 x^4+e \left (9 x^2+4 x^3\right )\right )+e^{2+x^2} \left (8 x^3+2 e^2 x^3+8 x^4+2 x^5+e \left (8 x^3+4 x^4\right )\right )}{\left (4+e^2\right ) x^2+4 x^3+x^4+e \left (4 x^2+2 x^3\right )} \, dx}{e^2}\\ &=\frac {\int \frac {-16 \left (1+\frac {e^2}{4}\right )+e (-16-8 x)-16 x-4 x^2+e^2 \left (10 x^2+2 e^2 x^2+8 x^3+2 x^4+e \left (9 x^2+4 x^3\right )\right )+e^{2+x^2} \left (8 x^3+2 e^2 x^3+8 x^4+2 x^5+e \left (8 x^3+4 x^4\right )\right )}{x^2 \left ((2+e)^2+2 (2+e) x+x^2\right )} \, dx}{e^2}\\ &=\frac {\int \frac {-16 \left (1+\frac {e^2}{4}\right )+e (-16-8 x)-16 x-4 x^2+e^2 \left (10 x^2+2 e^2 x^2+8 x^3+2 x^4+e \left (9 x^2+4 x^3\right )\right )+e^{2+x^2} \left (8 x^3+2 e^2 x^3+8 x^4+2 x^5+e \left (8 x^3+4 x^4\right )\right )}{x^2 (2+e+x)^2} \, dx}{e^2}\\ &=\frac {\int \left (2 e^{2+x^2} x-\frac {4}{(2+e+x)^2}-\frac {4 \left (4+e^2\right )}{x^2 (2+e+x)^2}-\frac {16}{x (2+e+x)^2}-\frac {8 e (2+x)}{x^2 (2+e+x)^2}+\frac {e^2 \left ((2+e) (5+2 e)+4 (2+e) x+2 x^2\right )}{(2+e+x)^2}\right ) \, dx}{e^2}\\ &=\frac {4}{e^2 (2+e+x)}+\frac {2 \int e^{2+x^2} x \, dx}{e^2}-\frac {16 \int \frac {1}{x (2+e+x)^2} \, dx}{e^2}-\frac {8 \int \frac {2+x}{x^2 (2+e+x)^2} \, dx}{e}-\frac {\left (4 \left (4+e^2\right )\right ) \int \frac {1}{x^2 (2+e+x)^2} \, dx}{e^2}+\int \frac {(2+e) (5+2 e)+4 (2+e) x+2 x^2}{(2+e+x)^2} \, dx\\ &=e^{x^2}+\frac {4}{e^2 (2+e+x)}-\frac {16 \int \left (\frac {1}{(2+e)^2 x}-\frac {1}{(2+e) (2+e+x)^2}-\frac {1}{(2+e)^2 (2+e+x)}\right ) \, dx}{e^2}-\frac {8 \int \left (\frac {2}{(2+e)^2 x^2}+\frac {-2+e}{(2+e)^3 x}-\frac {e}{(2+e)^2 (2+e+x)^2}+\frac {2-e}{(2+e)^3 (2+e+x)}\right ) \, dx}{e}-\frac {\left (4 \left (4+e^2\right )\right ) \int \left (\frac {1}{(2+e)^2 x^2}-\frac {2}{(2+e)^3 x}+\frac {1}{(2+e)^2 (2+e+x)^2}+\frac {2}{(2+e)^3 (2+e+x)}\right ) \, dx}{e^2}+\int \left (2+\frac {2+e}{(2+e+x)^2}\right ) \, dx\\ &=e^{x^2}+\frac {16}{e (2+e)^2 x}+\frac {4 \left (4+e^2\right )}{e^2 (2+e)^2 x}+2 x+\frac {4}{e^2 (2+e+x)}-\frac {8}{(2+e)^2 (2+e+x)}-\frac {16}{e^2 (2+e) (2+e+x)}-\frac {2+e}{2+e+x}+\frac {4 \left (4+e^2\right )}{e^2 (2+e)^2 (2+e+x)}+\frac {8 (2-e) \log (x)}{e (2+e)^3}-\frac {16 \log (x)}{e^2 (2+e)^2}+\frac {8 \left (4+e^2\right ) \log (x)}{e^2 (2+e)^3}-\frac {8 (2-e) \log (2+e+x)}{e (2+e)^3}+\frac {16 \log (2+e+x)}{e^2 (2+e)^2}-\frac {8 \left (4+e^2\right ) \log (2+e+x)}{e^2 (2+e)^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 37, normalized size = 1.48 \begin {gather*} \frac {e^{2+x^2}+\frac {4}{x}+2 e^2 x-\frac {e^2 (2+e)}{2+e+x}}{e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.63, size = 73, normalized size = 2.92 \begin {gather*} \frac {{\left (2 \, x^{2} - x\right )} e^{3} + 2 \, {\left (x^{3} + 2 \, x^{2} - x\right )} e^{2} + {\left (x^{2} + x e + 2 \, x\right )} e^{\left (x^{2} + 2\right )} + 4 \, x + 4 \, e + 8}{x e^{3} + {\left (x^{2} + 2 \, x\right )} e^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.32, size = 83, normalized size = 3.32 \begin {gather*} \frac {{\left (2 \, x^{3} e^{2} + 2 \, x^{2} e^{3} + 4 \, x^{2} e^{2} + x^{2} e^{\left (x^{2} + 2\right )} - x e^{3} - 2 \, x e^{2} + x e^{\left (x^{2} + 3\right )} + 2 \, x e^{\left (x^{2} + 2\right )} + 4 \, x + 4 \, e + 8\right )} e^{\left (-2\right )}}{x^{2} + x e + 2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 40, normalized size = 1.60
method | result | size |
risch | \(2 x +\frac {{\mathrm e}^{-2} \left (\left (-{\mathrm e}^{3}-2 \,{\mathrm e}^{2}+4\right ) x +4 \,{\mathrm e}+8\right )}{\left (2+x +{\mathrm e}\right ) x}+{\mathrm e}^{x^{2}}\) | \(40\) |
norman | \(\frac {x^{2} {\mathrm e}^{x^{2}}-\left (2 \left ({\mathrm e}^{2}\right )^{2}+9 \,{\mathrm e} \,{\mathrm e}^{2}+10 \,{\mathrm e}^{2}-4\right ) {\mathrm e}^{-2} x +x \left ({\mathrm e}+2\right ) {\mathrm e}^{x^{2}}+2 x^{3}+4 \left ({\mathrm e}+2\right ) {\mathrm e}^{-2}}{x \left (2+x +{\mathrm e}\right )}\) | \(73\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.93, size = 480, normalized size = 19.20 \begin {gather*} {\left (4 \, {\left (\frac {e + 2}{x + e + 2} + \log \left (x + e + 2\right )\right )} e^{3} - 2 \, {\left (2 \, {\left (e + 2\right )} \log \left (x + e + 2\right ) - x + \frac {e^{2} + 4 \, e + 4}{x + e + 2}\right )} e^{2} + 4 \, {\left (\frac {2 \, x + e + 2}{x^{2} {\left (e^{2} + 4 \, e + 4\right )} + x {\left (e^{3} + 6 \, e^{2} + 12 \, e + 8\right )}} - \frac {2 \, \log \left (x + e + 2\right )}{e^{3} + 6 \, e^{2} + 12 \, e + 8} + \frac {2 \, \log \relax (x)}{e^{3} + 6 \, e^{2} + 12 \, e + 8}\right )} e^{2} + 8 \, {\left (\frac {e + 2}{x + e + 2} + \log \left (x + e + 2\right )\right )} e^{2} + 16 \, {\left (\frac {2 \, x + e + 2}{x^{2} {\left (e^{2} + 4 \, e + 4\right )} + x {\left (e^{3} + 6 \, e^{2} + 12 \, e + 8\right )}} - \frac {2 \, \log \left (x + e + 2\right )}{e^{3} + 6 \, e^{2} + 12 \, e + 8} + \frac {2 \, \log \relax (x)}{e^{3} + 6 \, e^{2} + 12 \, e + 8}\right )} e + 8 \, {\left (\frac {\log \left (x + e + 2\right )}{e^{2} + 4 \, e + 4} - \frac {\log \relax (x)}{e^{2} + 4 \, e + 4} - \frac {1}{x {\left (e + 2\right )} + e^{2} + 4 \, e + 4}\right )} e + \frac {16 \, {\left (2 \, x + e + 2\right )}}{x^{2} {\left (e^{2} + 4 \, e + 4\right )} + x {\left (e^{3} + 6 \, e^{2} + 12 \, e + 8\right )}} - \frac {2 \, e^{4}}{x + e + 2} - \frac {9 \, e^{3}}{x + e + 2} - \frac {10 \, e^{2}}{x + e + 2} - \frac {32 \, \log \left (x + e + 2\right )}{e^{3} + 6 \, e^{2} + 12 \, e + 8} + \frac {16 \, \log \left (x + e + 2\right )}{e^{2} + 4 \, e + 4} + \frac {32 \, \log \relax (x)}{e^{3} + 6 \, e^{2} + 12 \, e + 8} - \frac {16 \, \log \relax (x)}{e^{2} + 4 \, e + 4} - \frac {16}{x {\left (e + 2\right )} + e^{2} + 4 \, e + 4} + \frac {4}{x + e + 2} + e^{\left (x^{2} + 2\right )}\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.51, size = 44, normalized size = 1.76 \begin {gather*} 2\,x+{\mathrm {e}}^{x^2}+\frac {4\,\mathrm {e}-x\,\left (2\,{\mathrm {e}}^2+{\mathrm {e}}^3-4\right )+8}{{\mathrm {e}}^2\,x^2+\left (2\,{\mathrm {e}}^2+{\mathrm {e}}^3\right )\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.02, size = 42, normalized size = 1.68 \begin {gather*} 2 x + e^{x^{2}} + \frac {x \left (- e^{3} - 2 e^{2} + 4\right ) + 8 + 4 e}{x^{2} e^{2} + x \left (2 e^{2} + e^{3}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________