Integrand size = 11, antiderivative size = 194 \[ \int \text {arctanh}(c+d \cot (a+b x)) \, dx=x \text {arctanh}(c+d \cot (a+b x))+\frac {1}{2} x \log \left (1-\frac {(1-c-i d) e^{2 i a+2 i b x}}{1-c+i d}\right )-\frac {1}{2} x \log \left (1-\frac {(1+c+i d) e^{2 i a+2 i b x}}{1+c-i d}\right )-\frac {i \operatorname {PolyLog}\left (2,\frac {(1-c-i d) e^{2 i a+2 i b x}}{1-c+i d}\right )}{4 b}+\frac {i \operatorname {PolyLog}\left (2,\frac {(1+c+i d) e^{2 i a+2 i b x}}{1+c-i d}\right )}{4 b} \]
x*arctanh(c+d*cot(b*x+a))+1/2*x*ln(1-(1-c-I*d)*exp(2*I*a+2*I*b*x)/(1-c+I*d ))-1/2*x*ln(1-(1+c+I*d)*exp(2*I*a+2*I*b*x)/(1+c-I*d))-1/4*I*polylog(2,(1-c -I*d)*exp(2*I*a+2*I*b*x)/(1-c+I*d))/b+1/4*I*polylog(2,(1+c+I*d)*exp(2*I*a+ 2*I*b*x)/(1+c-I*d))/b
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(390\) vs. \(2(194)=388\).
Time = 3.95 (sec) , antiderivative size = 390, normalized size of antiderivative = 2.01 \[ \int \text {arctanh}(c+d \cot (a+b x)) \, dx=x \left (\text {arctanh}(c+d \cot (a+b x))+\frac {2 a \log (d+(-1+c) \tan (a+b x))+i \log (1+i \tan (a+b x)) \log \left (-\frac {i (d+(-1+c) \tan (a+b x))}{-1+c-i d}\right )-i \log (1-i \tan (a+b x)) \log \left (\frac {i (d+(-1+c) \tan (a+b x))}{-1+c+i d}\right )-2 a \log (d+(1+c) \tan (a+b x))+i \log (1-i \tan (a+b x)) \log \left (\frac {i (d+(1+c) \tan (a+b x))}{1+c+i d}\right )-i \log (1+i \tan (a+b x)) \log \left (\frac {d+(1+c) \tan (a+b x)}{i (1+c)+d}\right )-i \operatorname {PolyLog}\left (2,\frac {(-1+c) (1-i \tan (a+b x))}{-1+c+i d}\right )+i \operatorname {PolyLog}\left (2,\frac {(1+c) (1-i \tan (a+b x))}{1+c+i d}\right )+i \operatorname {PolyLog}\left (2,\frac {(-1+c) (1+i \tan (a+b x))}{-1+c-i d}\right )-i \operatorname {PolyLog}\left (2,\frac {(1+c) (1+i \tan (a+b x))}{1+c-i d}\right )}{4 a-2 i \log (1-i \tan (a+b x))+2 i \log (1+i \tan (a+b x))}\right ) \]
x*(ArcTanh[c + d*Cot[a + b*x]] + (2*a*Log[d + (-1 + c)*Tan[a + b*x]] + I*L og[1 + I*Tan[a + b*x]]*Log[((-I)*(d + (-1 + c)*Tan[a + b*x]))/(-1 + c - I* d)] - I*Log[1 - I*Tan[a + b*x]]*Log[(I*(d + (-1 + c)*Tan[a + b*x]))/(-1 + c + I*d)] - 2*a*Log[d + (1 + c)*Tan[a + b*x]] + I*Log[1 - I*Tan[a + b*x]]* Log[(I*(d + (1 + c)*Tan[a + b*x]))/(1 + c + I*d)] - I*Log[1 + I*Tan[a + b* x]]*Log[(d + (1 + c)*Tan[a + b*x])/(I*(1 + c) + d)] - I*PolyLog[2, ((-1 + c)*(1 - I*Tan[a + b*x]))/(-1 + c + I*d)] + I*PolyLog[2, ((1 + c)*(1 - I*Ta n[a + b*x]))/(1 + c + I*d)] + I*PolyLog[2, ((-1 + c)*(1 + I*Tan[a + b*x])) /(-1 + c - I*d)] - I*PolyLog[2, ((1 + c)*(1 + I*Tan[a + b*x]))/(1 + c - I* d)])/(4*a - (2*I)*Log[1 - I*Tan[a + b*x]] + (2*I)*Log[1 + I*Tan[a + b*x]]) )
Time = 0.69 (sec) , antiderivative size = 283, normalized size of antiderivative = 1.46, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {6815, 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 \text {arctanh}(d \cot (a+b x)+c) \, dx\) |
\(\Big \downarrow \) 6815 |
\(\displaystyle -b (-i c+d+i) \int \frac {e^{2 i a+2 i b x} x}{-c-(-c-i d+1) e^{2 i a+2 i b x}+i d+1}dx+b (-d+i (c+1)) \int \frac {e^{2 i a+2 i b x} x}{c-(c+i d+1) e^{2 i a+2 i b x}-i d+1}dx+x \text {arctanh}(d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle -b (-i c+d+i) \left (\frac {\int \log \left (1-\frac {(-c-i d+1) e^{2 i a+2 i b x}}{-c+i d+1}\right )dx}{2 b (d+i (1-c))}-\frac {x \log \left (1-\frac {(-c-i d+1) e^{2 i a+2 i b x}}{-c+i d+1}\right )}{2 b (d+i (1-c))}\right )+b (-d+i (c+1)) \left (\frac {\int \log \left (1-\frac {(c+i d+1) e^{2 i a+2 i b x}}{c-i d+1}\right )dx}{2 (-b d+i (b c+b))}-\frac {x \log \left (1-\frac {(c+i d+1) e^{2 i a+2 i b x}}{c-i d+1}\right )}{2 (-b d+i (b c+b))}\right )+x \text {arctanh}(d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle -b (-i c+d+i) \left (-\frac {i \int e^{-2 i a-2 i b x} \log \left (1-\frac {(-c-i d+1) e^{2 i a+2 i b x}}{-c+i d+1}\right )de^{2 i a+2 i b x}}{4 b^2 (d+i (1-c))}-\frac {x \log \left (1-\frac {(-c-i d+1) e^{2 i a+2 i b x}}{-c+i d+1}\right )}{2 b (d+i (1-c))}\right )+b (-d+i (c+1)) \left (-\frac {i \int e^{-2 i a-2 i b x} \log \left (1-\frac {(c+i d+1) e^{2 i a+2 i b x}}{c-i d+1}\right )de^{2 i a+2 i b x}}{4 b (-b d+i (b c+b))}-\frac {x \log \left (1-\frac {(c+i d+1) e^{2 i a+2 i b x}}{c-i d+1}\right )}{2 (-b d+i (b c+b))}\right )+x \text {arctanh}(d \cot (a+b x)+c)\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle x \text {arctanh}(d \cot (a+b x)+c)-b (-i c+d+i) \left (\frac {i \operatorname {PolyLog}\left (2,\frac {(-c-i d+1) e^{2 i a+2 i b x}}{-c+i d+1}\right )}{4 b^2 (d+i (1-c))}-\frac {x \log \left (1-\frac {(-c-i d+1) e^{2 i a+2 i b x}}{-c+i d+1}\right )}{2 b (d+i (1-c))}\right )+b (-d+i (c+1)) \left (\frac {i \operatorname {PolyLog}\left (2,\frac {(c+i d+1) e^{2 i a+2 i b x}}{c-i d+1}\right )}{4 b (-b d+i (b c+b))}-\frac {x \log \left (1-\frac {(c+i d+1) e^{2 i a+2 i b x}}{c-i d+1}\right )}{2 (-b d+i (b c+b))}\right )\) |
x*ArcTanh[c + d*Cot[a + b*x]] - b*(I - I*c + d)*(-1/2*(x*Log[1 - ((1 - c - I*d)*E^((2*I)*a + (2*I)*b*x))/(1 - c + I*d)])/(b*(I*(1 - c) + d)) + ((I/4 )*PolyLog[2, ((1 - c - I*d)*E^((2*I)*a + (2*I)*b*x))/(1 - c + I*d)])/(b^2* (I*(1 - c) + d))) + b*(I*(1 + c) - d)*(-1/2*(x*Log[1 - ((1 + c + I*d)*E^(( 2*I)*a + (2*I)*b*x))/(1 + c - I*d)])/(I*(b + b*c) - b*d) + ((I/4)*PolyLog[ 2, ((1 + c + I*d)*E^((2*I)*a + (2*I)*b*x))/(1 + c - I*d)])/(b*(I*(b + b*c) - b*d)))
3.4.36.3.1 Defintions of rubi rules used
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[ArcTanh[(c_.) + Cot[(a_.) + (b_.)*(x_)]*(d_.)], x_Symbol] :> Simp[x*Arc Tanh[c + d*Cot[a + b*x]], x] + (-Simp[I*b*(1 - c - I*d) Int[x*(E^(2*I*a + 2*I*b*x)/(1 - c + I*d - (1 - c - I*d)*E^(2*I*a + 2*I*b*x))), x], x] + Simp [I*b*(1 + c + I*d) Int[x*(E^(2*I*a + 2*I*b*x)/(1 + c - I*d - (1 + c + I*d )*E^(2*I*a + 2*I*b*x))), x], x]) /; FreeQ[{a, b, c, d}, x] && NeQ[(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. 562 vs. \(2 (164 ) = 328\).
Time = 2.41 (sec) , antiderivative size = 563, normalized size of antiderivative = 2.90
method | result | size |
derivativedivides | \(\frac {-d \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \operatorname {arctanh}\left (c +d \cot \left (b x +a \right )\right )+d^{2} \left (-\frac {\arctan \left (-\frac {c +d \cot \left (b x +a \right )}{d}+\frac {c}{d}\right ) \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c +1\right )}{2 d}+\frac {\arctan \left (-\frac {c +d \cot \left (b x +a \right )}{d}+\frac {c}{d}\right ) \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c -1\right )}{2 d}+\frac {i \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c +1\right ) \left (\ln \left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c +1}\right )-\ln \left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c -1}\right )\right )}{4 d}+\frac {i \left (\operatorname {dilog}\left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c +1}\right )-\operatorname {dilog}\left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c -1}\right )\right )}{4 d}-\frac {i \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c -1\right ) \left (\ln \left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c -1}\right )-\ln \left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c +1}\right )\right )}{4 d}-\frac {i \left (\operatorname {dilog}\left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c -1}\right )-\operatorname {dilog}\left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c +1}\right )\right )}{4 d}\right )}{b d}\) | \(563\) |
default | \(\frac {-d \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )\right ) \operatorname {arctanh}\left (c +d \cot \left (b x +a \right )\right )+d^{2} \left (-\frac {\arctan \left (-\frac {c +d \cot \left (b x +a \right )}{d}+\frac {c}{d}\right ) \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c +1\right )}{2 d}+\frac {\arctan \left (-\frac {c +d \cot \left (b x +a \right )}{d}+\frac {c}{d}\right ) \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c -1\right )}{2 d}+\frac {i \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c +1\right ) \left (\ln \left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c +1}\right )-\ln \left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c -1}\right )\right )}{4 d}+\frac {i \left (\operatorname {dilog}\left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c +1}\right )-\operatorname {dilog}\left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c -1}\right )\right )}{4 d}-\frac {i \ln \left (d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )+c -1\right ) \left (\ln \left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c -1}\right )-\ln \left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c +1}\right )\right )}{4 d}-\frac {i \left (\operatorname {dilog}\left (\frac {i d -d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d +c -1}\right )-\operatorname {dilog}\left (\frac {i d +d \left (\frac {c +d \cot \left (b x +a \right )}{d}-\frac {c}{d}\right )}{i d -c +1}\right )\right )}{4 d}\right )}{b d}\) | \(563\) |
risch | \(\text {Expression too large to display}\) | \(3982\) |
1/b/d*(-d*(1/2*Pi-arccot(cot(b*x+a)))*arctanh(c+d*cot(b*x+a))+d^2*(-1/2*ar ctan(-(c+d*cot(b*x+a))/d+c/d)/d*ln(d*((c+d*cot(b*x+a))/d-c/d)+c+1)+1/2*arc tan(-(c+d*cot(b*x+a))/d+c/d)/d*ln(d*((c+d*cot(b*x+a))/d-c/d)+c-1)+1/4*I*ln (d*((c+d*cot(b*x+a))/d-c/d)+c+1)*(ln((I*d-d*((c+d*cot(b*x+a))/d-c/d))/(1+c +I*d))-ln((I*d+d*((c+d*cot(b*x+a))/d-c/d))/(I*d-c-1)))/d+1/4*I*(dilog((I*d -d*((c+d*cot(b*x+a))/d-c/d))/(1+c+I*d))-dilog((I*d+d*((c+d*cot(b*x+a))/d-c /d))/(I*d-c-1)))/d-1/4*I*ln(d*((c+d*cot(b*x+a))/d-c/d)+c-1)*(ln((I*d-d*((c +d*cot(b*x+a))/d-c/d))/(I*d+c-1))-ln((I*d+d*((c+d*cot(b*x+a))/d-c/d))/(1-c +I*d)))/d-1/4*I*(dilog((I*d-d*((c+d*cot(b*x+a))/d-c/d))/(I*d+c-1))-dilog(( I*d+d*((c+d*cot(b*x+a))/d-c/d))/(1-c+I*d)))/d))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1099 vs. \(2 (136) = 272\).
Time = 0.38 (sec) , antiderivative size = 1099, normalized size of antiderivative = 5.66 \[ \int \text {arctanh}(c+d \cot (a+b x)) \, dx=\text {Too large to display} \]
1/8*(4*b*x*log(-(d*cos(2*b*x + 2*a) + (c + 1)*sin(2*b*x + 2*a) + d)/(d*cos (2*b*x + 2*a) + (c - 1)*sin(2*b*x + 2*a) + d)) + 2*a*log(1/2*c^2 + I*(c + 1)*d - 1/2*d^2 - 1/2*(c^2 + d^2 + 2*c + 1)*cos(2*b*x + 2*a) + 1/2*(I*c^2 + I*d^2 + 2*I*c + I)*sin(2*b*x + 2*a) + c + 1/2) - 2*a*log(1/2*c^2 + I*(c - 1)*d - 1/2*d^2 - 1/2*(c^2 + d^2 - 2*c + 1)*cos(2*b*x + 2*a) + 1/2*(I*c^2 + I*d^2 - 2*I*c + I)*sin(2*b*x + 2*a) - c + 1/2) + 2*a*log(-1/2*c^2 + I*(c + 1)*d + 1/2*d^2 + 1/2*(c^2 + d^2 + 2*c + 1)*cos(2*b*x + 2*a) + 1/2*(I*c^ 2 + I*d^2 + 2*I*c + I)*sin(2*b*x + 2*a) - c - 1/2) - 2*a*log(-1/2*c^2 + I* (c - 1)*d + 1/2*d^2 + 1/2*(c^2 + d^2 - 2*c + 1)*cos(2*b*x + 2*a) + 1/2*(I* c^2 + I*d^2 - 2*I*c + I)*sin(2*b*x + 2*a) + c - 1/2) - 2*(b*x + a)*log((c^ 2 + d^2 - (c^2 + 2*I*(c + 1)*d - d^2 + 2*c + 1)*cos(2*b*x + 2*a) + (-I*c^2 + 2*(c + 1)*d + I*d^2 - 2*I*c - I)*sin(2*b*x + 2*a) + 2*c + 1)/(c^2 + d^2 + 2*c + 1)) - 2*(b*x + a)*log((c^2 + d^2 - (c^2 - 2*I*(c + 1)*d - d^2 + 2 *c + 1)*cos(2*b*x + 2*a) + (I*c^2 + 2*(c + 1)*d - I*d^2 + 2*I*c + I)*sin(2 *b*x + 2*a) + 2*c + 1)/(c^2 + d^2 + 2*c + 1)) + 2*(b*x + a)*log((c^2 + d^2 - (c^2 + 2*I*(c - 1)*d - d^2 - 2*c + 1)*cos(2*b*x + 2*a) + (-I*c^2 + 2*(c - 1)*d + I*d^2 + 2*I*c - I)*sin(2*b*x + 2*a) - 2*c + 1)/(c^2 + d^2 - 2*c + 1)) + 2*(b*x + a)*log((c^2 + d^2 - (c^2 - 2*I*(c - 1)*d - d^2 - 2*c + 1) *cos(2*b*x + 2*a) + (I*c^2 + 2*(c - 1)*d - I*d^2 - 2*I*c + I)*sin(2*b*x + 2*a) - 2*c + 1)/(c^2 + d^2 - 2*c + 1)) + I*dilog(-(c^2 + d^2 - (c^2 + 2...
\[ \int \text {arctanh}(c+d \cot (a+b x)) \, dx=\int \operatorname {atanh}{\left (c + d \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. 392 vs. \(2 (136) = 272\).
Time = 0.37 (sec) , antiderivative size = 392, normalized size of antiderivative = 2.02 \[ \int \text {arctanh}(c+d \cot (a+b x)) \, dx=\frac {4 \, {\left (b x + a\right )} \operatorname {artanh}\left (c + \frac {d}{\tan \left (b x + a\right )}\right ) + {\left (\arctan \left (\frac {{\left (c + 1\right )} d + {\left (c^{2} + 2 \, c + 1\right )} \tan \left (b x + a\right )}{c^{2} + d^{2} + 2 \, c + 1}, \frac {{\left (c + 1\right )} d \tan \left (b x + a\right ) + d^{2}}{c^{2} + d^{2} + 2 \, c + 1}\right ) - \arctan \left (\frac {{\left (c - 1\right )} d + {\left (c^{2} - 2 \, c + 1\right )} \tan \left (b x + a\right )}{c^{2} + d^{2} - 2 \, c + 1}, \frac {{\left (c - 1\right )} d \tan \left (b x + a\right ) + d^{2}}{c^{2} + d^{2} - 2 \, c + 1}\right )\right )} \log \left (\tan \left (b x + a\right )^{2} + 1\right ) - {\left (b x + a\right )} \log \left (\frac {2 \, {\left (c + 1\right )} d \tan \left (b x + a\right ) + {\left (c^{2} + 2 \, c + 1\right )} \tan \left (b x + a\right )^{2} + d^{2}}{c^{2} + d^{2} + 2 \, c + 1}\right ) + {\left (b x + a\right )} \log \left (\frac {2 \, {\left (c - 1\right )} d \tan \left (b x + a\right ) + {\left (c^{2} - 2 \, c + 1\right )} \tan \left (b x + a\right )^{2} + d^{2}}{c^{2} + d^{2} - 2 \, c + 1}\right ) + i \, {\rm Li}_2\left (-\frac {{\left (c + 1\right )} \tan \left (b x + a\right ) - i \, c - i}{i \, c + d + i}\right ) - i \, {\rm Li}_2\left (-\frac {{\left (c - 1\right )} \tan \left (b x + a\right ) - i \, c + i}{i \, c + d - i}\right ) + i \, {\rm Li}_2\left (-\frac {{\left (c - 1\right )} \tan \left (b x + a\right ) + i \, c - i}{-i \, c + d + i}\right ) - i \, {\rm Li}_2\left (-\frac {{\left (c + 1\right )} \tan \left (b x + a\right ) + i \, c + i}{-i \, c + d - i}\right )}{4 \, b} \]
1/4*(4*(b*x + a)*arctanh(c + d/tan(b*x + a)) + (arctan2(((c + 1)*d + (c^2 + 2*c + 1)*tan(b*x + a))/(c^2 + d^2 + 2*c + 1), ((c + 1)*d*tan(b*x + a) + d^2)/(c^2 + d^2 + 2*c + 1)) - arctan2(((c - 1)*d + (c^2 - 2*c + 1)*tan(b*x + a))/(c^2 + d^2 - 2*c + 1), ((c - 1)*d*tan(b*x + a) + d^2)/(c^2 + d^2 - 2*c + 1)))*log(tan(b*x + a)^2 + 1) - (b*x + a)*log((2*(c + 1)*d*tan(b*x + a) + (c^2 + 2*c + 1)*tan(b*x + a)^2 + d^2)/(c^2 + d^2 + 2*c + 1)) + (b*x + a)*log((2*(c - 1)*d*tan(b*x + a) + (c^2 - 2*c + 1)*tan(b*x + a)^2 + d^2)/ (c^2 + d^2 - 2*c + 1)) + I*dilog(-((c + 1)*tan(b*x + a) - I*c - I)/(I*c + d + I)) - I*dilog(-((c - 1)*tan(b*x + a) - I*c + I)/(I*c + d - I)) + I*dil og(-((c - 1)*tan(b*x + a) + I*c - I)/(-I*c + d + I)) - I*dilog(-((c + 1)*t an(b*x + a) + I*c + I)/(-I*c + d - I)))/b
\[ \int \text {arctanh}(c+d \cot (a+b x)) \, dx=\int { \operatorname {artanh}\left (d \cot \left (b x + a\right ) + c\right ) \,d x } \]
Timed out. \[ \int \text {arctanh}(c+d \cot (a+b x)) \, dx=\int \mathrm {atanh}\left (c+d\,\mathrm {cot}\left (a+b\,x\right )\right ) \,d x \]