Integrand size = 17, antiderivative size = 94 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\frac {1}{2} i b x^2+x \coth ^{-1}(1-i d-d \cot (a+b x))-\frac {1}{2} x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )+\frac {i \operatorname {PolyLog}\left (2,(1-i d) e^{2 i a+2 i b x}\right )}{4 b} \]
1/2*I*b*x^2+x*arccoth(1-I*d-d*cot(b*x+a))-1/2*x*ln(1-(1-I*d)*exp(2*I*a+2*I *b*x))+1/4*I*polylog(2,(1-I*d)*exp(2*I*a+2*I*b*x))/b
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(605\) vs. \(2(94)=188\).
Time = 1.84 (sec) , antiderivative size = 605, normalized size of antiderivative = 6.44 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=x \coth ^{-1}(1-i d-d \cot (a+b x))+\frac {x \csc ^2(a+b x) \left (2 b x \log (2 \cos (b x) (\cos (b x)-i \sin (b x)))+i \log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) (d \cos (a+b x)+i (2 i+d) \sin (a+b x))}{2 (i+d)}\right ) \log (1-i \tan (b x))-i \log \left (\frac {i \sec (b x) (d \cos (a+b x)+i (2 i+d) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \log (1+i \tan (b x))+i \operatorname {PolyLog}(2,-\cos (2 b x)+i \sin (2 b x))-i \operatorname {PolyLog}\left (2,\frac {1}{2} \sec (b x) ((2-i d) \cos (a)+d \sin (a)) (\cos (a+b x)+i \sin (a+b x))\right )+i \operatorname {PolyLog}\left (2,\frac {(\cos (a)-i \sin (a)) ((2-i d) \cos (a)+d \sin (a)) (i+\tan (b x))}{2 (i+d)}\right )\right ) (\cos (b x)-i \sin (b x)) (\cos (b x)+i \sin (b x))}{(i+\cot (a+b x)) (-2+i d+d \cot (a+b x)) \left (-\frac {\log (1-i \tan (b x)) \sec (b x) ((2 i+d) \cos (a)+i d \sin (a))}{d \cos (a+b x)+i (2 i+d) \sin (a+b x)}+\frac {\log (1+i \tan (b x)) \sec (b x) ((2 i+d) \cos (a)+i d \sin (a))}{d \cos (a+b x)+i (2 i+d) \sin (a+b x)}+\frac {\log \left (\frac {i \sec (b x) (d \cos (a+b x)+i (2 i+d) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \sec ^2(b x)}{1+i \tan (b x)}-2 b x (i+\tan (b x))+i \log \left (1-\frac {1}{2} \sec (b x) ((2-i d) \cos (a)+d \sin (a)) (\cos (a+b x)+i \sin (a+b x))\right ) (i+\tan (b x))\right )} \]
x*ArcCoth[1 - I*d - d*Cot[a + b*x]] + (x*Csc[a + b*x]^2*(2*b*x*Log[2*Cos[b *x]*(Cos[b*x] - I*Sin[b*x])] + I*Log[(Sec[b*x]*(Cos[a] - I*Sin[a])*(d*Cos[ a + b*x] + I*(2*I + d)*Sin[a + b*x]))/(2*(I + d))]*Log[1 - I*Tan[b*x]] - I *Log[(I*Sec[b*x]*(d*Cos[a + b*x] + I*(2*I + d)*Sin[a + b*x]))/(2*Cos[a] - (2*I)*Sin[a])]*Log[1 + I*Tan[b*x]] + I*PolyLog[2, -Cos[2*b*x] + I*Sin[2*b* x]] - I*PolyLog[2, (Sec[b*x]*((2 - I*d)*Cos[a] + d*Sin[a])*(Cos[a + b*x] + I*Sin[a + b*x]))/2] + I*PolyLog[2, ((Cos[a] - I*Sin[a])*((2 - I*d)*Cos[a] + d*Sin[a])*(I + Tan[b*x]))/(2*(I + d))])*(Cos[b*x] - I*Sin[b*x])*(Cos[b* x] + I*Sin[b*x]))/((I + Cot[a + b*x])*(-2 + I*d + d*Cot[a + b*x])*(-((Log[ 1 - I*Tan[b*x]]*Sec[b*x]*((2*I + d)*Cos[a] + I*d*Sin[a]))/(d*Cos[a + b*x] + I*(2*I + d)*Sin[a + b*x])) + (Log[1 + I*Tan[b*x]]*Sec[b*x]*((2*I + d)*Co s[a] + I*d*Sin[a]))/(d*Cos[a + b*x] + I*(2*I + d)*Sin[a + b*x]) + (Log[(I* Sec[b*x]*(d*Cos[a + b*x] + I*(2*I + d)*Sin[a + b*x]))/(2*Cos[a] - (2*I)*Si n[a])]*Sec[b*x]^2)/(1 + I*Tan[b*x]) - 2*b*x*(I + Tan[b*x]) + I*Log[1 - (Se c[b*x]*((2 - I*d)*Cos[a] + d*Sin[a])*(Cos[a + b*x] + I*Sin[a + b*x]))/2]*( I + Tan[b*x])))
Time = 0.48 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.31, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {6812, 2615, 2620, 2715, 2838}
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 \coth ^{-1}(d (-\cot (a+b x))-i d+1) \, dx\) |
\(\Big \downarrow \) 6812 |
\(\displaystyle i b \int \frac {x}{1-(1-i d) e^{2 i a+2 i b x}}dx+x \coth ^{-1}(d (-\cot (a+b x))-i d+1)\) |
\(\Big \downarrow \) 2615 |
\(\displaystyle i b \left (\frac {x^2}{2}+(1-i d) \int \frac {e^{2 i a+2 i b x} x}{1-(1-i d) e^{2 i a+2 i b x}}dx\right )+x \coth ^{-1}(d (-\cot (a+b x))-i d+1)\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle i b \left (\frac {x^2}{2}+(1-i d) \left (\frac {\int \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )dx}{2 b (d+i)}-\frac {x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )}{2 b (d+i)}\right )\right )+x \coth ^{-1}(d (-\cot (a+b x))-i d+1)\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle i b \left (\frac {x^2}{2}+(1-i d) \left (-\frac {i \int e^{-2 i a-2 i b x} \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )de^{2 i a+2 i b x}}{4 b^2 (d+i)}-\frac {x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )}{2 b (d+i)}\right )\right )+x \coth ^{-1}(d (-\cot (a+b x))-i d+1)\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle i b \left (\frac {x^2}{2}+(1-i d) \left (\frac {i \operatorname {PolyLog}\left (2,(1-i d) e^{2 i a+2 i b x}\right )}{4 b^2 (d+i)}-\frac {x \log \left (1-(1-i d) e^{2 i a+2 i b x}\right )}{2 b (d+i)}\right )\right )+x \coth ^{-1}(d (-\cot (a+b x))-i d+1)\) |
x*ArcCoth[1 - I*d - d*Cot[a + b*x]] + I*b*(x^2/2 + (1 - I*d)*(-1/2*(x*Log[ 1 - (1 - I*d)*E^((2*I)*a + (2*I)*b*x)])/(b*(I + d)) + ((I/4)*PolyLog[2, (1 - I*d)*E^((2*I)*a + (2*I)*b*x)])/(b^2*(I + d))))
3.3.63.3.1 Defintions of rubi rules used
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x _))))^(n_.)), x_Symbol] :> Simp[(c + d*x)^(m + 1)/(a*d*(m + 1)), x] - Simp[ b/a Int[(c + d*x)^m*((F^(g*(e + f*x)))^n/(a + b*(F^(g*(e + f*x)))^n)), x] , x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
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]
Int[ArcCoth[(c_.) + Cot[(a_.) + (b_.)*(x_)]*(d_.)], x_Symbol] :> Simp[x*Arc Coth[c + d*Cot[a + b*x]], x] + Simp[I*b Int[x/(c - I*d - c*E^(2*I*a + 2*I *b*x)), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[(c - I*d)^2, 1]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 319 vs. \(2 (77 ) = 154\).
Time = 2.38 (sec) , antiderivative size = 320, normalized size of antiderivative = 3.40
method | result | size |
derivativedivides | \(-\frac {-\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (i d -d \cot \left (b x +a \right )\right )}{2}+\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (-i d -d \cot \left (b x +a \right )\right )}{2}-\frac {d^{2} \left (-\frac {i \left (-\frac {\operatorname {dilog}\left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}-\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right ) \ln \left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}+\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right )^{2}}{4}\right )}{d}+\frac {i \left (-\frac {\operatorname {dilog}\left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}-\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}+\frac {\operatorname {dilog}\left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}+\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}\right )}{d}\right )}{2}}{b d}\) | \(320\) |
default | \(-\frac {-\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (i d -d \cot \left (b x +a \right )\right )}{2}+\frac {i \operatorname {arccoth}\left (1-i d -d \cot \left (b x +a \right )\right ) d \ln \left (-i d -d \cot \left (b x +a \right )\right )}{2}-\frac {d^{2} \left (-\frac {i \left (-\frac {\operatorname {dilog}\left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}-\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right ) \ln \left (1-\frac {i d}{2}-\frac {d \cot \left (b x +a \right )}{2}\right )}{2}+\frac {\ln \left (-i d -d \cot \left (b x +a \right )\right )^{2}}{4}\right )}{d}+\frac {i \left (-\frac {\operatorname {dilog}\left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}-\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (i d -d \cot \left (b x +a \right )-i \left (2 i+2 d \right )\right )}{2 i+2 d}\right )}{2}+\frac {\operatorname {dilog}\left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}+\frac {\ln \left (i d -d \cot \left (b x +a \right )\right ) \ln \left (\frac {i \left (-i d -d \cot \left (b x +a \right )\right )}{2 d}\right )}{2}\right )}{d}\right )}{2}}{b d}\) | \(320\) |
risch | \(\text {Expression too large to display}\) | \(1618\) |
-1/b/d*(-1/2*I*arccoth(1-I*d-d*cot(b*x+a))*d*ln(I*d-d*cot(b*x+a))+1/2*I*ar ccoth(1-I*d-d*cot(b*x+a))*d*ln(-I*d-d*cot(b*x+a))-1/2*d^2*(-I/d*(-1/2*dilo g(1-1/2*I*d-1/2*d*cot(b*x+a))-1/2*ln(-I*d-d*cot(b*x+a))*ln(1-1/2*I*d-1/2*d *cot(b*x+a))+1/4*ln(-I*d-d*cot(b*x+a))^2)+I/d*(-1/2*dilog(I*(I*d-d*cot(b*x +a)-I*(2*I+2*d))/(2*I+2*d))-1/2*ln(I*d-d*cot(b*x+a))*ln(I*(I*d-d*cot(b*x+a )-I*(2*I+2*d))/(2*I+2*d))+1/2*dilog(1/2*I*(-I*d-d*cot(b*x+a))/d)+1/2*ln(I* d-d*cot(b*x+a))*ln(1/2*I*(-I*d-d*cot(b*x+a))/d))))
Time = 0.26 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.29 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\frac {2 i \, b^{2} x^{2} - 2 \, b x \log \left (\frac {d e^{\left (2 i \, b x + 2 i \, a\right )}}{{\left (d + i\right )} e^{\left (2 i \, b x + 2 i \, a\right )} - i}\right ) - 2 i \, a^{2} - 2 \, {\left (b x + a\right )} \log \left ({\left (i \, d - 1\right )} e^{\left (2 i \, b x + 2 i \, a\right )} + 1\right ) + 2 \, a \log \left (\frac {{\left (d + i\right )} e^{\left (2 i \, b x + 2 i \, a\right )} - i}{d + i}\right ) + i \, {\rm Li}_2\left (-{\left (i \, d - 1\right )} e^{\left (2 i \, b x + 2 i \, a\right )}\right )}{4 \, b} \]
1/4*(2*I*b^2*x^2 - 2*b*x*log(d*e^(2*I*b*x + 2*I*a)/((d + I)*e^(2*I*b*x + 2 *I*a) - I)) - 2*I*a^2 - 2*(b*x + a)*log((I*d - 1)*e^(2*I*b*x + 2*I*a) + 1) + 2*a*log(((d + I)*e^(2*I*b*x + 2*I*a) - I)/(d + I)) + I*dilog(-(I*d - 1) *e^(2*I*b*x + 2*I*a)))/b
\[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=- \int \operatorname {acoth}{\left (d \cot {\left (a + b x \right )} + i d - 1 \right )}\, dx \]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (67) = 134\).
Time = 0.31 (sec) , antiderivative size = 288, normalized size of antiderivative = 3.06 \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=-\frac {4 \, {\left (b x + a\right )} d {\left (\frac {\log \left ({\left (i \, d - 2\right )} \tan \left (b x + a\right ) + d\right )}{d} - \frac {\log \left (i \, \tan \left (b x + a\right ) + 1\right )}{d}\right )} - d {\left (\frac {2 i \, {\left (\log \left ({\left (i \, d - 2\right )} \tan \left (b x + a\right ) + d\right ) \log \left (\frac {{\left (d + 2 i\right )} \tan \left (b x + a\right ) - i \, d}{2 i \, d - 2} + 1\right ) + {\rm Li}_2\left (-\frac {{\left (d + 2 i\right )} \tan \left (b x + a\right ) - i \, d}{2 i \, d - 2}\right )\right )}}{d} + \frac {2 i \, {\left (\log \left (-\frac {1}{2} \, {\left (d + 2 i\right )} \tan \left (b x + a\right ) + \frac {1}{2} i \, d\right ) \log \left (i \, \tan \left (b x + a\right ) + 1\right ) + {\rm Li}_2\left (\frac {1}{2} \, {\left (d + 2 i\right )} \tan \left (b x + a\right ) - \frac {1}{2} i \, d + 1\right )\right )}}{d} - \frac {2 i \, \log \left ({\left (i \, d - 2\right )} \tan \left (b x + a\right ) + d\right ) \log \left (i \, \tan \left (b x + a\right ) + 1\right ) - i \, \log \left (i \, \tan \left (b x + a\right ) + 1\right )^{2}}{d} - \frac {2 i \, {\left (\log \left (i \, \tan \left (b x + a\right ) + 1\right ) \log \left (-\frac {1}{2} i \, \tan \left (b x + a\right ) + \frac {1}{2}\right ) + {\rm Li}_2\left (\frac {1}{2} i \, \tan \left (b x + a\right ) + \frac {1}{2}\right )\right )}}{d}\right )} + 8 \, {\left (b x + a\right )} \operatorname {arcoth}\left (i \, d + \frac {d}{\tan \left (b x + a\right )} - 1\right )}{8 \, b} \]
-1/8*(4*(b*x + a)*d*(log((I*d - 2)*tan(b*x + a) + d)/d - log(I*tan(b*x + a ) + 1)/d) - d*(2*I*(log((I*d - 2)*tan(b*x + a) + d)*log(((d + 2*I)*tan(b*x + a) - I*d)/(2*I*d - 2) + 1) + dilog(-((d + 2*I)*tan(b*x + a) - I*d)/(2*I *d - 2)))/d + 2*I*(log(-1/2*(d + 2*I)*tan(b*x + a) + 1/2*I*d)*log(I*tan(b* x + a) + 1) + dilog(1/2*(d + 2*I)*tan(b*x + a) - 1/2*I*d + 1))/d - (2*I*lo g((I*d - 2)*tan(b*x + a) + d)*log(I*tan(b*x + a) + 1) - I*log(I*tan(b*x + a) + 1)^2)/d - 2*I*(log(I*tan(b*x + a) + 1)*log(-1/2*I*tan(b*x + a) + 1/2) + dilog(1/2*I*tan(b*x + a) + 1/2))/d) + 8*(b*x + a)*arccoth(I*d + d/tan(b *x + a) - 1))/b
\[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\int { \operatorname {arcoth}\left (-d \cot \left (b x + a\right ) - i \, d + 1\right ) \,d x } \]
Timed out. \[ \int \coth ^{-1}(1-i d-d \cot (a+b x)) \, dx=\int -\mathrm {acoth}\left (d\,\mathrm {cot}\left (a+b\,x\right )-1+d\,1{}\mathrm {i}\right ) \,d x \]