3.10.46 \(\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\)

Optimal. Leaf size=27 \[ \log \left (2+x+\frac {1}{2} \left (-\log \left (1+e^x\right )-\log (x)+\log ^2(1+x)\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.86, antiderivative size = 24, normalized size of antiderivative = 0.89, number of steps used = 2, number of rules used = 2, integrand size = 138, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.014, Rules used = {6688, 6684} \begin {gather*} \log \left (2 x+\log ^2(x+1)-\log \left (e^x+1\right )-\log (x)+4\right ) \end {gather*}

Antiderivative was successfully verified.

[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 6684

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

Rule 6688

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

Rubi steps

\begin {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 2.29, size = 24, normalized size = 0.89 \begin {gather*} \log \left (4+2 x-\log \left (1+e^x\right )-\log (x)+\log ^2(1+x)\right ) \end {gather*}

Antiderivative was successfully verified.

[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]

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 21, normalized size = 0.78 \begin {gather*} \log \left (-\log \left (x + 1\right )^{2} - 2 \, x + \log \relax (x) + \log \left (e^{x} + 1\right ) - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(x)*x-2*x)*log(x+1)+(-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(x+1)^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)

________________________________________________________________________________________

giac [A]  time = 0.57, size = 23, normalized size = 0.85 \begin {gather*} \log \left (\log \left (x + 1\right )^{2} + 2 \, x - \log \relax (x) - \log \left (e^{x} + 1\right ) + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(x)*x-2*x)*log(x+1)+(-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(x+1)^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)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 22, normalized size = 0.81




method result size



risch \(\ln \left (-\ln \left (x +1\right )^{2}+\ln \relax (x )+\ln \left ({\mathrm e}^{x}+1\right )-2 x -4\right )\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*exp(x)*x-2*x)*ln(x+1)+(-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(x+1)^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(x+1)^2+ln(x)+ln(exp(x)+1)-2*x-4)

________________________________________________________________________________________

maxima [A]  time = 0.60, size = 21, normalized size = 0.78 \begin {gather*} \log \left (-\log \left (x + 1\right )^{2} - 2 \, x + \log \relax (x) + \log \left (e^{x} + 1\right ) - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(x)*x-2*x)*log(x+1)+(-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(x+1)^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)

________________________________________________________________________________________

mupad [B]  time = 0.84, size = 21, normalized size = 0.78 \begin {gather*} \ln \left (-{\ln \left (x+1\right )}^2-2\,x+\ln \left (x\,\left ({\mathrm {e}}^x+1\right )\right )-4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

sympy [A]  time = 1.04, size = 22, normalized size = 0.81 \begin {gather*} \log {\left (- 2 x + \log {\relax (x )} - \log {\left (x + 1 \right )}^{2} + \log {\left (e^{x} + 1 \right )} - 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*exp(x)*x-2*x)*ln(x+1)+(-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(x+1)**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)

________________________________________________________________________________________