\(\int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx\) [270]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [F]
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 19, antiderivative size = 30 \[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx=\frac {\log ^2(x)}{2}+\log (x) \log \left (1+\frac {c x}{b}\right )+\operatorname {PolyLog}\left (2,-\frac {c x}{b}\right ) \]

[Out]

1/2*ln(x)^2+ln(x)*ln(1+c*x/b)+polylog(2,-c*x/b)

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {2404, 2338, 2354, 2438} \[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx=\operatorname {PolyLog}\left (2,-\frac {c x}{b}\right )+\log (x) \log \left (\frac {c x}{b}+1\right )+\frac {\log ^2(x)}{2} \]

[In]

Int[((b + 2*c*x)*Log[x])/(x*(b + c*x)),x]

[Out]

Log[x]^2/2 + Log[x]*Log[1 + (c*x)/b] + PolyLog[2, -((c*x)/b)]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.03 \[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx=\frac {\log ^2(x)}{2}+\log (x) \log \left (\frac {b+c x}{b}\right )+\operatorname {PolyLog}\left (2,-\frac {c x}{b}\right ) \]

[In]

Integrate[((b + 2*c*x)*Log[x])/(x*(b + c*x)),x]

[Out]

Log[x]^2/2 + Log[x]*Log[(b + c*x)/b] + PolyLog[2, -((c*x)/b)]

Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.03

method result size
risch \(\frac {\ln \left (x \right )^{2}}{2}+\ln \left (x \right ) \ln \left (\frac {x c +b}{b}\right )+\operatorname {dilog}\left (\frac {x c +b}{b}\right )\) \(31\)
default \(\frac {\ln \left (x \right )^{2}}{2}+c \left (\frac {\operatorname {dilog}\left (\frac {x c +b}{b}\right )}{c}+\frac {\ln \left (x \right ) \ln \left (\frac {x c +b}{b}\right )}{c}\right )\) \(41\)
parts \(\frac {\ln \left (x \right )^{2}}{2}+c \left (\frac {\operatorname {dilog}\left (\frac {x c +b}{b}\right )}{c}+\frac {\ln \left (x \right ) \ln \left (\frac {x c +b}{b}\right )}{c}\right )\) \(41\)

[In]

