\(\int \frac {1-x-2 x^2+e^x (1-x^2)+(-2 x-2 e^x x) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x (-4 x-6 x^2-2 x^3)+(x+x^2+e^x (x+x^2)) \log (1+e^x)+(x+x^2+e^x (x+x^2)) \log (x)+(-x-x^2+e^x (-x-x^2)) \log ^2(1+x)} \, dx\) [946]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 138, antiderivative size = 27 \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\log \left (2+x+\frac {1}{2} \left (-\log \left (1+e^x\right )-\log (x)+\log ^2(1+x)\right )\right ) \]

[Out]

ln(2+x-1/2*ln(x)+1/2*ln(1+x)^2-1/2*ln(exp(x)+1))

Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.89, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.014, Rules used = {6820, 6816} \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\log \left (2 x+\log ^2(x+1)-\log \left (e^x+1\right )-\log (x)+4\right ) \]

[In]

Int[(1 - x - 2*x^2 + E^x*(1 - x^2) + (-2*x - 2*E^x*x)*Log[1 + x])/(-4*x - 6*x^2 - 2*x^3 + E^x*(-4*x - 6*x^2 -
2*x^3) + (x + x^2 + E^x*(x + x^2))*Log[1 + E^x] + (x + x^2 + E^x*(x + x^2))*Log[x] + (-x - x^2 + E^x*(-x - x^2
))*Log[1 + x]^2),x]

[Out]

Log[4 + 2*x - Log[1 + E^x] - Log[x] + Log[1 + x]^2]

Rule 6816

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps \begin{align*} \text {integral}& = \int \frac {(1+x) \left (-1+e^x (-1+x)+2 x\right )+2 \left (1+e^x\right ) x \log (1+x)}{\left (1+e^x\right ) x (1+x) \left (4+2 x-\log \left (1+e^x\right )-\log (x)+\log ^2(1+x)\right )} \, dx \\ & = \log \left (4+2 x-\log \left (1+e^x\right )-\log (x)+\log ^2(1+x)\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.48 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.89 \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\log \left (4+2 x-\log \left (1+e^x\right )-\log (x)+\log ^2(1+x)\right ) \]

[In]

Integrate[(1 - x - 2*x^2 + E^x*(1 - x^2) + (-2*x - 2*E^x*x)*Log[1 + x])/(-4*x - 6*x^2 - 2*x^3 + E^x*(-4*x - 6*
x^2 - 2*x^3) + (x + x^2 + E^x*(x + x^2))*Log[1 + E^x] + (x + x^2 + E^x*(x + x^2))*Log[x] + (-x - x^2 + E^x*(-x
 - x^2))*Log[1 + x]^2),x]

[Out]

Log[4 + 2*x - Log[1 + E^x] - Log[x] + Log[1 + x]^2]

Maple [A] (verified)

Time = 136.60 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81

method result size
risch \(\ln \left (-\ln \left (1+x \right )^{2}+\ln \left (x \right )+\ln \left ({\mathrm e}^{x}+1\right )-2 x -4\right )\) \(22\)
parallelrisch \(\ln \left (2+x -\frac {\ln \left (x \right )}{2}+\frac {\ln \left (1+x \right )^{2}}{2}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{2}\right )\) \(24\)

[In]

int(((-2*exp(x)*x-2*x)*ln(1+x)+(-x^2+1)*exp(x)-2*x^2-x+1)/(((x^2+x)*exp(x)+x^2+x)*ln(exp(x)+1)+((-x^2-x)*exp(x
)-x^2-x)*ln(1+x)^2+((x^2+x)*exp(x)+x^2+x)*ln(x)+(-2*x^3-6*x^2-4*x)*exp(x)-2*x^3-6*x^2-4*x),x,method=_RETURNVER
BOSE)

[Out]

ln(-ln(1+x)^2+ln(x)+ln(exp(x)+1)-2*x-4)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\log \left (-\log \left (x + 1\right )^{2} - 2 \, x + \log \left (x\right ) + \log \left (e^{x} + 1\right ) - 4\right ) \]

[In]

