Optimal. Leaf size=23 \[ -5+x-x^{1-x+\frac {x^2}{-1-x}} \]
________________________________________________________________________________________
Rubi [F] time = 2.02, 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 {1+2 x+x^2+x^{\frac {-x-2 x^2}{1+x}} \left (-1-x+2 x^2+2 x^3+\left (x+4 x^2+2 x^3\right ) \log (x)\right )}{1+2 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 {1+2 x+x^2+x^{\frac {-x-2 x^2}{1+x}} \left (-1-x+2 x^2+2 x^3+\left (x+4 x^2+2 x^3\right ) \log (x)\right )}{(1+x)^2} \, dx\\ &=\int \left (1+\frac {x^{-\frac {x (1+2 x)}{1+x}} \left (-1-x+2 x^2+2 x^3+x \log (x)+4 x^2 \log (x)+2 x^3 \log (x)\right )}{(1+x)^2}\right ) \, dx\\ &=x+\int \frac {x^{-\frac {x (1+2 x)}{1+x}} \left (-1-x+2 x^2+2 x^3+x \log (x)+4 x^2 \log (x)+2 x^3 \log (x)\right )}{(1+x)^2} \, dx\\ &=x+\int \left (-\frac {x^{-\frac {x (1+2 x)}{1+x}}}{(1+x)^2}-\frac {x^{1-\frac {x (1+2 x)}{1+x}}}{(1+x)^2}+\frac {2 x^{2-\frac {x (1+2 x)}{1+x}}}{(1+x)^2}+\frac {2 x^{3-\frac {x (1+2 x)}{1+x}}}{(1+x)^2}+\frac {x^{1-\frac {x (1+2 x)}{1+x}} \left (1+4 x+2 x^2\right ) \log (x)}{(1+x)^2}\right ) \, dx\\ &=x+2 \int \frac {x^{2-\frac {x (1+2 x)}{1+x}}}{(1+x)^2} \, dx+2 \int \frac {x^{3-\frac {x (1+2 x)}{1+x}}}{(1+x)^2} \, dx-\int \frac {x^{-\frac {x (1+2 x)}{1+x}}}{(1+x)^2} \, dx-\int \frac {x^{1-\frac {x (1+2 x)}{1+x}}}{(1+x)^2} \, dx+\int \frac {x^{1-\frac {x (1+2 x)}{1+x}} \left (1+4 x+2 x^2\right ) \log (x)}{(1+x)^2} \, dx\\ &=x-\frac {x^{1-\frac {x (1+2 x)}{1+x}}}{1+x}+\frac {x^{-\frac {x (1+2 x)}{1+x}}}{1+2 x}+\frac {2 x^{2-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}+\frac {2 x^{3-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}-\frac {(x (1+2 x)) \int \frac {x^{-\frac {x (1+2 x)}{1+x}}}{1+x} \, dx}{1+x}-\frac {\left ((1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )\right ) \int \frac {x^{-\frac {x (1+2 x)}{1+x}}}{(1+x)^2} \, dx}{x (1+2 x)}-\frac {\left (2 \left (2-\frac {x (1+2 x)}{1+x}\right )\right ) \int \frac {x^{\frac {1-2 x^2}{1+x}}}{(1+x)^2} \, dx}{1-\frac {x (1+2 x)}{1+x}}-\frac {\left (2 \left (3-\frac {x (1+2 x)}{1+x}\right )\right ) \int \frac {x^{\frac {2+x-2 x^2}{1+x}}}{(1+x)^2} \, dx}{2-\frac {x (1+2 x)}{1+x}}+\int \frac {x^{\frac {1-2 x^2}{1+x}} \left (1+4 x+2 x^2\right ) \log (x)}{(1+x)^2} \, dx\\ &=x-\frac {x^{1-\frac {x (1+2 x)}{1+x}}}{1+x}+\frac {x^{-\frac {x (1+2 x)}{1+x}}}{1+2 x}+\frac {2 x^{2-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}-\frac {x^{-\frac {x (1+2 x)}{1+x}} \left (1-\frac {x (1+2 x)}{1+x}\right )}{1+2 x}+\frac {2 x^{3-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}-\frac {2 x^{1+\frac {1-2 x^2}{1+x}} \left (2-\frac {x (1+2 x)}{1+x}\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}-\frac {2 x^{1+\frac {2+x-2 x^2}{1+x}} \left (3-\frac {x (1+2 x)}{1+x}\right )}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}-\frac {x^{2-\frac {x (1+2 x)}{1+x}} (1+2 x) \, _2F_1\left (1,1-\frac {x (1+2 x)}{1+x};2-\frac {x (1+2 x)}{1+x};-x\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}-\left (1-\frac {x (1+2 x)}{1+x}\right ) \int \frac {x^{-\frac {x (1+2 x)}{1+x}}}{1+x} \, dx+\frac {\left (2 \left (1-2 x^2\right ) \left (2-\frac {x (1+2 x)}{1+x}\right )\right ) \int \frac {x^{\frac {1-2 x^2}{1+x}}}{1+x} \, dx}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}+\frac {\left (2 \left (2+x-2 x^2\right ) \left (3-\frac {x (1+2 x)}{1+x}\right )\right ) \int \frac {x^{\frac {2+x-2 x^2}{1+x}}}{1+x} \, dx}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}+\int \left (2 x^{\frac {1-2 x^2}{1+x}} \log (x)-\frac {x^{\frac {1-2 x^2}{1+x}} \log (x)}{(1+x)^2}\right ) \, dx\\ &=x-\frac {x^{1-\frac {x (1+2 x)}{1+x}}}{1+x}+\frac {x^{-\frac {x (1+2 x)}{1+x}}}{1+2 x}+\frac {2 x^{2-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}-\frac {x^{-\frac {x (1+2 x)}{1+x}} \left (1-\frac {x (1+2 x)}{1+x}\right )}{1+2 x}+\frac {2 x^{3-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}-\frac {2 x^{1+\frac {1-2 x^2}{1+x}} \left (2-\frac {x (1+2 x)}{1+x}\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}-\frac {2 x^{1+\frac {2+x-2 x^2}{1+x}} \left (3-\frac {x (1+2 x)}{1+x}\right )}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}-x^{1-\frac {x (1+2 x)}{1+x}} \, _2F_1\left (1,1-\frac {x (1+2 x)}{1+x};2-\frac {x (1+2 x)}{1+x};-x\right )-\frac {x^{2-\frac {x (1+2 x)}{1+x}} (1+2 x) \, _2F_1\left (1,1-\frac {x (1+2 x)}{1+x};2-\frac {x (1+2 x)}{1+x};-x\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}+\frac {2 x^{1+\frac {1-2 x^2}{1+x}} \left (1-2 x^2\right ) \left (2-\frac {x (1+2 x)}{1+x}\right ) \, _2F_1\left (1,1+\frac {1-2 x^2}{1+x};2+\frac {1-2 x^2}{1+x};-x\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right ) \left (1+\frac {1-2 x^2}{1+x}\right )}+\frac {2 x^{1+\frac {2+x-2 x^2}{1+x}} \left (2+x-2 x^2\right ) \left (3-\frac {x (1+2 x)}{1+x}\right ) \, _2F_1\left (1,1+\frac {2+x-2 x^2}{1+x};2+\frac {2+x-2 x^2}{1+x};-x\right )}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right ) \left (1+\frac {2+x-2 x^2}{1+x}\right )}+2 \int x^{\frac {1-2 x^2}{1+x}} \log (x) \, dx-\int \frac {x^{\frac {1-2 x^2}{1+x}} \log (x)}{(1+x)^2} \, dx\\ &=x-\frac {x^{1-\frac {x (1+2 x)}{1+x}}}{1+x}+\frac {x^{-\frac {x (1+2 x)}{1+x}}}{1+2 x}+\frac {2 x^{2-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}-\frac {x^{-\frac {x (1+2 x)}{1+x}} \left (1-\frac {x (1+2 x)}{1+x}\right )}{1+2 x}+\frac {2 x^{3-\frac {x (1+2 x)}{1+x}}}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}-\frac {2 x^{1+\frac {1-2 x^2}{1+x}} \left (2-\frac {x (1+2 x)}{1+x}\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}-\frac {2 x^{1+\frac {2+x-2 x^2}{1+x}} \left (3-\frac {x (1+2 x)}{1+x}\right )}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right )}-x^{1-\frac {x (1+2 x)}{1+x}} \, _2F_1\left (1,1-\frac {x (1+2 x)}{1+x};2-\frac {x (1+2 x)}{1+x};-x\right )-\frac {x^{2-\frac {x (1+2 x)}{1+x}} (1+2 x) \, _2F_1\left (1,1-\frac {x (1+2 x)}{1+x};2-\frac {x (1+2 x)}{1+x};-x\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right )}+\frac {2 x^{1+\frac {1-2 x^2}{1+x}} \left (1-2 x^2\right ) \left (2-\frac {x (1+2 x)}{1+x}\right ) \, _2F_1\left (1,1+\frac {1-2 x^2}{1+x};2+\frac {1-2 x^2}{1+x};-x\right )}{(1+x) \left (1-\frac {x (1+2 x)}{1+x}\right ) \left (1+\frac {1-2 x^2}{1+x}\right )}+\frac {2 x^{1+\frac {2+x-2 x^2}{1+x}} \left (2+x-2 x^2\right ) \left (3-\frac {x (1+2 x)}{1+x}\right ) \, _2F_1\left (1,1+\frac {2+x-2 x^2}{1+x};2+\frac {2+x-2 x^2}{1+x};-x\right )}{(1+x) \left (2-\frac {x (1+2 x)}{1+x}\right ) \left (1+\frac {2+x-2 x^2}{1+x}\right )}-2 \int \frac {\int x^{\frac {1-2 x^2}{1+x}} \, dx}{x} \, dx+(2 \log (x)) \int x^{\frac {1-2 x^2}{1+x}} \, dx-\int \frac {x^{\frac {1-2 x^2}{1+x}} \log (x)}{(1+x)^2} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.38, size = 19, normalized size = 0.83 \begin {gather*} x-x^{\frac {1-2 x^2}{1+x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.80, size = 39, normalized size = 1.70 \begin {gather*} \frac {x x^{\frac {2 \, x^{2} + x}{x + 1}} - x}{x^{\frac {2 \, x^{2} + x}{x + 1}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.11, size = 25, normalized size = 1.09 \begin {gather*} x - \frac {x^{\left (\frac {1}{x + 1}\right )}}{x^{\frac {2 \, x^{2}}{x + 1}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 21, normalized size = 0.91
method | result | size |
risch | \(-x \,x^{-\frac {\left (2 x +1\right ) x}{x +1}}+x\) | \(21\) |
norman | \(\frac {x^{2}-x \,{\mathrm e}^{\frac {\left (-2 x^{2}-x \right ) \ln \relax (x )}{x +1}}-x^{2} {\mathrm e}^{\frac {\left (-2 x^{2}-x \right ) \ln \relax (x )}{x +1}}-1}{x +1}\) | \(56\) |
default | \(x +\frac {-x \,{\mathrm e}^{\frac {\left (-2 x^{2}-x \right ) \ln \relax (x )}{x +1}}-2 x^{2} {\mathrm e}^{\frac {\left (-2 x^{2}-x \right ) \ln \relax (x )}{x +1}}-x^{3} {\mathrm e}^{\frac {\left (-2 x^{2}-x \right ) \ln \relax (x )}{x +1}}}{\left (x +1\right )^{2}}\) | \(77\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 23, normalized size = 1.00 \begin {gather*} -x^{2} e^{\left (-2 \, x \log \relax (x) - \frac {\log \relax (x)}{x + 1}\right )} + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.41, size = 22, normalized size = 0.96 \begin {gather*} -x\,\left (\frac {1}{x^{\frac {2\,x^2+x}{x+1}}}-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 159.28, size = 19, normalized size = 0.83 \begin {gather*} - x e^{\frac {\left (- 2 x^{2} - x\right ) \log {\relax (x )}}{x + 1}} + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________