int((2*c*x+b)*ln(x)/x/(c*x+b),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(x)^2+ln(x)*ln((c*x+b)/b)+dilog((c*x+b)/b)

Fricas [F]

\[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx=\int { \frac {{\left (2 \, c x + b\right )} \log \left (x\right )}{{\left (c x + b\right )} x} \,d x } \]

[In]

integrate((2*c*x+b)*log(x)/x/(c*x+b),x, algorithm="fricas")

[Out]

integral((2*c*x + b)*log(x)/(c*x^2 + b*x), x)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 58.67 (sec) , antiderivative size = 228, normalized size of antiderivative = 7.60 \[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx=b \left (\begin {cases} - \frac {1}{c x} & \text {for}\: b = 0 \\\frac {\begin {cases} \operatorname {Li}_{2}\left (\frac {b e^{i \pi }}{c x}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (c \right )} \log {\left (x \right )} + \operatorname {Li}_{2}\left (\frac {b e^{i \pi }}{c x}\right ) & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (c \right )} \log {\left (\frac {1}{x} \right )} + \operatorname {Li}_{2}\left (\frac {b e^{i \pi }}{c x}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} \log {\left (c \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} \log {\left (c \right )} + \operatorname {Li}_{2}\left (\frac {b e^{i \pi }}{c x}\right ) & \text {otherwise} \end {cases}}{b} & \text {otherwise} \end {cases}\right ) - b \left (\begin {cases} \frac {1}{c x} & \text {for}\: b = 0 \\\frac {\log {\left (\frac {b}{x} + c \right )}}{b} & \text {otherwise} \end {cases}\right ) \log {\left (x \right )} - 2 c \left (\begin {cases} \frac {x}{b} & \text {for}\: c = 0 \\\frac {\begin {cases} - \operatorname {Li}_{2}\left (\frac {c x e^{i \pi }}{b}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (b \right )} \log {\left (x \right )} - \operatorname {Li}_{2}\left (\frac {c x e^{i \pi }}{b}\right ) & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (b \right )} \log {\left (\frac {1}{x} \right )} - \operatorname {Li}_{2}\left (\frac {c x e^{i \pi }}{b}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} \log {\left (b \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} \log {\left (b \right )} - \operatorname {Li}_{2}\left (\frac {c x e^{i \pi }}{b}\right ) & \text {otherwise} \end {cases}}{c} & \text {otherwise} \end {cases}\right ) + 2 c \left (\begin {cases} \frac {x}{b} & \text {for}\: c = 0 \\\frac {\log {\left (b + c x \right )}}{c} & \text {otherwise} \end {cases}\right ) \log {\left (x \right )} \]

[In]

integrate((2*c*x+b)*ln(x)/x/(c*x+b),x)

[Out]

b*Piecewise((-1/(c*x), Eq(b, 0)), (Piecewise((polylog(2, b*exp_polar(I*pi)/(c*x)), (Abs(x) < 1) & (1/Abs(x) <
1)), (log(c)*log(x) + polylog(2, b*exp_polar(I*pi)/(c*x)), Abs(x) < 1), (-log(c)*log(1/x) + polylog(2, b*exp_p
olar(I*pi)/(c*x)), 1/Abs(x) < 1), (-meijerg(((), (1, 1)), ((0, 0), ()), x)*log(c) + meijerg(((1, 1), ()), ((),
 (0, 0)), x)*log(c) + polylog(2, b*exp_polar(I*pi)/(c*x)), True))/b, True)) - b*Piecewise((1/(c*x), Eq(b, 0)),
 (log(b/x + c)/b, True))*log(x) - 2*c*Piecewise((x/b, Eq(c, 0)), (Piecewise((-polylog(2, c*x*exp_polar(I*pi)/b
), (Abs(x) < 1) & (1/Abs(x) < 1)), (log(b)*log(x) - polylog(2, c*x*exp_polar(I*pi)/b), Abs(x) < 1), (-log(b)*l
og(1/x) - polylog(2, c*x*exp_polar(I*pi)/b), 1/Abs(x) < 1), (-meijerg(((), (1, 1)), ((0, 0), ()), x)*log(b) +
meijerg(((1, 1), ()), ((), (0, 0)), x)*log(b) - polylog(2, c*x*exp_polar(I*pi)/b), True))/c, True)) + 2*c*Piec
ewise((x/b, Eq(c, 0)), (log(b + c*x)/c, True))*log(x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.63 \[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx={\left (\log \left (c x + b\right ) + \log \left (x\right )\right )} \log \left (x\right ) - \log \left (c x + b\right ) \log \left (x\right ) + \log \left (\frac {c x}{b} + 1\right ) \log \left (x\right ) - \frac {1}{2} \, \log \left (x\right )^{2} + {\rm Li}_2\left (-\frac {c x}{b}\right ) \]

[In]

integrate((2*c*x+b)*log(x)/x/(c*x+b),x, algorithm="maxima")

[Out]

(log(c*x + b) + log(x))*log(x) - log(c*x + b)*log(x) + log(c*x/b + 1)*log(x) - 1/2*log(x)^2 + dilog(-c*x/b)

Giac [F]

\[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx=\int { \frac {{\left (2 \, c x + b\right )} \log \left (x\right )}{{\left (c x + b\right )} x} \,d x } \]

[In]

integrate((2*c*x+b)*log(x)/x/(c*x+b),x, algorithm="giac")

[Out]

integrate((2*c*x + b)*log(x)/((c*x + b)*x), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {(b+2 c x) \log (x)}{x (b+c x)} \, dx=\int \frac {\ln \left (x\right )\,\left (b+2\,c\,x\right )}{x\,\left (b+c\,x\right )} \,d x \]

[In]

int((log(x)*(b + 2*c*x))/(x*(b + c*x)),x)

[Out]

int((log(x)*(b + 2*c*x))/(x*(b + c*x)), x)