3.76.13 \(\int \frac {-2 x+(4+2 x) \log (2+x)+(2 x+x^2+(4+2 x) \log (2+x)) \log (-\frac {x}{x+2 \log (2+x)})}{2 x+x^2+(4+2 x) \log (2+x)} \, dx\) [7513]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.58, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 3, integrand size = 66, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {6820, 6874, 2629} \begin {gather*} x \log \left (-\frac {x}{x+2 \log (x+2)}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2*x + (4 + 2*x)*Log[2 + x] + (2*x + x^2 + (4 + 2*x)*Log[2 + x])*Log[-(x/(x + 2*Log[2 + x]))])/(2*x + x^2
 + (4 + 2*x)*Log[2 + x]),x]

[Out]

x*Log[-(x/(x + 2*Log[2 + x]))]

Rule 2629

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[x*Simplify[D[u, x]/u], x], x] /; ProductQ[
u]

Rule 6820

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

Rule 6874

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {2 x}{(2+x) (x+2 \log (2+x))}+\frac {2 \log (2+x)}{x+2 \log (2+x)}+\log \left (-\frac {x}{x+2 \log (2+x)}\right )\right ) \, dx\\ &=-\left (2 \int \frac {x}{(2+x) (x+2 \log (2+x))} \, dx\right )+2 \int \frac {\log (2+x)}{x+2 \log (2+x)} \, dx+\int \log \left (-\frac {x}{x+2 \log (2+x)}\right ) \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )+2 \int \left (\frac {1}{2}-\frac {x}{2 (x+2 \log (2+x))}\right ) \, dx-2 \int \left (\frac {1}{x+2 \log (2+x)}-\frac {2}{(2+x) (x+2 \log (2+x))}\right ) \, dx-\int \frac {-2 x+2 (2+x) \log (2+x)}{(2+x) (x+2 \log (2+x))} \, dx\\ &=x+x \log \left (-\frac {x}{x+2 \log (2+x)}\right )-2 \int \frac {1}{x+2 \log (2+x)} \, dx+4 \int \frac {1}{(2+x) (x+2 \log (2+x))} \, dx-\int \frac {x}{x+2 \log (2+x)} \, dx-\int \left (1-\frac {x (4+x)}{(2+x) (x+2 \log (2+x))}\right ) \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )-2 \int \frac {1}{x+2 \log (2+x)} \, dx+4 \int \frac {1}{(2+x) (x+2 \log (2+x))} \, dx-\int \frac {x}{x+2 \log (2+x)} \, dx+\int \frac {x (4+x)}{(2+x) (x+2 \log (2+x))} \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )-2 \int \frac {1}{x+2 \log (2+x)} \, dx+4 \int \frac {1}{(2+x) (x+2 \log (2+x))} \, dx-\int \frac {x}{x+2 \log (2+x)} \, dx+\int \left (\frac {2}{x+2 \log (2+x)}+\frac {x}{x+2 \log (2+x)}-\frac {4}{(2+x) (x+2 \log (2+x))}\right ) \, dx\\ &=x \log \left (-\frac {x}{x+2 \log (2+x)}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.22, size = 16, normalized size = 1.00 \begin {gather*} x \log \left (-\frac {x}{x+2 \log (2+x)}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2*x + (4 + 2*x)*Log[2 + x] + (2*x + x^2 + (4 + 2*x)*Log[2 + x])*Log[-(x/(x + 2*Log[2 + x]))])/(2*x
 + x^2 + (4 + 2*x)*Log[2 + x]),x]

[Out]

x*Log[-(x/(x + 2*Log[2 + x]))]

________________________________________________________________________________________

Maple [A]
time = 5.19, size = 17, normalized size = 1.06

method result size
norman \(\ln \left (-\frac {x}{2 \ln \left (2+x \right )+x}\right ) x\) \(17\)
risch \(-x \ln \left (2 \ln \left (2+x \right )+x \right )+x \ln \left (x \right )-\frac {i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{2 \ln \left (2+x \right )+x}\right ) \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )}{2}+\frac {i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{2}}{2}+\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{2 \ln \left (2+x \right )+x}\right ) \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{2}}{2}+\frac {i \pi x \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{3}}{2}-i \pi x \mathrm {csgn}\left (\frac {i x}{2 \ln \left (2+x \right )+x}\right )^{2}+i x \pi \) \(169\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((2*x+4)*ln(2+x)+x^2+2*x)*ln(-x/(2*ln(2+x)+x))+(2*x+4)*ln(2+x)-2*x)/((2*x+4)*ln(2+x)+x^2+2*x),x,method=_R
ETURNVERBOSE)

[Out]

ln(-x/(2*ln(2+x)+x))*x

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 19, normalized size = 1.19 \begin {gather*} x \log \left (x\right ) - x \log \left (-x - 2 \, \log \left (x + 2\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x+4)*log(2+x)+x^2+2*x)*log(-x/(2*log(2+x)+x))+(2*x+4)*log(2+x)-2*x)/((2*x+4)*log(2+x)+x^2+2*x),
x, algorithm="maxima")

[Out]

x*log(x) - x*log(-x - 2*log(x + 2))

________________________________________________________________________________________

Fricas [A]
time = 0.48, size = 16, normalized size = 1.00 \begin {gather*} x \log \left (-\frac {x}{x + 2 \, \log \left (x + 2\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x+4)*log(2+x)+x^2+2*x)*log(-x/(2*log(2+x)+x))+(2*x+4)*log(2+x)-2*x)/((2*x+4)*log(2+x)+x^2+2*x),
x, algorithm="fricas")

[Out]

x*log(-x/(x + 2*log(x + 2)))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 34 vs. \(2 (15) = 30\).
time = 0.35, size = 34, normalized size = 2.12 \begin {gather*} \left (x + \frac {1}{3}\right ) \log {\left (- \frac {x}{x + 2 \log {\left (x + 2 \right )}} \right )} - \frac {\log {\left (x \right )}}{3} + \frac {\log {\left (\frac {x}{2} + \log {\left (x + 2 \right )} \right )}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x+4)*ln(2+x)+x**2+2*x)*ln(-x/(2*ln(2+x)+x))+(2*x+4)*ln(2+x)-2*x)/((2*x+4)*ln(2+x)+x**2+2*x),x)

[Out]

(x + 1/3)*log(-x/(x + 2*log(x + 2))) - log(x)/3 + log(x/2 + log(x + 2))/3

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 19, normalized size = 1.19 \begin {gather*} x \log \left (-x\right ) - x \log \left (x + 2 \, \log \left (x + 2\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x+4)*log(2+x)+x^2+2*x)*log(-x/(2*log(2+x)+x))+(2*x+4)*log(2+x)-2*x)/((2*x+4)*log(2+x)+x^2+2*x),
x, algorithm="giac")

[Out]

x*log(-x) - x*log(x + 2*log(x + 2))

________________________________________________________________________________________

Mupad [B]
time = 5.18, size = 16, normalized size = 1.00 \begin {gather*} x\,\ln \left (-\frac {x}{x+2\,\ln \left (x+2\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(-x/(x + 2*log(x + 2)))*(2*x + x^2 + log(x + 2)*(2*x + 4)) - 2*x + log(x + 2)*(2*x + 4))/(2*x + x^2 +
log(x + 2)*(2*x + 4)),x)

[Out]

x*log(-x/(x + 2*log(x + 2)))

________________________________________________________________________________________