\(\int \log ^3(a+b \cot (c+d x)) \, dx\) [6]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F(-1)]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 13, antiderivative size = 318 \[ \int \log ^3(a+b \cot (c+d x)) \, dx=\frac {i \log \left (\frac {b (i-\cot (c+d x))}{a+i b}\right ) \log ^3(a+b \cot (c+d x))}{2 d}-\frac {i \log \left (-\frac {b (i+\cot (c+d x))}{a-i b}\right ) \log ^3(a+b \cot (c+d x))}{2 d}-\frac {3 i \log ^2(a+b \cot (c+d x)) \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a-i b}\right )}{2 d}+\frac {3 i \log ^2(a+b \cot (c+d x)) \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a+i b}\right )}{2 d}+\frac {3 i \log (a+b \cot (c+d x)) \operatorname {PolyLog}\left (3,\frac {a+b \cot (c+d x)}{a-i b}\right )}{d}-\frac {3 i \log (a+b \cot (c+d x)) \operatorname {PolyLog}\left (3,\frac {a+b \cot (c+d x)}{a+i b}\right )}{d}-\frac {3 i \operatorname {PolyLog}\left (4,\frac {a+b \cot (c+d x)}{a-i b}\right )}{d}+\frac {3 i \operatorname {PolyLog}\left (4,\frac {a+b \cot (c+d x)}{a+i b}\right )}{d} \] Output:

1/2*I*ln(b*(I-cot(d*x+c))/(a+I*b))*ln(a+b*cot(d*x+c))^3/d-1/2*I*ln(-b*(I+c 
ot(d*x+c))/(a-I*b))*ln(a+b*cot(d*x+c))^3/d-3/2*I*ln(a+b*cot(d*x+c))^2*poly 
log(2,(a+b*cot(d*x+c))/(a-I*b))/d+3/2*I*ln(a+b*cot(d*x+c))^2*polylog(2,(a+ 
b*cot(d*x+c))/(a+I*b))/d+3*I*ln(a+b*cot(d*x+c))*polylog(3,(a+b*cot(d*x+c)) 
/(a-I*b))/d-3*I*ln(a+b*cot(d*x+c))*polylog(3,(a+b*cot(d*x+c))/(a+I*b))/d-3 
*I*polylog(4,(a+b*cot(d*x+c))/(a-I*b))/d+3*I*polylog(4,(a+b*cot(d*x+c))/(a 
+I*b))/d
 

Mathematica [A] (verified)

Time = 1.25 (sec) , antiderivative size = 277, normalized size of antiderivative = 0.87 \[ \int \log ^3(a+b \cot (c+d x)) \, dx=\frac {i \left (\log \left (-\frac {b (-i+\cot (c+d x))}{a+i b}\right ) \log ^3(a+b \cot (c+d x))-\log \left (-\frac {b (i+\cot (c+d x))}{a-i b}\right ) \log ^3(a+b \cot (c+d x))-3 \log ^2(a+b \cot (c+d x)) \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a-i b}\right )+3 \log ^2(a+b \cot (c+d x)) \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a+i b}\right )+6 \log (a+b \cot (c+d x)) \operatorname {PolyLog}\left (3,\frac {a+b \cot (c+d x)}{a-i b}\right )-6 \log (a+b \cot (c+d x)) \operatorname {PolyLog}\left (3,\frac {a+b \cot (c+d x)}{a+i b}\right )-6 \operatorname {PolyLog}\left (4,\frac {a+b \cot (c+d x)}{a-i b}\right )+6 \operatorname {PolyLog}\left (4,\frac {a+b \cot (c+d x)}{a+i b}\right )\right )}{2 d} \] Input:

Integrate[Log[a + b*Cot[c + d*x]]^3,x]
 

Output:

((I/2)*(Log[-((b*(-I + Cot[c + d*x]))/(a + I*b))]*Log[a + b*Cot[c + d*x]]^ 
3 - Log[-((b*(I + Cot[c + d*x]))/(a - I*b))]*Log[a + b*Cot[c + d*x]]^3 - 3 
*Log[a + b*Cot[c + d*x]]^2*PolyLog[2, (a + b*Cot[c + d*x])/(a - I*b)] + 3* 
Log[a + b*Cot[c + d*x]]^2*PolyLog[2, (a + b*Cot[c + d*x])/(a + I*b)] + 6*L 
og[a + b*Cot[c + d*x]]*PolyLog[3, (a + b*Cot[c + d*x])/(a - I*b)] - 6*Log[ 
a + b*Cot[c + d*x]]*PolyLog[3, (a + b*Cot[c + d*x])/(a + I*b)] - 6*PolyLog 
[4, (a + b*Cot[c + d*x])/(a - I*b)] + 6*PolyLog[4, (a + b*Cot[c + d*x])/(a 
 + I*b)]))/d
 

Rubi [A] (verified)

Time = 0.98 (sec) , antiderivative size = 299, normalized size of antiderivative = 0.94, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {4852, 2856, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \log ^3(a+b \cot (c+d x)) \, dx\)

\(\Big \downarrow \) 4852

\(\displaystyle -\frac {\int \frac {\log ^3(a+b \cot (c+d x))}{\cot ^2(c+d x)+1}d\cot (c+d x)}{d}\)

\(\Big \downarrow \) 2856

