3.29.99 \(\int \frac {42-9 x-36 x^2-15 x^3+(9 x+9 x^2) \log (x)+(-42 x-42 x^2-6 x^3+(42+42 x+6 x^2) \log (x)) \log (-\frac {x}{-2 x+2 \log (x)})}{-4 x^3-4 x^4-x^5+(4 x^2+4 x^3+x^4) \log (x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 3.30, antiderivative size = 61, normalized size of antiderivative = 1.85, number of steps used = 23, number of rules used = 6, integrand size = 105, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.057, Rules used = {6741, 6742, 77, 893, 2555, 12} \begin {gather*} -\frac {21}{2 x}-\frac {9}{2 (x+2)}-\frac {21 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 x}+\frac {9 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 (x+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(42 - 9*x - 36*x^2 - 15*x^3 + (9*x + 9*x^2)*Log[x] + (-42*x - 42*x^2 - 6*x^3 + (42 + 42*x + 6*x^2)*Log[x])
*Log[-(x/(-2*x + 2*Log[x]))])/(-4*x^3 - 4*x^4 - x^5 + (4*x^2 + 4*x^3 + x^4)*Log[x]),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 2555

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*Simplify
[D[u, x]/u], x], x] /; InverseFunctionFreeQ[w, x]] /; ProductQ[u]

Rule 6741

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

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-42+9 x+36 x^2+15 x^3-\left (9 x+9 x^2\right ) \log (x)-\left (-42 x-42 x^2-6 x^3+\left (42+42 x+6 x^2\right ) \log (x)\right ) \log \left (-\frac {x}{-2 x+2 \log (x)}\right )}{x^2 (2+x)^2 (x-\log (x))} \, dx\\ &=\int \left (\frac {36}{(2+x)^2 (x-\log (x))}-\frac {42}{x^2 (2+x)^2 (x-\log (x))}+\frac {9}{x (2+x)^2 (x-\log (x))}+\frac {15 x}{(2+x)^2 (x-\log (x))}-\frac {9 (1+x) \log (x)}{x (2+x)^2 (x-\log (x))}+\frac {6 \left (7+7 x+x^2\right ) \log \left (\frac {x}{2 (x-\log (x))}\right )}{x^2 (2+x)^2}\right ) \, dx\\ &=6 \int \frac {\left (7+7 x+x^2\right ) \log \left (\frac {x}{2 (x-\log (x))}\right )}{x^2 (2+x)^2} \, dx+9 \int \frac {1}{x (2+x)^2 (x-\log (x))} \, dx-9 \int \frac {(1+x) \log (x)}{x (2+x)^2 (x-\log (x))} \, dx+15 \int \frac {x}{(2+x)^2 (x-\log (x))} \, dx+36 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-42 \int \frac {1}{x^2 (2+x)^2 (x-\log (x))} \, dx\\ &=-\frac {21 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 x}+\frac {9 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 (2+x)}-6 \int \frac {(7+2 x) (-1+\log (x))}{2 x^2 (2+x) (x-\log (x))} \, dx-9 \int \left (\frac {-1-x}{x (2+x)^2}+\frac {1+x}{(2+x)^2 (x-\log (x))}\right ) \, dx+9 \int \left (\frac {1}{4 x (x-\log (x))}-\frac {1}{2 (2+x)^2 (x-\log (x))}-\frac {1}{4 (2+x) (x-\log (x))}\right ) \, dx+15 \int \left (-\frac {2}{(2+x)^2 (x-\log (x))}+\frac {1}{(2+x) (x-\log (x))}\right ) \, dx+36 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-42 \int \left (\frac {1}{4 x^2 (x-\log (x))}-\frac {1}{4 x (x-\log (x))}+\frac {1}{4 (2+x)^2 (x-\log (x))}+\frac {1}{4 (2+x) (x-\log (x))}\right ) \, dx\\ &=-\frac {21 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 x}+\frac {9 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 (2+x)}+\frac {9}{4} \int \frac {1}{x (x-\log (x))} \, dx-\frac {9}{4} \int \frac {1}{(2+x) (x-\log (x))} \, dx-3 \int \frac {(7+2 x) (-1+\log (x))}{x^2 (2+x) (x-\log (x))} \, dx-\frac {9}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-9 \int \frac {-1-x}{x (2+x)^2} \, dx-9 \int \frac {1+x}{(2+x)^2 (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{x^2 (x-\log (x))} \, dx+\frac {21}{2} \int \frac {1}{x (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x) (x-\log (x))} \, dx+15 \int \frac {1}{(2+x) (x-\log (x))} \, dx-30 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+36 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx\\ &=-\frac {21 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 x}+\frac {9 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 (2+x)}+\frac {9}{4} \int \frac {1}{x (x-\log (x))} \, dx-\frac {9}{4} \int \frac {1}{(2+x) (x-\log (x))} \, dx-3 \int \left (\frac {-7-2 x}{x^2 (2+x)}+\frac {(-1+x) (7+2 x)}{x^2 (2+x) (x-\log (x))}\right ) \, dx-\frac {9}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-9 \int \left (-\frac {1}{4 x}-\frac {1}{2 (2+x)^2}+\frac {1}{4 (2+x)}\right ) \, dx-9 \int \left (-\frac {1}{(2+x)^2 (x-\log (x))}+\frac {1}{(2+x) (x-\log (x))}\right ) \, dx-\frac {21}{2} \int \frac {1}{x^2 (x-\log (x))} \, dx+\frac {21}{2} \int \frac {1}{x (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x) (x-\log (x))} \, dx+15 \int \frac {1}{(2+x) (x-\log (x))} \, dx-30 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+36 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx\\ &=-\frac {9}{2 (2+x)}+\frac {9 \log (x)}{4}-\frac {9}{4} \log (2+x)-\frac {21 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 x}+\frac {9 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 (2+x)}+\frac {9}{4} \int \frac {1}{x (x-\log (x))} \, dx-\frac {9}{4} \int \frac {1}{(2+x) (x-\log (x))} \, dx-3 \int \frac {-7-2 x}{x^2 (2+x)} \, dx-3 \int \frac {(-1+x) (7+2 x)}{x^2 (2+x) (x-\log (x))} \, dx-\frac {9}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+9 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-9 \int \frac {1}{(2+x) (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{x^2 (x-\log (x))} \, dx+\frac {21}{2} \int \frac {1}{x (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x) (x-\log (x))} \, dx+15 \int \frac {1}{(2+x) (x-\log (x))} \, dx-30 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+36 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx\\ &=-\frac {9}{2 (2+x)}+\frac {9 \log (x)}{4}-\frac {9}{4} \log (2+x)-\frac {21 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 x}+\frac {9 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 (2+x)}+\frac {9}{4} \int \frac {1}{x (x-\log (x))} \, dx-\frac {9}{4} \int \frac {1}{(2+x) (x-\log (x))} \, dx-3 \int \left (-\frac {7}{2 x^2}+\frac {3}{4 x}-\frac {3}{4 (2+x)}\right ) \, dx-3 \int \left (-\frac {7}{2 x^2 (x-\log (x))}+\frac {17}{4 x (x-\log (x))}-\frac {9}{4 (2+x) (x-\log (x))}\right ) \, dx-\frac {9}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+9 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-9 \int \frac {1}{(2+x) (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{x^2 (x-\log (x))} \, dx+\frac {21}{2} \int \frac {1}{x (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x) (x-\log (x))} \, dx+15 \int \frac {1}{(2+x) (x-\log (x))} \, dx-30 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+36 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx\\ &=-\frac {21}{2 x}-\frac {9}{2 (2+x)}-\frac {21 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 x}+\frac {9 \log \left (\frac {x}{2 (x-\log (x))}\right )}{2 (2+x)}+\frac {9}{4} \int \frac {1}{x (x-\log (x))} \, dx-\frac {9}{4} \int \frac {1}{(2+x) (x-\log (x))} \, dx-\frac {9}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+\frac {27}{4} \int \frac {1}{(2+x) (x-\log (x))} \, dx+9 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-9 \int \frac {1}{(2+x) (x-\log (x))} \, dx+\frac {21}{2} \int \frac {1}{x (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx-\frac {21}{2} \int \frac {1}{(2+x) (x-\log (x))} \, dx-\frac {51}{4} \int \frac {1}{x (x-\log (x))} \, dx+15 \int \frac {1}{(2+x) (x-\log (x))} \, dx-30 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx+36 \int \frac {1}{(2+x)^2 (x-\log (x))} \, dx\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 34, normalized size = 1.03 \begin {gather*} -\frac {3 \left (7+5 x+(7+2 x) \log \left (\frac {x}{2 x-2 \log (x)}\right )\right )}{x (2+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(42 - 9*x - 36*x^2 - 15*x^3 + (9*x + 9*x^2)*Log[x] + (-42*x - 42*x^2 - 6*x^3 + (42 + 42*x + 6*x^2)*L
og[x])*Log[-(x/(-2*x + 2*Log[x]))])/(-4*x^3 - 4*x^4 - x^5 + (4*x^2 + 4*x^3 + x^4)*Log[x]),x]

[Out]

(-3*(7 + 5*x + (7 + 2*x)*Log[x/(2*x - 2*Log[x])]))/(x*(2 + x))

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 34, normalized size = 1.03 \begin {gather*} -\frac {3 \, {\left ({\left (2 \, x + 7\right )} \log \left (\frac {x}{2 \, {\left (x - \log \relax (x)\right )}}\right ) + 5 \, x + 7\right )}}{x^{2} + 2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((6*x^2+42*x+42)*log(x)-6*x^3-42*x^2-42*x)*log(-x/(2*log(x)-2*x))+(9*x^2+9*x)*log(x)-15*x^3-36*x^2-
9*x+42)/((x^4+4*x^3+4*x^2)*log(x)-x^5-4*x^4-4*x^3),x, algorithm="fricas")

[Out]

-3*((2*x + 7)*log(1/2*x/(x - log(x))) + 5*x + 7)/(x^2 + 2*x)

________________________________________________________________________________________

giac [A]  time = 0.24, size = 54, normalized size = 1.64 \begin {gather*} -\frac {3}{2} \, {\left (\frac {3}{x + 2} - \frac {7}{x}\right )} \log \left (2 \, x - 2 \, \log \relax (x)\right ) + \frac {3}{2} \, {\left (\frac {3}{x + 2} - \frac {7}{x}\right )} \log \relax (x) - \frac {9}{2 \, {\left (x + 2\right )}} - \frac {21}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((6*x^2+42*x+42)*log(x)-6*x^3-42*x^2-42*x)*log(-x/(2*log(x)-2*x))+(9*x^2+9*x)*log(x)-15*x^3-36*x^2-
9*x+42)/((x^4+4*x^3+4*x^2)*log(x)-x^5-4*x^4-4*x^3),x, algorithm="giac")

[Out]

-3/2*(3/(x + 2) - 7/x)*log(2*x - 2*log(x)) + 3/2*(3/(x + 2) - 7/x)*log(x) - 9/2/(x + 2) - 21/2/x

________________________________________________________________________________________

maple [C]  time = 0.16, size = 277, normalized size = 8.39




method result size



risch \(\frac {3 \left (7+2 x \right ) \ln \left (x -\ln \relax (x )\right )}{x \left (2+x \right )}+\frac {3 i \pi x \,\mathrm {csgn}\left (\frac {i}{\ln \relax (x )-x}\right ) \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )^{2}+\frac {21 i \pi \,\mathrm {csgn}\left (\frac {i}{\ln \relax (x )-x}\right ) \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )^{2}}{2}-3 i \pi x \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )^{3}+\frac {21 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{\ln \relax (x )-x}\right ) \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )}{2}-\frac {21 i \pi \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )^{3}}{2}-3 i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )^{2}-\frac {21 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )^{2}}{2}+3 i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (\frac {i}{\ln \relax (x )-x}\right ) \mathrm {csgn}\left (\frac {i x}{\ln \relax (x )-x}\right )-21+6 x \ln \relax (2)-6 x \ln \relax (x )+21 \ln \relax (2)-15 x -21 \ln \relax (x )}{x \left (2+x \right )}\) \(277\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((6*x^2+42*x+42)*ln(x)-6*x^3-42*x^2-42*x)*ln(-x/(2*ln(x)-2*x))+(9*x^2+9*x)*ln(x)-15*x^3-36*x^2-9*x+42)/((
x^4+4*x^3+4*x^2)*ln(x)-x^5-4*x^4-4*x^3),x,method=_RETURNVERBOSE)

