Optimal. Leaf size=31 \[ 3-\left (1+e^{\frac {-2+x}{(-e+x) (1+2 x)}}\right )^2-x \]
________________________________________________________________________________________
Rubi [B] time = 3.94, antiderivative size = 245, normalized size of antiderivative = 7.90, number of steps used = 13, number of rules used = 5, integrand size = 174, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.029, Rules used = {6688, 6742, 43, 88, 6706} \begin {gather*} -x-2 e^{\frac {2-x}{(e-x) (2 x+1)}}-e^{\frac {2 (2-x)}{(e-x) (2 x+1)}}-\frac {4 e^4}{(1+2 e)^2 (e-x)}-\frac {4 e^3}{(1+2 e)^2 (e-x)}-\frac {e^2}{(1+2 e)^2 (e-x)}+\frac {e^2}{e-x}-\frac {4 e^2 (3+2 e) \log (e-x)}{(1+2 e)^3}-\frac {16 e^3 (1+e) \log (e-x)}{(1+2 e)^3}-\frac {2 e \log (e-x)}{(1+2 e)^3}+2 e \log (e-x)-\frac {(1+6 e) \log (2 x+1)}{(1+2 e)^3}+\frac {(1+4 e) \log (2 x+1)}{(1+2 e)^3}+\frac {2 e \log (2 x+1)}{(1+2 e)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 88
Rule 6688
Rule 6706
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-x^2-4 x^3-4 x^4+2 e x (1+2 x)^2-(e+2 e x)^2+2 e^{\frac {2-x}{(e-x) (1+2 x)}} \left (-2+5 e-8 x+2 x^2\right )+2 e^{-\frac {2 (-2+x)}{(e-x) (1+2 x)}} \left (-2+5 e-8 x+2 x^2\right )}{(e-x)^2 (1+2 x)^2} \, dx\\ &=\int \left (-\frac {e^2}{(e-x)^2}+\frac {2 e x}{(e-x)^2}-\frac {x^2}{(e-x)^2 (1+2 x)^2}-\frac {4 x^3}{(e-x)^2 (1+2 x)^2}-\frac {4 x^4}{(e-x)^2 (1+2 x)^2}+\frac {2 e^{-\frac {2 (-2+x)}{(e-x) (1+2 x)}} \left (-2+5 e-8 x+2 x^2\right )}{(e-x)^2 (1+2 x)^2}+\frac {2 e^{-\frac {-2+x}{(e-x) (1+2 x)}} \left (-2+5 e-8 x+2 x^2\right )}{(e-x)^2 (1+2 x)^2}\right ) \, dx\\ &=-\frac {e^2}{e-x}+2 \int \frac {e^{-\frac {2 (-2+x)}{(e-x) (1+2 x)}} \left (-2+5 e-8 x+2 x^2\right )}{(e-x)^2 (1+2 x)^2} \, dx+2 \int \frac {e^{-\frac {-2+x}{(e-x) (1+2 x)}} \left (-2+5 e-8 x+2 x^2\right )}{(e-x)^2 (1+2 x)^2} \, dx-4 \int \frac {x^3}{(e-x)^2 (1+2 x)^2} \, dx-4 \int \frac {x^4}{(e-x)^2 (1+2 x)^2} \, dx+(2 e) \int \frac {x}{(e-x)^2} \, dx-\int \frac {x^2}{(e-x)^2 (1+2 x)^2} \, dx\\ &=-2 e^{\frac {2-x}{(e-x) (1+2 x)}}-e^{\frac {2 (2-x)}{(e-x) (1+2 x)}}-\frac {e^2}{e-x}-4 \int \left (\frac {1}{4}+\frac {e^4}{(1+2 e)^2 (e-x)^2}-\frac {4 e^3 (1+e)}{(1+2 e)^3 (e-x)}+\frac {1}{4 (1+2 e)^2 (1+2 x)^2}+\frac {-1-4 e}{2 (1+2 e)^3 (1+2 x)}\right ) \, dx-4 \int \left (\frac {e^3}{(1+2 e)^2 (e-x)^2}-\frac {e^2 (3+2 e)}{(1+2 e)^3 (e-x)}-\frac {1}{2 (1+2 e)^2 (1+2 x)^2}+\frac {1+6 e}{2 (1+2 e)^3 (1+2 x)}\right ) \, dx+(2 e) \int \left (\frac {e}{(e-x)^2}+\frac {1}{-e+x}\right ) \, dx-\int \left (\frac {e^2}{(1+2 e)^2 (e-x)^2}-\frac {2 e}{(1+2 e)^3 (e-x)}+\frac {1}{(1+2 e)^2 (1+2 x)^2}-\frac {4 e}{(1+2 e)^3 (1+2 x)}\right ) \, dx\\ &=-2 e^{\frac {2-x}{(e-x) (1+2 x)}}-e^{\frac {2 (2-x)}{(e-x) (1+2 x)}}+\frac {e^2}{e-x}-\frac {e^2}{(1+2 e)^2 (e-x)}-\frac {4 e^3}{(1+2 e)^2 (e-x)}-\frac {4 e^4}{(1+2 e)^2 (e-x)}-x+2 e \log (e-x)-\frac {2 e \log (e-x)}{(1+2 e)^3}-\frac {16 e^3 (1+e) \log (e-x)}{(1+2 e)^3}-\frac {4 e^2 (3+2 e) \log (e-x)}{(1+2 e)^3}+\frac {2 e \log (1+2 x)}{(1+2 e)^3}+\frac {(1+4 e) \log (1+2 x)}{(1+2 e)^3}-\frac {(1+6 e) \log (1+2 x)}{(1+2 e)^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 50, normalized size = 1.61 \begin {gather*} -e^{-\frac {2 (-2+x)}{(e-x) (1+2 x)}}-2 e^{-\frac {-2+x}{(e-x) (1+2 x)}}-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 55, normalized size = 1.77 \begin {gather*} -x - e^{\left (\frac {2 \, {\left (x - 2\right )}}{2 \, x^{2} - {\left (2 \, x + 1\right )} e + x}\right )} - 2 \, e^{\left (\frac {x - 2}{2 \, x^{2} - {\left (2 \, x + 1\right )} e + x}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int -\frac {4 \, x^{4} + 4 \, x^{3} + x^{2} + {\left (4 \, x^{2} + 4 \, x + 1\right )} e^{2} - 2 \, {\left (4 \, x^{3} + 4 \, x^{2} + x\right )} e - 2 \, {\left (2 \, x^{2} - 8 \, x + 5 \, e - 2\right )} e^{\left (\frac {2 \, {\left (x - 2\right )}}{2 \, x^{2} - {\left (2 \, x + 1\right )} e + x}\right )} - 2 \, {\left (2 \, x^{2} - 8 \, x + 5 \, e - 2\right )} e^{\left (\frac {x - 2}{2 \, x^{2} - {\left (2 \, x + 1\right )} e + x}\right )}}{4 \, x^{4} + 4 \, x^{3} + x^{2} + {\left (4 \, x^{2} + 4 \, x + 1\right )} e^{2} - 2 \, {\left (4 \, x^{3} + 4 \, x^{2} + x\right )} e}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.06, size = 51, normalized size = 1.65
method | result | size |
risch | \(-{\mathrm e}^{-\frac {2 \left (x -2\right )}{\left (2 x +1\right ) \left ({\mathrm e}-x \right )}}-x -2 \,{\mathrm e}^{-\frac {x -2}{\left (2 x +1\right ) \left ({\mathrm e}-x \right )}}\) | \(51\) |
norman | \(\frac {\left (-\frac {1}{2}-2 \,{\mathrm e}^{2}+{\mathrm e}\right ) x +\left (2-4 \,{\mathrm e}\right ) x \,{\mathrm e}^{\frac {2-x}{\left (2 x +1\right ) {\mathrm e}-2 x^{2}-x}}+\left (-2 \,{\mathrm e}+1\right ) x \,{\mathrm e}^{\frac {4-2 x}{\left (2 x +1\right ) {\mathrm e}-2 x^{2}-x}}+2 x^{3}+4 x^{2} {\mathrm e}^{\frac {2-x}{\left (2 x +1\right ) {\mathrm e}-2 x^{2}-x}}+2 x^{2} {\mathrm e}^{\frac {4-2 x}{\left (2 x +1\right ) {\mathrm e}-2 x^{2}-x}}-2 \,{\mathrm e} \,{\mathrm e}^{\frac {2-x}{\left (2 x +1\right ) {\mathrm e}-2 x^{2}-x}}-{\mathrm e} \,{\mathrm e}^{\frac {4-2 x}{\left (2 x +1\right ) {\mathrm e}-2 x^{2}-x}}-{\mathrm e}^{2}+\frac {{\mathrm e}}{2}}{\left (2 x +1\right ) \left ({\mathrm e}-x \right )}\) | \(241\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.90, size = 1252, normalized size = 40.39 result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.79, size = 93, normalized size = 3.00 \begin {gather*} -x-2\,{\mathrm {e}}^{-\frac {2}{x-\mathrm {e}-2\,x\,\mathrm {e}+2\,x^2}}\,{\mathrm {e}}^{\frac {x}{x-\mathrm {e}-2\,x\,\mathrm {e}+2\,x^2}}-{\mathrm {e}}^{-\frac {4}{x-\mathrm {e}-2\,x\,\mathrm {e}+2\,x^2}}\,{\mathrm {e}}^{\frac {2\,x}{x-\mathrm {e}-2\,x\,\mathrm {e}+2\,x^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.82, size = 46, normalized size = 1.48 \begin {gather*} - x - e^{\frac {2 \left (2 - x\right )}{- 2 x^{2} - x + e \left (2 x + 1\right )}} - 2 e^{\frac {2 - x}{- 2 x^{2} - x + e \left (2 x + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________