\(\displaystyle -\frac {\int \left (\frac {i \log ^3(a+b \cot (c+d x))}{2 (i-\cot (c+d x))}+\frac {i \log ^3(a+b \cot (c+d x))}{2 (\cot (c+d x)+i)}\right )d\cot (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {3 i \operatorname {PolyLog}\left (4,\frac {a+b \cot (c+d x)}{a-i b}\right )-3 i \operatorname {PolyLog}\left (4,\frac {a+b \cot (c+d x)}{a+i b}\right )+\frac {3}{2} i \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a-i b}\right ) \log ^2(a+b \cot (c+d x))-\frac {3}{2} i \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a+i b}\right ) \log ^2(a+b \cot (c+d x))-3 i \operatorname {PolyLog}\left (3,\frac {a+b \cot (c+d x)}{a-i b}\right ) \log (a+b \cot (c+d x))+3 i \operatorname {PolyLog}\left (3,\frac {a+b \cot (c+d x)}{a+i b}\right ) \log (a+b \cot (c+d x))-\frac {1}{2} i \log \left (\frac {b (-\cot (c+d x)+i)}{a+i b}\right ) \log ^3(a+b \cot (c+d x))+\frac {1}{2} i \log \left (-\frac {b (\cot (c+d x)+i)}{a-i b}\right ) \log ^3(a+b \cot (c+d x))}{d}\)

Input:

Int[Log[a + b*Cot[c + d*x]]^3,x]
 

Output:

-(((-1/2*I)*Log[(b*(I - Cot[c + d*x]))/(a + I*b)]*Log[a + b*Cot[c + d*x]]^ 
3 + (I/2)*Log[-((b*(I + Cot[c + d*x]))/(a - I*b))]*Log[a + b*Cot[c + d*x]] 
^3 + ((3*I)/2)*Log[a + b*Cot[c + d*x]]^2*PolyLog[2, (a + b*Cot[c + d*x])/( 
a - I*b)] - ((3*I)/2)*Log[a + b*Cot[c + d*x]]^2*PolyLog[2, (a + b*Cot[c + 
d*x])/(a + I*b)] - (3*I)*Log[a + b*Cot[c + d*x]]*PolyLog[3, (a + b*Cot[c + 
 d*x])/(a - I*b)] + (3*I)*Log[a + b*Cot[c + d*x]]*PolyLog[3, (a + b*Cot[c 
+ d*x])/(a + I*b)] + (3*I)*PolyLog[4, (a + b*Cot[c + d*x])/(a - I*b)] - (3 
*I)*PolyLog[4, (a + b*Cot[c + d*x])/(a + I*b)])/d)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2856
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_. 
)*(x_)^(r_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x) 
^n])^p, (f + g*x^r)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, r}, x] && I 
GtQ[p, 0] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[r] && NeQ[r, 1]))
 

rule 4852
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, Simp[With[{d = FreeFa 
ctors[Cot[v], x]}, -d/Coefficient[v, x, 1]   Subst[Int[SubstFor[1/(1 + d^2* 
x^2), Cot[v]/d, u, x], x], x, Cot[v]/d]], x] /;  !FalseQ[v] && FunctionOfQ[ 
NonfreeFactors[Cot[v], x], u, x, True] && TryPureTanSubst[ActivateTrig[u], 
x]]
 
Maple [F]

\[\int \ln \left (a +b \cot \left (d x +c \right )\right )^{3}d x\]

Input:

int(ln(a+b*cot(d*x+c))^3,x)
 

Output:

int(ln(a+b*cot(d*x+c))^3,x)
 

Fricas [F]

\[ \int \log ^3(a+b \cot (c+d x)) \, dx=\int { \log \left (b \cot \left (d x + c\right ) + a\right )^{3} \,d x } \] Input:

integrate(log(a+b*cot(d*x+c))^3,x, algorithm="fricas")
 

Output:

integral(log(b*cot(d*x + c) + a)^3, x)
 

Sympy [F]

\[ \int \log ^3(a+b \cot (c+d x)) \, dx=\int \log {\left (a + b \cot {\left (c + d x \right )} \right )}^{3}\, dx \] Input:

integrate(ln(a+b*cot(d*x+c))**3,x)
 

Output:

Integral(log(a + b*cot(c + d*x))**3, x)
 

Maxima [F(-1)]

Timed out. \[ \int \log ^3(a+b \cot (c+d x)) \, dx=\text {Timed out} \] Input:

integrate(log(a+b*cot(d*x+c))^3,x, algorithm="maxima")
 

Output:

Timed out
 

Giac [F]

\[ \int \log ^3(a+b \cot (c+d x)) \, dx=\int { \log \left (b \cot \left (d x + c\right ) + a\right )^{3} \,d x } \] Input:

integrate(log(a+b*cot(d*x+c))^3,x, algorithm="giac")
 

Output:

integrate(log(b*cot(d*x + c) + a)^3, x)
 

Mupad [F(-1)]

Timed out. \[ \int \log ^3(a+b \cot (c+d x)) \, dx=\int {\ln \left (a+b\,\mathrm {cot}\left (c+d\,x\right )\right )}^3 \,d x \] Input:

int(log(a + b*cot(c + d*x))^3,x)
 

Output:

int(log(a + b*cot(c + d*x))^3, x)
 

Reduce [F]

\[ \int \log ^3(a+b \cot (c+d x)) \, dx=\int \mathrm {log}\left (a +b \cot \left (d x +c \right )\right )^{3}d x \] Input:

int(log(a+b*cot(d*x+c))^3,x)
 

Output:

int(log(a+b*cot(d*x+c))^3,x)