Integrand size = 7, antiderivative size = 79 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=x \coth ^{-1}(\cot (a+b x))+i x \arctan \left (e^{2 i (a+b x)}\right )-\frac {i \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b} \]
x*arccoth(cot(b*x+a))+I*x*arctan(exp(2*I*(b*x+a)))-1/4*I*polylog(2,-I*exp( 2*I*(b*x+a)))/b+1/4*I*polylog(2,I*exp(2*I*(b*x+a)))/b
Time = 0.02 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.61 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=x \coth ^{-1}(\cot (a+b x))-\frac {(-4 a+\pi -4 b x) \left (\log \left (1-i e^{-2 i (a+b x)}\right )-\log \left (1+i e^{-2 i (a+b x)}\right )\right )-(-4 a+\pi ) \log \left (\cot \left (a+\frac {\pi }{4}+b x\right )\right )+2 i \left (\operatorname {PolyLog}\left (2,-i e^{-2 i (a+b x)}\right )-\operatorname {PolyLog}\left (2,i e^{-2 i (a+b x)}\right )\right )}{8 b} \]
x*ArcCoth[Cot[a + b*x]] - ((-4*a + Pi - 4*b*x)*(Log[1 - I/E^((2*I)*(a + b* x))] - Log[1 + I/E^((2*I)*(a + b*x))]) - (-4*a + Pi)*Log[Cot[a + Pi/4 + b* x]] + (2*I)*(PolyLog[2, (-I)/E^((2*I)*(a + b*x))] - PolyLog[2, I/E^((2*I)* (a + b*x))]))/(8*b)
Time = 0.35 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.09, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.714, Rules used = {6804, 3042, 4669, 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}(\cot (a+b x)) \, dx\) |
\(\Big \downarrow \) 6804 |
\(\displaystyle x \coth ^{-1}(\cot (a+b x))-b \int x \sec (2 a+2 b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle x \coth ^{-1}(\cot (a+b x))-b \int x \csc \left (2 a+2 b x+\frac {\pi }{2}\right )dx\) |
\(\Big \downarrow \) 4669 |
\(\displaystyle x \coth ^{-1}(\cot (a+b x))-b \left (-\frac {\int \log \left (1-i e^{2 i (a+b x)}\right )dx}{2 b}+\frac {\int \log \left (1+i e^{2 i (a+b x)}\right )dx}{2 b}-\frac {i x \arctan \left (e^{2 i (a+b x)}\right )}{b}\right )\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle x \coth ^{-1}(\cot (a+b x))-b \left (\frac {i \int e^{-2 i (a+b x)} \log \left (1-i e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}-\frac {i \int e^{-2 i (a+b x)} \log \left (1+i e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}-\frac {i x \arctan \left (e^{2 i (a+b x)}\right )}{b}\right )\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle x \coth ^{-1}(\cot (a+b x))-b \left (-\frac {i x \arctan \left (e^{2 i (a+b x)}\right )}{b}+\frac {i \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b^2}-\frac {i \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b^2}\right )\) |
x*ArcCoth[Cot[a + b*x]] - b*(((-I)*x*ArcTan[E^((2*I)*(a + b*x))])/b + ((I/ 4)*PolyLog[2, (-I)*E^((2*I)*(a + b*x))])/b^2 - ((I/4)*PolyLog[2, I*E^((2*I )*(a + b*x))])/b^2)
3.3.51.3.1 Defintions of rubi rules used
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[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol ] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^(I*k*Pi)*E^(I*(e + f*x))]/f), x] + (-Si mp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x ))], x], x]) /; FreeQ[{c, d, e, f}, x] && IntegerQ[2*k] && IGtQ[m, 0]
Int[ArcCoth[Cot[(a_.) + (b_.)*(x_)]], x_Symbol] :> Simp[x*ArcCoth[Cot[a + b *x]], x] - Simp[b Int[x*Sec[2*a + 2*b*x], x], x] /; FreeQ[{a, b}, x]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (64 ) = 128\).
Time = 1.43 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.38
method | result | size |
derivativedivides | \(\frac {-\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \operatorname {arccoth}\left (\cot \left (b x +a \right )\right )-\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {i \operatorname {dilog}\left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}-\frac {i \operatorname {dilog}\left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}}{b}\) | \(188\) |
default | \(\frac {-\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \operatorname {arccoth}\left (\cot \left (b x +a \right )\right )-\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {\left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \ln \left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{2}+\frac {i \operatorname {dilog}\left (1+\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}-\frac {i \operatorname {dilog}\left (1-\frac {i \left (1+i \cot \left (b x +a \right )\right )^{2}}{\cot \left (b x +a \right )^{2}+1}\right )}{4}}{b}\) | \(188\) |
risch | \(\text {Expression too large to display}\) | \(1161\) |
1/b*(-(1/2*Pi-arccot(cot(b*x+a)))*arccoth(cot(b*x+a))-1/2*(1/2*Pi-arccot(c ot(b*x+a)))*ln(1+I*(1+I*cot(b*x+a))^2/(cot(b*x+a)^2+1))+1/2*(1/2*Pi-arccot (cot(b*x+a)))*ln(1-I*(1+I*cot(b*x+a))^2/(cot(b*x+a)^2+1))+1/4*I*dilog(1+I* (1+I*cot(b*x+a))^2/(cot(b*x+a)^2+1))-1/4*I*dilog(1-I*(1+I*cot(b*x+a))^2/(c ot(b*x+a)^2+1)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 388 vs. \(2 (57) = 114\).
Time = 0.29 (sec) , antiderivative size = 388, normalized size of antiderivative = 4.91 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\frac {4 \, b x \log \left (\frac {\cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right ) + 1}{\cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right ) + 1}\right ) + 2 \, a \log \left (\cos \left (2 \, b x + 2 \, a\right ) + i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) - 2 \, a \log \left (\cos \left (2 \, b x + 2 \, a\right ) - i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) - 2 \, {\left (b x + a\right )} \log \left (i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, {\left (b x + a\right )} \log \left (i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) - 2 \, {\left (b x + a\right )} \log \left (-i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, {\left (b x + a\right )} \log \left (-i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, a \log \left (-\cos \left (2 \, b x + 2 \, a\right ) + i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) - 2 \, a \log \left (-\cos \left (2 \, b x + 2 \, a\right ) - i \, \sin \left (2 \, b x + 2 \, a\right ) + i\right ) + i \, {\rm Li}_2\left (i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right ) + i \, {\rm Li}_2\left (i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right )\right ) - i \, {\rm Li}_2\left (-i \, \cos \left (2 \, b x + 2 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right ) - i \, {\rm Li}_2\left (-i \, \cos \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right )\right )}{8 \, b} \]
1/8*(4*b*x*log((cos(2*b*x + 2*a) + sin(2*b*x + 2*a) + 1)/(cos(2*b*x + 2*a) - sin(2*b*x + 2*a) + 1)) + 2*a*log(cos(2*b*x + 2*a) + I*sin(2*b*x + 2*a) + I) - 2*a*log(cos(2*b*x + 2*a) - I*sin(2*b*x + 2*a) + I) - 2*(b*x + a)*lo g(I*cos(2*b*x + 2*a) + sin(2*b*x + 2*a) + 1) + 2*(b*x + a)*log(I*cos(2*b*x + 2*a) - sin(2*b*x + 2*a) + 1) - 2*(b*x + a)*log(-I*cos(2*b*x + 2*a) + si n(2*b*x + 2*a) + 1) + 2*(b*x + a)*log(-I*cos(2*b*x + 2*a) - sin(2*b*x + 2* a) + 1) + 2*a*log(-cos(2*b*x + 2*a) + I*sin(2*b*x + 2*a) + I) - 2*a*log(-c os(2*b*x + 2*a) - I*sin(2*b*x + 2*a) + I) + I*dilog(I*cos(2*b*x + 2*a) + s in(2*b*x + 2*a)) + I*dilog(I*cos(2*b*x + 2*a) - sin(2*b*x + 2*a)) - I*dilo g(-I*cos(2*b*x + 2*a) + sin(2*b*x + 2*a)) - I*dilog(-I*cos(2*b*x + 2*a) - sin(2*b*x + 2*a)))/b
\[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\int \operatorname {acoth}{\left (\cot {\left (a + b x \right )} \right )}\, dx \]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (57) = 114\).
Time = 0.33 (sec) , antiderivative size = 184, normalized size of antiderivative = 2.33 \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\frac {4 \, {\left (b x + a\right )} \operatorname {arcoth}\left (\frac {1}{\tan \left (b x + a\right )}\right ) + {\left (\arctan \left (\frac {1}{2} \, \tan \left (b x + a\right ) + \frac {1}{2}, \frac {1}{2} \, \tan \left (b x + a\right ) + \frac {1}{2}\right ) - \arctan \left (\frac {1}{2} \, \tan \left (b x + a\right ) - \frac {1}{2}, -\frac {1}{2} \, \tan \left (b x + a\right ) + \frac {1}{2}\right )\right )} \log \left (\tan \left (b x + a\right )^{2} + 1\right ) - {\left (b x + a\right )} \log \left (\frac {1}{2} \, \tan \left (b x + a\right )^{2} + \tan \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b x + a\right )} \log \left (\frac {1}{2} \, \tan \left (b x + a\right )^{2} - \tan \left (b x + a\right ) + \frac {1}{2}\right ) - i \, {\rm Li}_2\left (\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \tan \left (b x + a\right ) - \frac {1}{2} i + \frac {1}{2}\right ) + i \, {\rm Li}_2\left (-\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \tan \left (b x + a\right ) + \frac {1}{2} i + \frac {1}{2}\right ) + i \, {\rm Li}_2\left (\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \tan \left (b x + a\right ) + \frac {1}{2} i + \frac {1}{2}\right ) - i \, {\rm Li}_2\left (-\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \tan \left (b x + a\right ) - \frac {1}{2} i + \frac {1}{2}\right )}{4 \, b} \]
1/4*(4*(b*x + a)*arccoth(1/tan(b*x + a)) + (arctan2(1/2*tan(b*x + a) + 1/2 , 1/2*tan(b*x + a) + 1/2) - arctan2(1/2*tan(b*x + a) - 1/2, -1/2*tan(b*x + a) + 1/2))*log(tan(b*x + a)^2 + 1) - (b*x + a)*log(1/2*tan(b*x + a)^2 + t an(b*x + a) + 1/2) + (b*x + a)*log(1/2*tan(b*x + a)^2 - tan(b*x + a) + 1/2 ) - I*dilog((1/2*I + 1/2)*tan(b*x + a) - 1/2*I + 1/2) + I*dilog(-(1/2*I - 1/2)*tan(b*x + a) + 1/2*I + 1/2) + I*dilog((1/2*I - 1/2)*tan(b*x + a) + 1/ 2*I + 1/2) - I*dilog(-(1/2*I + 1/2)*tan(b*x + a) - 1/2*I + 1/2))/b
\[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\int { \operatorname {arcoth}\left (\cot \left (b x + a\right )\right ) \,d x } \]
Timed out. \[ \int \coth ^{-1}(\cot (a+b x)) \, dx=\int \mathrm {acoth}\left (\mathrm {cot}\left (a+b\,x\right )\right ) \,d x \]