Optimal. Leaf size=16 \[ 18+x^2-\frac {x}{-4+\log (1+x)} \]
________________________________________________________________________________________
Rubi [A] time = 0.41, antiderivative size = 26, normalized size of antiderivative = 1.62, number of steps used = 14, number of rules used = 10, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.145, Rules used = {6741, 6742, 2389, 2299, 2178, 2411, 2353, 2297, 2302, 30} \begin {gather*} x^2+\frac {x+1}{4-\log (x+1)}+\frac {1}{\log (x+1)-4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2178
Rule 2297
Rule 2299
Rule 2302
Rule 2353
Rule 2389
Rule 2411
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4+37 x+32 x^2+\left (-1-17 x-16 x^2\right ) \log (1+x)+\left (2 x+2 x^2\right ) \log ^2(1+x)}{(1+x) (4-\log (1+x))^2} \, dx\\ &=\int \left (2 x+\frac {1}{4-\log (1+x)}+\frac {x}{(1+x) (-4+\log (1+x))^2}\right ) \, dx\\ &=x^2+\int \frac {1}{4-\log (1+x)} \, dx+\int \frac {x}{(1+x) (-4+\log (1+x))^2} \, dx\\ &=x^2+\operatorname {Subst}\left (\int \frac {1}{4-\log (x)} \, dx,x,1+x\right )+\operatorname {Subst}\left (\int \frac {-1+x}{x (-4+\log (x))^2} \, dx,x,1+x\right )\\ &=x^2+\operatorname {Subst}\left (\int \frac {e^x}{4-x} \, dx,x,\log (1+x)\right )+\operatorname {Subst}\left (\int \left (\frac {1}{(-4+\log (x))^2}-\frac {1}{x (-4+\log (x))^2}\right ) \, dx,x,1+x\right )\\ &=x^2-e^4 \text {Ei}(-4+\log (1+x))+\operatorname {Subst}\left (\int \frac {1}{(-4+\log (x))^2} \, dx,x,1+x\right )-\operatorname {Subst}\left (\int \frac {1}{x (-4+\log (x))^2} \, dx,x,1+x\right )\\ &=x^2-e^4 \text {Ei}(-4+\log (1+x))+\frac {1+x}{4-\log (1+x)}-\operatorname {Subst}\left (\int \frac {1}{x^2} \, dx,x,-4+\log (1+x)\right )+\operatorname {Subst}\left (\int \frac {1}{-4+\log (x)} \, dx,x,1+x\right )\\ &=x^2-e^4 \text {Ei}(-4+\log (1+x))+\frac {1+x}{4-\log (1+x)}+\frac {1}{-4+\log (1+x)}+\operatorname {Subst}\left (\int \frac {e^x}{-4+x} \, dx,x,\log (1+x)\right )\\ &=x^2+\frac {1+x}{4-\log (1+x)}+\frac {1}{-4+\log (1+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 16, normalized size = 1.00 \begin {gather*} -1+x^2-\frac {x}{-4+\log (1+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 26, normalized size = 1.62 \begin {gather*} \frac {x^{2} \log \left (x + 1\right ) - 4 \, x^{2} - x}{\log \left (x + 1\right ) - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 15, normalized size = 0.94 \begin {gather*} x^{2} - \frac {x}{\log \left (x + 1\right ) - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 16, normalized size = 1.00
method | result | size |
risch | \(x^{2}-\frac {x}{\ln \left (x +1\right )-4}\) | \(16\) |
norman | \(\frac {x^{2} \ln \left (x +1\right )-x -4 x^{2}}{\ln \left (x +1\right )-4}\) | \(27\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.39, size = 38, normalized size = 2.38 \begin {gather*} \frac {x^{2} \log \left (x + 1\right ) - 4 \, x^{2} - x + 4}{\log \left (x + 1\right ) - 4} - \frac {4}{\log \left (x + 1\right ) - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.27, size = 15, normalized size = 0.94 \begin {gather*} x^2-\frac {x}{\ln \left (x+1\right )-4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 10, normalized size = 0.62 \begin {gather*} x^{2} - \frac {x}{\log {\left (x + 1 \right )} - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________