Integrand size = 11, antiderivative size = 150 \[ \int \log (a+b \cot (c+d x)) \, dx=\frac {i \log \left (\frac {b (i-\cot (c+d x))}{a+i b}\right ) \log (a+b \cot (c+d x))}{2 d}-\frac {i \log \left (-\frac {b (i+\cot (c+d x))}{a-i b}\right ) \log (a+b \cot (c+d x))}{2 d}-\frac {i \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a-i b}\right )}{2 d}+\frac {i \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a+i b}\right )}{2 d} \] Output:
1/2*I*ln(b*(I-cot(d*x+c))/(a+I*b))*ln(a+b*cot(d*x+c))/d-1/2*I*ln(-b*(I+cot (d*x+c))/(a-I*b))*ln(a+b*cot(d*x+c))/d-1/2*I*polylog(2,(a+b*cot(d*x+c))/(a -I*b))/d+1/2*I*polylog(2,(a+b*cot(d*x+c))/(a+I*b))/d
Time = 0.01 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.00 \[ \int \log (a+b \cot (c+d x)) \, dx=\frac {i \log \left (\frac {b (i-\cot (c+d x))}{a+i b}\right ) \log (a+b \cot (c+d x))}{2 d}-\frac {i \log \left (-\frac {b (i+\cot (c+d x))}{a-i b}\right ) \log (a+b \cot (c+d x))}{2 d}-\frac {i \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a-i b}\right )}{2 d}+\frac {i \operatorname {PolyLog}\left (2,\frac {a+b \cot (c+d x)}{a+i b}\right )}{2 d} \] Input:
Integrate[Log[a + b*Cot[c + d*x]],x]
Output:
((I/2)*Log[(b*(I - Cot[c + d*x]))/(a + I*b)]*Log[a + b*Cot[c + d*x]])/d - ((I/2)*Log[-((b*(I + Cot[c + d*x]))/(a - I*b))]*Log[a + b*Cot[c + d*x]])/d - ((I/2)*PolyLog[2, (a + b*Cot[c + d*x])/(a - I*b)])/d + ((I/2)*PolyLog[2 , (a + b*Cot[c + d*x])/(a + I*b)])/d
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 (a+b \cot (c+d x)) \, dx\) |
\(\Big \downarrow \) 3028 |
\(\displaystyle x \log (a+b \cot (c+d x))-\int -\frac {b d x \csc ^2(c+d x)}{a+b \cot (c+d x)}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {b d x \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+x \log (a+b \cot (c+d x))\) |
\(\Big \downarrow \) 27 |
\(\displaystyle b d \int \frac {x \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+x \log (a+b \cot (c+d x))\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle b d \int \frac {x \csc ^2(c+d x)}{a+b \cot (c+d x)}dx+x \log (a+b \cot (c+d x))\) |
Input:
Int[Log[a + b*Cot[c + d*x]],x]
Output:
$Aborted
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[x*(D[u, x]/u), x], x] /; InverseFunctionFreeQ[u, x]
Time = 9.02 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(-\frac {b \left (-\frac {i \ln \left (a +b \cot \left (d x +c \right )\right ) \left (\ln \left (\frac {i b -b \cot \left (d x +c \right )}{i b +a}\right )-\ln \left (\frac {i b +b \cot \left (d x +c \right )}{i b -a}\right )\right )}{2 b}-\frac {i \left (\operatorname {dilog}\left (\frac {i b -b \cot \left (d x +c \right )}{i b +a}\right )-\operatorname {dilog}\left (\frac {i b +b \cot \left (d x +c \right )}{i b -a}\right )\right )}{2 b}\right )}{d}\) | \(135\) |
default | \(-\frac {b \left (-\frac {i \ln \left (a +b \cot \left (d x +c \right )\right ) \left (\ln \left (\frac {i b -b \cot \left (d x +c \right )}{i b +a}\right )-\ln \left (\frac {i b +b \cot \left (d x +c \right )}{i b -a}\right )\right )}{2 b}-\frac {i \left (\operatorname {dilog}\left (\frac {i b -b \cot \left (d x +c \right )}{i b +a}\right )-\operatorname {dilog}\left (\frac {i b +b \cot \left (d x +c \right )}{i b -a}\right )\right )}{2 b}\right )}{d}\) | \(135\) |
risch | \(\text {Expression too large to display}\) | \(1495\) |
Input:
int(ln(a+b*cot(d*x+c)),x,method=_RETURNVERBOSE)
Output:
-1/d*b*(-1/2*I*ln(a+b*cot(d*x+c))*(ln((I*b-b*cot(d*x+c))/(a+I*b))-ln((I*b+ b*cot(d*x+c))/(I*b-a)))/b-1/2*I*(dilog((I*b-b*cot(d*x+c))/(a+I*b))-dilog(( I*b+b*cot(d*x+c))/(I*b-a)))/b)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 625 vs. \(2 (119) = 238\).
Time = 0.15 (sec) , antiderivative size = 625, normalized size of antiderivative = 4.17 \[ \int \log (a+b \cot (c+d x)) \, dx =\text {Too large to display} \] Input:
integrate(log(a+b*cot(d*x+c)),x, algorithm="fricas")
Output:
1/4*(4*d*x*log((b*cos(2*d*x + 2*c) + a*sin(2*d*x + 2*c) + b)/sin(2*d*x + 2 *c)) + 2*c*log(1/2*a^2 + I*a*b - 1/2*b^2 - 1/2*(a^2 + b^2)*cos(2*d*x + 2*c ) + 1/2*(I*a^2 + I*b^2)*sin(2*d*x + 2*c)) + 2*c*log(-1/2*a^2 + I*a*b + 1/2 *b^2 + 1/2*(a^2 + b^2)*cos(2*d*x + 2*c) + 1/2*(I*a^2 + I*b^2)*sin(2*d*x + 2*c)) - 2*(d*x + c)*log((a^2 + b^2 - (a^2 + 2*I*a*b - b^2)*cos(2*d*x + 2*c ) + (-I*a^2 + 2*a*b + I*b^2)*sin(2*d*x + 2*c))/(a^2 + b^2)) - 2*(d*x + c)* log((a^2 + b^2 - (a^2 - 2*I*a*b - b^2)*cos(2*d*x + 2*c) + (I*a^2 + 2*a*b - I*b^2)*sin(2*d*x + 2*c))/(a^2 + b^2)) - 2*c*log(-1/2*cos(2*d*x + 2*c) + 1 /2*I*sin(2*d*x + 2*c) + 1/2) - 2*c*log(-1/2*cos(2*d*x + 2*c) - 1/2*I*sin(2 *d*x + 2*c) + 1/2) + 2*(d*x + c)*log(-cos(2*d*x + 2*c) + I*sin(2*d*x + 2*c ) + 1) + 2*(d*x + c)*log(-cos(2*d*x + 2*c) - I*sin(2*d*x + 2*c) + 1) + I*d ilog(-(a^2 + b^2 - (a^2 + 2*I*a*b - b^2)*cos(2*d*x + 2*c) + (-I*a^2 + 2*a* b + I*b^2)*sin(2*d*x + 2*c))/(a^2 + b^2) + 1) - I*dilog(-(a^2 + b^2 - (a^2 - 2*I*a*b - b^2)*cos(2*d*x + 2*c) + (I*a^2 + 2*a*b - I*b^2)*sin(2*d*x + 2 *c))/(a^2 + b^2) + 1) - I*dilog(cos(2*d*x + 2*c) + I*sin(2*d*x + 2*c)) + I *dilog(cos(2*d*x + 2*c) - I*sin(2*d*x + 2*c)))/d
\[ \int \log (a+b \cot (c+d x)) \, dx=\int \log {\left (a + b \cot {\left (c + d x \right )} \right )}\, dx \] Input:
integrate(ln(a+b*cot(d*x+c)),x)
Output:
Integral(log(a + b*cot(c + d*x)), x)
Time = 0.15 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.48 \[ \int \log (a+b \cot (c+d x)) \, dx=-\frac {{\left (\pi - 2 \, \arctan \left (\frac {a^{2} \tan \left (d x + c\right ) + a b}{a^{2} + b^{2}}, \frac {a b \tan \left (d x + c\right ) + b^{2}}{a^{2} + b^{2}}\right )\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 4 \, {\left (d x + c\right )} \log \left (a + \frac {b}{\tan \left (d x + c\right )}\right ) + 2 \, {\left (d x + c\right )} \log \left (\frac {a^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + b^{2}}{a^{2} + b^{2}}\right ) - 4 \, {\left (d x + c\right )} \log \left (\tan \left (d x + c\right )\right ) - 2 i \, {\rm Li}_2\left (-\frac {a \tan \left (d x + c\right ) - i \, a}{i \, a + b}\right ) + 2 i \, {\rm Li}_2\left (-\frac {a \tan \left (d x + c\right ) + i \, a}{-i \, a + b}\right ) + 2 i \, {\rm Li}_2\left (i \, \tan \left (d x + c\right ) + 1\right ) - 2 i \, {\rm Li}_2\left (-i \, \tan \left (d x + c\right ) + 1\right )}{4 \, d} \] Input:
integrate(log(a+b*cot(d*x+c)),x, algorithm="maxima")
Output:
-1/4*((pi - 2*arctan2((a^2*tan(d*x + c) + a*b)/(a^2 + b^2), (a*b*tan(d*x + c) + b^2)/(a^2 + b^2)))*log(tan(d*x + c)^2 + 1) - 4*(d*x + c)*log(a + b/t an(d*x + c)) + 2*(d*x + c)*log((a^2*tan(d*x + c)^2 + 2*a*b*tan(d*x + c) + b^2)/(a^2 + b^2)) - 4*(d*x + c)*log(tan(d*x + c)) - 2*I*dilog(-(a*tan(d*x + c) - I*a)/(I*a + b)) + 2*I*dilog(-(a*tan(d*x + c) + I*a)/(-I*a + b)) + 2 *I*dilog(I*tan(d*x + c) + 1) - 2*I*dilog(-I*tan(d*x + c) + 1))/d
\[ \int \log (a+b \cot (c+d x)) \, dx=\int { \log \left (b \cot \left (d x + c\right ) + a\right ) \,d x } \] Input:
integrate(log(a+b*cot(d*x+c)),x, algorithm="giac")
Output:
integrate(log(b*cot(d*x + c) + a), x)
Timed out. \[ \int \log (a+b \cot (c+d x)) \, dx=\int \ln \left (a+b\,\mathrm {cot}\left (c+d\,x\right )\right ) \,d x \] Input:
int(log(a + b*cot(c + d*x)),x)
Output:
int(log(a + b*cot(c + d*x)), x)
\[ \int \log (a+b \cot (c+d x)) \, dx=\int \mathrm {log}\left (a +b \cot \left (d x +c \right )\right )d x \] Input:
int(log(a+b*cot(d*x+c)),x)
Output:
int(log(cot(c + d*x)*b + a),x)