Optimal. Leaf size=32 \[ -1+x+\frac {1}{4} \left (5-e^{2+x}+x\right )^2+\frac {x}{\log \left (3-e^2+x\right )} \]
________________________________________________________________________________________
Rubi [B] time = 0.57, antiderivative size = 85, normalized size of antiderivative = 2.66, number of steps used = 15, number of rules used = 10, integrand size = 116, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {6688, 2194, 2176, 2411, 2353, 2297, 2298, 2302, 30, 2389} \begin {gather*} \frac {x^2}{4}+\frac {7 x}{2}+\frac {e^{x+2}}{2}+\frac {1}{4} e^{2 x+4}-\frac {1}{2} e^{x+2} (x+6)+\frac {x-e^2+3}{\log \left (x-e^2+3\right )}-\frac {3-e^2}{\log \left (x-e^2+3\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2176
Rule 2194
Rule 2297
Rule 2298
Rule 2302
Rule 2353
Rule 2389
Rule 2411
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1}{2} \left (7+e^{4+2 x}+x-e^{2+x} (6+x)\right )+\frac {x}{\left (-3+e^2-x\right ) \log ^2\left (3-e^2+x\right )}+\frac {1}{\log \left (3-e^2+x\right )}\right ) \, dx\\ &=\frac {1}{2} \int \left (7+e^{4+2 x}+x-e^{2+x} (6+x)\right ) \, dx+\int \frac {x}{\left (-3+e^2-x\right ) \log ^2\left (3-e^2+x\right )} \, dx+\int \frac {1}{\log \left (3-e^2+x\right )} \, dx\\ &=\frac {7 x}{2}+\frac {x^2}{4}+\frac {1}{2} \int e^{4+2 x} \, dx-\frac {1}{2} \int e^{2+x} (6+x) \, dx-\operatorname {Subst}\left (\int \frac {-3+e^2+x}{x \log ^2(x)} \, dx,x,3-e^2+x\right )+\operatorname {Subst}\left (\int \frac {1}{\log (x)} \, dx,x,3-e^2+x\right )\\ &=\frac {1}{4} e^{4+2 x}+\frac {7 x}{2}+\frac {x^2}{4}-\frac {1}{2} e^{2+x} (6+x)+\text {li}\left (3-e^2+x\right )+\frac {1}{2} \int e^{2+x} \, dx-\operatorname {Subst}\left (\int \left (\frac {1}{\log ^2(x)}+\frac {-3+e^2}{x \log ^2(x)}\right ) \, dx,x,3-e^2+x\right )\\ &=\frac {e^{2+x}}{2}+\frac {1}{4} e^{4+2 x}+\frac {7 x}{2}+\frac {x^2}{4}-\frac {1}{2} e^{2+x} (6+x)+\text {li}\left (3-e^2+x\right )-\left (-3+e^2\right ) \operatorname {Subst}\left (\int \frac {1}{x \log ^2(x)} \, dx,x,3-e^2+x\right )-\operatorname {Subst}\left (\int \frac {1}{\log ^2(x)} \, dx,x,3-e^2+x\right )\\ &=\frac {e^{2+x}}{2}+\frac {1}{4} e^{4+2 x}+\frac {7 x}{2}+\frac {x^2}{4}-\frac {1}{2} e^{2+x} (6+x)+\frac {3-e^2+x}{\log \left (3-e^2+x\right )}+\text {li}\left (3-e^2+x\right )-\left (-3+e^2\right ) \operatorname {Subst}\left (\int \frac {1}{x^2} \, dx,x,\log \left (3-e^2+x\right )\right )-\operatorname {Subst}\left (\int \frac {1}{\log (x)} \, dx,x,3-e^2+x\right )\\ &=\frac {e^{2+x}}{2}+\frac {1}{4} e^{4+2 x}+\frac {7 x}{2}+\frac {x^2}{4}-\frac {1}{2} e^{2+x} (6+x)-\frac {3-e^2}{\log \left (3-e^2+x\right )}+\frac {3-e^2+x}{\log \left (3-e^2+x\right )}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 0.11, size = 77, normalized size = 2.41 \begin {gather*} \frac {1}{4} e^{4+2 x}+\frac {7 x}{2}+\frac {x^2}{4}+\frac {1}{2} e^x \left (-5 e^2-e^2 x\right )-\text {Ei}\left (\log \left (3-e^2+x\right )\right )+\frac {x}{\log \left (3-e^2+x\right )}+\text {li}\left (3-e^2+x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 47, normalized size = 1.47 \begin {gather*} \frac {{\left (x^{2} - 2 \, {\left (x + 5\right )} e^{\left (x + 2\right )} + 14 \, x + e^{\left (2 \, x + 4\right )}\right )} \log \left (x - e^{2} + 3\right ) + 4 \, x}{4 \, \log \left (x - e^{2} + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 83, normalized size = 2.59 \begin {gather*} \frac {x^{2} \log \left (x - e^{2} + 3\right ) - 2 \, x e^{\left (x + 2\right )} \log \left (x - e^{2} + 3\right ) + 14 \, x \log \left (x - e^{2} + 3\right ) + e^{\left (2 \, x + 4\right )} \log \left (x - e^{2} + 3\right ) - 10 \, e^{\left (x + 2\right )} \log \left (x - e^{2} + 3\right ) + 4 \, x}{4 \, \log \left (x - e^{2} + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 43, normalized size = 1.34
method | result | size |
risch | \(\frac {7 x}{2}+\frac {x^{2}}{4}+\frac {{\mathrm e}^{2 x +4}}{4}-\frac {5 \,{\mathrm e}^{2+x}}{2}-\frac {x \,{\mathrm e}^{2+x}}{2}+\frac {x}{\ln \left (-{\mathrm e}^{2}+3+x \right )}\) | \(43\) |
default | \(\frac {7 x}{2}+\frac {x^{2}}{4}+\frac {{\mathrm e}^{2 x +4}}{4}-\frac {{\mathrm e}^{2+x} \left (2+x \right )}{2}-\frac {3 \,{\mathrm e}^{2+x}}{2}+\frac {-{\mathrm e}^{2}+3+x}{\ln \left (-{\mathrm e}^{2}+3+x \right )}+\frac {{\mathrm e}^{2}}{\ln \left (-{\mathrm e}^{2}+3+x \right )}-\frac {3}{\ln \left (-{\mathrm e}^{2}+3+x \right )}\) | \(76\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 51, normalized size = 1.59 \begin {gather*} \frac {{\left (x^{2} - 2 \, {\left (x e^{2} + 5 \, e^{2}\right )} e^{x} + 14 \, x + e^{\left (2 \, x + 4\right )}\right )} \log \left (x - e^{2} + 3\right ) + 4 \, x}{4 \, \log \left (x - e^{2} + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.29, size = 42, normalized size = 1.31 \begin {gather*} \frac {7\,x}{2}-\frac {5\,{\mathrm {e}}^{x+2}}{2}+\frac {{\mathrm {e}}^{2\,x+4}}{4}-\frac {x\,{\mathrm {e}}^{x+2}}{2}+\frac {x}{\ln \left (x-{\mathrm {e}}^2+3\right )}+\frac {x^2}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.48, size = 41, normalized size = 1.28 \begin {gather*} \frac {x^{2}}{4} + \frac {7 x}{2} + \frac {x}{\log {\left (x - e^{2} + 3 \right )}} + \frac {\left (- 4 x - 20\right ) e^{x + 2}}{8} + \frac {e^{2 x + 4}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________