integrate(((-2*exp(x)*x-2*x)*log(1+x)+(-x^2+1)*exp(x)-2*x^2-x+1)/(((x^2+x)*exp(x)+x^2+x)*log(exp(x)+1)+((-x^2-
x)*exp(x)-x^2-x)*log(1+x)^2+((x^2+x)*exp(x)+x^2+x)*log(x)+(-2*x^3-6*x^2-4*x)*exp(x)-2*x^3-6*x^2-4*x),x, algori
thm="fricas")

[Out]

log(-log(x + 1)^2 - 2*x + log(x) + log(e^x + 1) - 4)

Sympy [A] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81 \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\log {\left (- 2 x + \log {\left (x \right )} - \log {\left (x + 1 \right )}^{2} + \log {\left (e^{x} + 1 \right )} - 4 \right )} \]

[In]

integrate(((-2*exp(x)*x-2*x)*ln(1+x)+(-x**2+1)*exp(x)-2*x**2-x+1)/(((x**2+x)*exp(x)+x**2+x)*ln(exp(x)+1)+((-x*
*2-x)*exp(x)-x**2-x)*ln(1+x)**2+((x**2+x)*exp(x)+x**2+x)*ln(x)+(-2*x**3-6*x**2-4*x)*exp(x)-2*x**3-6*x**2-4*x),
x)

[Out]

log(-2*x + log(x) - log(x + 1)**2 + log(exp(x) + 1) - 4)

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\log \left (-\log \left (x + 1\right )^{2} - 2 \, x + \log \left (x\right ) + \log \left (e^{x} + 1\right ) - 4\right ) \]

[In]

integrate(((-2*exp(x)*x-2*x)*log(1+x)+(-x^2+1)*exp(x)-2*x^2-x+1)/(((x^2+x)*exp(x)+x^2+x)*log(exp(x)+1)+((-x^2-
x)*exp(x)-x^2-x)*log(1+x)^2+((x^2+x)*exp(x)+x^2+x)*log(x)+(-2*x^3-6*x^2-4*x)*exp(x)-2*x^3-6*x^2-4*x),x, algori
thm="maxima")

[Out]

log(-log(x + 1)^2 - 2*x + log(x) + log(e^x + 1) - 4)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\log \left (\log \left (x + 1\right )^{2} + 2 \, x - \log \left (x\right ) - \log \left (e^{x} + 1\right ) + 4\right ) \]

[In]

integrate(((-2*exp(x)*x-2*x)*log(1+x)+(-x^2+1)*exp(x)-2*x^2-x+1)/(((x^2+x)*exp(x)+x^2+x)*log(exp(x)+1)+((-x^2-
x)*exp(x)-x^2-x)*log(1+x)^2+((x^2+x)*exp(x)+x^2+x)*log(x)+(-2*x^3-6*x^2-4*x)*exp(x)-2*x^3-6*x^2-4*x),x, algori
thm="giac")

[Out]

log(log(x + 1)^2 + 2*x - log(x) - log(e^x + 1) + 4)

Mupad [B] (verification not implemented)

Time = 9.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \frac {1-x-2 x^2+e^x \left (1-x^2\right )+\left (-2 x-2 e^x x\right ) \log (1+x)}{-4 x-6 x^2-2 x^3+e^x \left (-4 x-6 x^2-2 x^3\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log \left (1+e^x\right )+\left (x+x^2+e^x \left (x+x^2\right )\right ) \log (x)+\left (-x-x^2+e^x \left (-x-x^2\right )\right ) \log ^2(1+x)} \, dx=\ln \left (-{\ln \left (x+1\right )}^2-2\,x+\ln \left (x\,\left ({\mathrm {e}}^x+1\right )\right )-4\right ) \]

[In]

int((x + exp(x)*(x^2 - 1) + log(x + 1)*(2*x + 2*x*exp(x)) + 2*x^2 - 1)/(4*x + log(x + 1)^2*(x + x^2 + exp(x)*(
x + x^2)) - log(exp(x) + 1)*(x + x^2 + exp(x)*(x + x^2)) + 6*x^2 + 2*x^3 - log(x)*(x + x^2 + exp(x)*(x + x^2))
 + exp(x)*(4*x + 6*x^2 + 2*x^3)),x)

[Out]

log(log(x*(exp(x) + 1)) - 2*x - log(x + 1)^2 - 4)