[Out]

3*(7+2*x)/x/(2+x)*ln(x-ln(x))+3/2*(2*I*Pi*x*csgn(I/(ln(x)-x))*csgn(I*x/(ln(x)-x))^2+7*I*Pi*csgn(I/(ln(x)-x))*c
sgn(I*x/(ln(x)-x))^2-2*I*Pi*x*csgn(I*x/(ln(x)-x))^3+7*I*Pi*csgn(I*x)*csgn(I/(ln(x)-x))*csgn(I*x/(ln(x)-x))-7*I
*Pi*csgn(I*x/(ln(x)-x))^3-2*I*Pi*x*csgn(I*x)*csgn(I*x/(ln(x)-x))^2-7*I*Pi*csgn(I*x)*csgn(I*x/(ln(x)-x))^2+2*I*
Pi*x*csgn(I*x)*csgn(I/(ln(x)-x))*csgn(I*x/(ln(x)-x))-14+4*x*ln(2)-4*x*ln(x)+14*ln(2)-10*x-14*ln(x))/x/(2+x)

________________________________________________________________________________________

maxima [A]  time = 0.59, size = 47, normalized size = 1.42 \begin {gather*} \frac {3 \, {\left (x {\left (2 \, \log \relax (2) - 5\right )} + {\left (2 \, x + 7\right )} \log \left (x - \log \relax (x)\right ) - {\left (2 \, x + 7\right )} \log \relax (x) + 7 \, \log \relax (2) - 7\right )}}{x^{2} + 2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((6*x^2+42*x+42)*log(x)-6*x^3-42*x^2-42*x)*log(-x/(2*log(x)-2*x))+(9*x^2+9*x)*log(x)-15*x^3-36*x^2-
9*x+42)/((x^4+4*x^3+4*x^2)*log(x)-x^5-4*x^4-4*x^3),x, algorithm="maxima")

