Optimal. Leaf size=27 \[ x-\frac {-2+e^x+\frac {4 x}{5}}{-1+\log \left (-2-x+x^2\right )} \]
________________________________________________________________________________________
Rubi [F] time = 4.11, 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 {-8-33 x+17 x^2+e^x \left (-15+5 x+5 x^2\right )+\left (28+14 x-14 x^2+e^x \left (10+5 x-5 x^2\right )\right ) \log \left (-2-x+x^2\right )+\left (-10-5 x+5 x^2\right ) \log ^2\left (-2-x+x^2\right )}{-10-5 x+5 x^2+\left (20+10 x-10 x^2\right ) \log \left (-2-x+x^2\right )+\left (-10-5 x+5 x^2\right ) \log ^2\left (-2-x+x^2\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {8+33 x-17 x^2-5 e^x \left (-3+x+x^2\right )+\left (14+5 e^x\right ) \left (-2-x+x^2\right ) \log \left (-2-x+x^2\right )-5 \left (-2-x+x^2\right ) \log ^2\left (-2-x+x^2\right )}{5 \left (2+x-x^2\right ) \left (1-\log \left (-2-x+x^2\right )\right )^2} \, dx\\ &=\frac {1}{5} \int \frac {8+33 x-17 x^2-5 e^x \left (-3+x+x^2\right )+\left (14+5 e^x\right ) \left (-2-x+x^2\right ) \log \left (-2-x+x^2\right )-5 \left (-2-x+x^2\right ) \log ^2\left (-2-x+x^2\right )}{\left (2+x-x^2\right ) \left (1-\log \left (-2-x+x^2\right )\right )^2} \, dx\\ &=\frac {1}{5} \int \left (-\frac {8}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}-\frac {33 x}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}+\frac {17 x^2}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}-\frac {14 \log \left (-2-x+x^2\right )}{\left (-1+\log \left (-2-x+x^2\right )\right )^2}+\frac {5 \log ^2\left (-2-x+x^2\right )}{\left (-1+\log \left (-2-x+x^2\right )\right )^2}-\frac {5 e^x \left (3-x-x^2-2 \log \left (-2-x+x^2\right )-x \log \left (-2-x+x^2\right )+x^2 \log \left (-2-x+x^2\right )\right )}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}\right ) \, dx\\ &=-\left (\frac {8}{5} \int \frac {1}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx\right )-\frac {14}{5} \int \frac {\log \left (-2-x+x^2\right )}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {17}{5} \int \frac {x^2}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {33}{5} \int \frac {x}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\int \frac {\log ^2\left (-2-x+x^2\right )}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\int \frac {e^x \left (3-x-x^2-2 \log \left (-2-x+x^2\right )-x \log \left (-2-x+x^2\right )+x^2 \log \left (-2-x+x^2\right )\right )}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx\\ &=-\left (\frac {8}{5} \int \left (\frac {1}{3 (-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}-\frac {1}{3 (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}\right ) \, dx\right )-\frac {14}{5} \int \left (\frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2}+\frac {1}{-1+\log \left (-2-x+x^2\right )}\right ) \, dx+\frac {17}{5} \int \left (\frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2}+\frac {4}{3 (-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}-\frac {1}{3 (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}\right ) \, dx-\frac {33}{5} \int \left (\frac {2}{3 (-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}+\frac {1}{3 (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}\right ) \, dx+\int \left (1+\frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2}+\frac {2}{-1+\log \left (-2-x+x^2\right )}\right ) \, dx-\int \frac {e^x \left (-3+x+x^2-\left (-2-x+x^2\right ) \log \left (-2-x+x^2\right )\right )}{(2-x) (1+x) \left (1-\log \left (-2-x+x^2\right )\right )^2} \, dx\\ &=x-\frac {8}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {8}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {17}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+2 \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx-\frac {11}{5} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx+\frac {17}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {22}{5} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {68}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\int \left (\frac {e^x (1-2 x)}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}+\frac {e^x}{-1+\log \left (-2-x+x^2\right )}\right ) \, dx+\int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx\\ &=x-\frac {8}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {8}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {17}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+2 \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx-\frac {11}{5} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx+\frac {17}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {22}{5} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {68}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\int \frac {e^x (1-2 x)}{(-2+x) (1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\int \frac {e^x}{-1+\log \left (-2-x+x^2\right )} \, dx\\ &=x-\frac {8}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {8}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {17}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+2 \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx-\frac {11}{5} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx+\frac {17}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {22}{5} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {68}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\int \left (-\frac {e^x}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}-\frac {e^x}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2}\right ) \, dx+\int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\int \frac {e^x}{-1+\log \left (-2-x+x^2\right )} \, dx\\ &=x-\frac {8}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {8}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {17}{15} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+2 \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx-\frac {11}{5} \int \frac {1}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {14}{5} \int \frac {1}{-1+\log \left (-2-x+x^2\right )} \, dx+\frac {17}{5} \int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\frac {22}{5} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\frac {68}{15} \int \frac {1}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\int \frac {1}{\left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\int \frac {e^x}{(-2+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx+\int \frac {e^x}{(1+x) \left (-1+\log \left (-2-x+x^2\right )\right )^2} \, dx-\int \frac {e^x}{-1+\log \left (-2-x+x^2\right )} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 33, normalized size = 1.22 \begin {gather*} \frac {1}{5} \left (5 x-\frac {-10+5 e^x+4 x}{-1+\log \left (-2-x+x^2\right )}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.04, size = 36, normalized size = 1.33 \begin {gather*} \frac {5 \, x \log \left (x^{2} - x - 2\right ) - 9 \, x - 5 \, e^{x} + 10}{5 \, {\left (\log \left (x^{2} - x - 2\right ) - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.43, size = 36, normalized size = 1.33 \begin {gather*} \frac {5 \, x \log \left (x^{2} - x - 2\right ) - 9 \, x - 5 \, e^{x} + 10}{5 \, {\left (\log \left (x^{2} - x - 2\right ) - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 27, normalized size = 1.00
method | result | size |
risch | \(x -\frac {4 x +5 \,{\mathrm e}^{x}-10}{5 \left (\ln \left (x^{2}-x -2\right )-1\right )}\) | \(27\) |
norman | \(\frac {2 \ln \left (x^{2}-x -2\right )+\ln \left (x^{2}-x -2\right ) x -\frac {9 x}{5}-{\mathrm e}^{x}}{\ln \left (x^{2}-x -2\right )-1}\) | \(45\) |
default | \(\frac {2 \ln \left (x^{2}-x -2\right )^{2}+\ln \left (x^{2}-x -2\right ) x -\frac {9 x}{5}}{\ln \left (x^{2}-x -2\right )-1}-2 \ln \left (x -2\right )-2 \ln \left (x +1\right )-\frac {{\mathrm e}^{x}}{\ln \left (x^{2}-x -2\right )-1}\) | \(73\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.81, size = 37, normalized size = 1.37 \begin {gather*} \frac {5 \, x \log \left (x + 1\right ) + 5 \, x \log \left (x - 2\right ) - 9 \, x - 5 \, e^{x} + 10}{5 \, {\left (\log \left (x + 1\right ) + \log \left (x - 2\right ) - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.90, size = 112, normalized size = 4.15 \begin {gather*} \frac {3\,x}{5}+\frac {9}{10\,\left (x-\frac {1}{2}\right )}-\frac {\frac {5\,x^2\,{\mathrm {e}}^x-15\,{\mathrm {e}}^x-28\,x+5\,x\,{\mathrm {e}}^x+12\,x^2+2}{5\,\left (2\,x-1\right )}+\frac {\ln \left (x^2-x-2\right )\,\left (5\,{\mathrm {e}}^x+4\right )\,\left (-x^2+x+2\right )}{5\,\left (2\,x-1\right )}}{\ln \left (x^2-x-2\right )-1}+\frac {{\mathrm {e}}^x\,\left (-\frac {x^2}{2}+\frac {x}{2}+1\right )}{x-\frac {1}{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.47, size = 31, normalized size = 1.15 \begin {gather*} x + \frac {10 - 4 x}{5 \log {\left (x^{2} - x - 2 \right )} - 5} - \frac {e^{x}}{\log {\left (x^{2} - x - 2 \right )} - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________