Optimal. Leaf size=31 \[ -2+e^{2 \left (-x+\frac {x^2 \left (-e^x+x\right )}{2+x}\right ) (2+\log (4))}+x \]
________________________________________________________________________________________
Rubi [F] time = 71.84, 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 {4+4 x+x^2+\exp \left (\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}\right ) \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4+4 x+x^2+\exp \left (\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}\right ) \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{(2+x)^2} \, dx\\ &=\int \frac {4+4 x+x^2-2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) \left (4+4 \left (1+e^x\right ) x+\left (-5+3 e^x\right ) x^2+\left (-2+e^x\right ) x^3\right ) (2+\log (4))}{(2+x)^2} \, dx\\ &=\int \left (1+\frac {2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) \left (4+4 x+4 e^x x-5 x^2+3 e^x x^2-2 x^3+e^x x^3\right ) (-2-\log (4))}{(2+x)^2}\right ) \, dx\\ &=x+(-2-\log (4)) \int \frac {2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) \left (4+4 x+4 e^x x-5 x^2+3 e^x x^2-2 x^3+e^x x^3\right )}{(2+x)^2} \, dx\\ &=x+(-2-\log (4)) \int \left (\frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right )}{(2+x)^2}+\frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x}{(2+x)^2}-\frac {5\ 2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x^2}{(2+x)^2}-\frac {2^{1+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x^3}{(2+x)^2}+\frac {2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (x-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x \left (4+3 x+x^2\right )}{(2+x)^2}\right ) \, dx\\ &=x+(-2-\log (4)) \int \frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right )}{(2+x)^2} \, dx+(-2-\log (4)) \int \frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x}{(2+x)^2} \, dx+(-2-\log (4)) \int \frac {2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (x-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x \left (4+3 x+x^2\right )}{(2+x)^2} \, dx+(2+\log (4)) \int \frac {2^{1+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x^3}{(2+x)^2} \, dx+(5 (2+\log (4))) \int \frac {2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x^2}{(2+x)^2} \, dx\\ &=x+(-2-\log (4)) \int \frac {2^{\frac {6-5 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right )}{(2+x)^2} \, dx+(-2-\log (4)) \int \frac {2^{\frac {6-5 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x}{(2+x)^2} \, dx+(-2-\log (4)) \int \frac {2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (\frac {x \left (-6-3 x+4 x^2-4 e^x x (1+\log (2))\right )}{2+x}\right ) x \left (4+3 x+x^2\right )}{(2+x)^2} \, dx+(2+\log (4)) \int \frac {2^{\frac {2 \left (2-3 x-2 x^2+2 x^3\right )}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right ) x^3}{(2+x)^2} \, dx+(5 (2+\log (4))) \int \left (2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right )+\frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right )}{(2+x)^2}-\frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} \exp \left (-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}\right )}{2+x}\right ) \, dx\\ &=x+(-2-\log (4)) \int \frac {2^{\frac {6-5 x-4 x^2+4 x^3}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}}{(2+x)^2} \, dx+(-2-\log (4)) \int \left (-2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} e^{\frac {x \left (-6-3 x+4 x^2-4 e^x x (1+\log (2))\right )}{2+x}}+2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} e^{\frac {x \left (-6-3 x+4 x^2-4 e^x x (1+\log (2))\right )}{2+x}} x-\frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} e^{\frac {x \left (-6-3 x+4 x^2-4 e^x x (1+\log (2))\right )}{2+x}}}{(2+x)^2}+\frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} e^{\frac {x \left (-6-3 x+4 x^2-4 e^x x (1+\log (2))\right )}{2+x}}}{2+x}\right ) \, dx+(-2-\log (4)) \int \left (-\frac {2^{1+\frac {6-5 x-4 x^2+4 x^3}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}}{(2+x)^2}+\frac {2^{\frac {6-5 x-4 x^2+4 x^3}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}}{2+x}\right ) \, dx+(2+\log (4)) \int \left (-2^{2+\frac {2 \left (2-3 x-2 x^2+2 x^3\right )}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}+2^{\frac {2 \left (2-3 x-2 x^2+2 x^3\right )}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}} x-\frac {2^{3+\frac {2 \left (2-3 x-2 x^2+2 x^3\right )}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}}{(2+x)^2}+\frac {3\ 2^{2+\frac {2 \left (2-3 x-2 x^2+2 x^3\right )}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}}{2+x}\right ) \, dx+(5 (2+\log (4))) \int 2^{\frac {2-7 x-4 x^2+4 x^3}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}} \, dx+(5 (2+\log (4))) \int \frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}}{(2+x)^2} \, dx-(5 (2+\log (4))) \int \frac {2^{2+\frac {2-7 x-4 x^2+4 x^3}{2+x}} e^{-\frac {2 x \left (4-2 x^2+x \left (2+e^x (2+\log (4))\right )\right )}{2+x}}}{2+x} \, dx\\ &=\text {Rest of rules removed due to large latex content} \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [F] time = 11.62, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {4+4 x+x^2+e^{\frac {2 \left (-4 x-2 x^2+2 x^3+\left (-2 x-x^2+x^3\right ) \log (4)+e^x \left (-2 x^2-x^2 \log (4)\right )\right )}{2+x}} \left (-16-16 x+20 x^2+8 x^3+\left (-8-8 x+10 x^2+4 x^3\right ) \log (4)+e^x \left (-16 x-12 x^2-4 x^3+\left (-8 x-6 x^2-2 x^3\right ) \log (4)\right )\right )}{4+4 x+x^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.00, size = 51, normalized size = 1.65 \begin {gather*} x + e^{\left (\frac {4 \, {\left (x^{3} - x^{2} - {\left (x^{2} \log \relax (2) + x^{2}\right )} e^{x} + {\left (x^{3} - x^{2} - 2 \, x\right )} \log \relax (2) - 2 \, x\right )}}{x + 2}\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 {x^{2} + 4 \, {\left (2 \, x^{3} + 5 \, x^{2} - {\left (x^{3} + 3 \, x^{2} + {\left (x^{3} + 3 \, x^{2} + 4 \, x\right )} \log \relax (2) + 4 \, x\right )} e^{x} + {\left (2 \, x^{3} + 5 \, x^{2} - 4 \, x - 4\right )} \log \relax (2) - 4 \, x - 4\right )} e^{\left (\frac {4 \, {\left (x^{3} - x^{2} - {\left (x^{2} \log \relax (2) + x^{2}\right )} e^{x} + {\left (x^{3} - x^{2} - 2 \, x\right )} \log \relax (2) - 2 \, x\right )}}{x + 2}\right )} + 4 \, x + 4}{x^{2} + 4 \, x + 4}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.39, size = 28, normalized size = 0.90
method | result | size |
risch | \({\mathrm e}^{-\frac {4 x \left (1+\ln \relax (2)\right ) \left ({\mathrm e}^{x} x -x^{2}+x +2\right )}{2+x}}+x\) | \(28\) |
norman | \(\frac {x^{2}+x \,{\mathrm e}^{\frac {2 \left (-2 x^{2} \ln \relax (2)-2 x^{2}\right ) {\mathrm e}^{x}+2 \left (2 x^{3}-2 x^{2}-4 x \right ) \ln \relax (2)+4 x^{3}-4 x^{2}-8 x}{2+x}}+2 \,{\mathrm e}^{\frac {2 \left (-2 x^{2} \ln \relax (2)-2 x^{2}\right ) {\mathrm e}^{x}+2 \left (2 x^{3}-2 x^{2}-4 x \right ) \ln \relax (2)+4 x^{3}-4 x^{2}-8 x}{2+x}}-4}{2+x}\) | \(126\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.76, size = 85, normalized size = 2.74 \begin {gather*} x + 65536 \, e^{\left (4 \, x^{2} \log \relax (2) - 4 \, x e^{x} \log \relax (2) + 4 \, x^{2} - 4 \, x e^{x} - 12 \, x \log \relax (2) + 8 \, e^{x} \log \relax (2) - 12 \, x - \frac {16 \, e^{x} \log \relax (2)}{x + 2} - \frac {16 \, e^{x}}{x + 2} - \frac {32 \, \log \relax (2)}{x + 2} - \frac {32}{x + 2} + 8 \, e^{x} + 16\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.91, size = 101, normalized size = 3.26 \begin {gather*} x+\frac {2^{\frac {4\,x^3}{x+2}}\,{\mathrm {e}}^{-\frac {8\,x}{x+2}}\,{\mathrm {e}}^{-\frac {4\,x^2\,{\mathrm {e}}^x}{x+2}}\,{\mathrm {e}}^{-\frac {4\,x^2}{x+2}}\,{\mathrm {e}}^{\frac {4\,x^3}{x+2}}}{2^{\frac {8\,x}{x+2}}\,2^{\frac {4\,x^2\,{\mathrm {e}}^x}{x+2}}\,2^{\frac {4\,x^2}{x+2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.76, size = 58, normalized size = 1.87 \begin {gather*} x + e^{\frac {2 \left (2 x^{3} - 2 x^{2} - 4 x + \left (- 2 x^{2} - 2 x^{2} \log {\relax (2 )}\right ) e^{x} + \left (2 x^{3} - 2 x^{2} - 4 x\right ) \log {\relax (2 )}\right )}{x + 2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________