[Out]

3*(x*(2*log(2) - 5) + (2*x + 7)*log(x - log(x)) - (2*x + 7)*log(x) + 7*log(2) - 7)/(x^2 + 2*x)

________________________________________________________________________________________

mupad [B]  time = 2.23, size = 46, normalized size = 1.39 \begin {gather*} -\frac {15\,x+21}{x^2+2\,x}-\frac {\ln \left (\frac {x}{2\,x-2\,\ln \relax (x)}\right )\,\left (6\,x+21\right )}{x^2+2\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((9*x - log(x)*(9*x + 9*x^2) + log(x/(2*x - 2*log(x)))*(42*x - log(x)*(42*x + 6*x^2 + 42) + 42*x^2 + 6*x^3)
 + 36*x^2 + 15*x^3 - 42)/(4*x^3 + 4*x^4 + x^5 - log(x)*(4*x^2 + 4*x^3 + x^4)),x)

[Out]

- (15*x + 21)/(2*x + x^2) - (log(x/(2*x - 2*log(x)))*(6*x + 21))/(2*x + x^2)

________________________________________________________________________________________

sympy [A]  time = 0.49, size = 39, normalized size = 1.18 \begin {gather*} \frac {- 15 x - 21}{x^{2} + 2 x} + \frac {\left (- 6 x - 21\right ) \log {\left (- \frac {x}{- 2 x + 2 \log {\relax (x )}} \right )}}{x^{2} + 2 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((6*x**2+42*x+42)*ln(x)-6*x**3-42*x**2-42*x)*ln(-x/(2*ln(x)-2*x))+(9*x**2+9*x)*ln(x)-15*x**3-36*x**
2-9*x+42)/((x**4+4*x**3+4*x**2)*ln(x)-x**5-4*x**4-4*x**3),x)

[Out]

(-15*x - 21)/(x**2 + 2*x) + (-6*x - 21)*log(-x/(-2*x + 2*log(x)))/(x**2 + 2*x)

________________________________________________________________________________________