3.4.30 \(\int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx\) [330]

3.4.30.1 Optimal result
3.4.30.2 Mathematica [A] (verified)
3.4.30.3 Rubi [A] (verified)
3.4.30.4 Maple [C] (warning: unable to verify)
3.4.30.5 Fricas [B] (verification not implemented)
3.4.30.6 Sympy [F]
3.4.30.7 Maxima [F]
3.4.30.8 Giac [F]
3.4.30.9 Mupad [F(-1)]

3.4.30.1 Optimal result

Integrand size = 15, antiderivative size = 234 \[ \int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx=\frac {i (e+f x)^3 \arctan \left (e^{2 i (a+b x)}\right )}{3 f}+\frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b}+\frac {f (e+f x) \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )}{4 b^2}-\frac {f (e+f x) \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )}{4 b^2}+\frac {i f^2 \operatorname {PolyLog}\left (4,-i e^{2 i (a+b x)}\right )}{8 b^3}-\frac {i f^2 \operatorname {PolyLog}\left (4,i e^{2 i (a+b x)}\right )}{8 b^3} \]

output
1/3*I*(f*x+e)^3*arctan(exp(2*I*(b*x+a)))/f+1/3*(f*x+e)^3*arctanh(cot(b*x+a 
))/f-1/4*I*(f*x+e)^2*polylog(2,-I*exp(2*I*(b*x+a)))/b+1/4*I*(f*x+e)^2*poly 
log(2,I*exp(2*I*(b*x+a)))/b+1/4*f*(f*x+e)*polylog(3,-I*exp(2*I*(b*x+a)))/b 
^2-1/4*f*(f*x+e)*polylog(3,I*exp(2*I*(b*x+a)))/b^2+1/8*I*f^2*polylog(4,-I* 
exp(2*I*(b*x+a)))/b^3-1/8*I*f^2*polylog(4,I*exp(2*I*(b*x+a)))/b^3
 
3.4.30.2 Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 409, normalized size of antiderivative = 1.75 \[ \int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx=\frac {1}{3} x \left (3 e^2+3 e f x+f^2 x^2\right ) \text {arctanh}(\cot (a+b x))+\frac {-12 b^3 e^2 x \log \left (1-i e^{2 i (a+b x)}\right )-12 b^3 e f x^2 \log \left (1-i e^{2 i (a+b x)}\right )-4 b^3 f^2 x^3 \log \left (1-i e^{2 i (a+b x)}\right )+12 b^3 e^2 x \log \left (1+i e^{2 i (a+b x)}\right )+12 b^3 e f x^2 \log \left (1+i e^{2 i (a+b x)}\right )+4 b^3 f^2 x^3 \log \left (1+i e^{2 i (a+b x)}\right )-6 i b^2 (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )+6 i b^2 (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )+6 b e f \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )+6 b f^2 x \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )-6 b e f \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )-6 b f^2 x \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )+3 i f^2 \operatorname {PolyLog}\left (4,-i e^{2 i (a+b x)}\right )-3 i f^2 \operatorname {PolyLog}\left (4,i e^{2 i (a+b x)}\right )}{24 b^3} \]

input
Integrate[(e + f*x)^2*ArcTanh[Cot[a + b*x]],x]
 
output
(x*(3*e^2 + 3*e*f*x + f^2*x^2)*ArcTanh[Cot[a + b*x]])/3 + (-12*b^3*e^2*x*L 
og[1 - I*E^((2*I)*(a + b*x))] - 12*b^3*e*f*x^2*Log[1 - I*E^((2*I)*(a + b*x 
))] - 4*b^3*f^2*x^3*Log[1 - I*E^((2*I)*(a + b*x))] + 12*b^3*e^2*x*Log[1 + 
I*E^((2*I)*(a + b*x))] + 12*b^3*e*f*x^2*Log[1 + I*E^((2*I)*(a + b*x))] + 4 
*b^3*f^2*x^3*Log[1 + I*E^((2*I)*(a + b*x))] - (6*I)*b^2*(e + f*x)^2*PolyLo 
g[2, (-I)*E^((2*I)*(a + b*x))] + (6*I)*b^2*(e + f*x)^2*PolyLog[2, I*E^((2* 
I)*(a + b*x))] + 6*b*e*f*PolyLog[3, (-I)*E^((2*I)*(a + b*x))] + 6*b*f^2*x* 
PolyLog[3, (-I)*E^((2*I)*(a + b*x))] - 6*b*e*f*PolyLog[3, I*E^((2*I)*(a + 
b*x))] - 6*b*f^2*x*PolyLog[3, I*E^((2*I)*(a + b*x))] + (3*I)*f^2*PolyLog[4 
, (-I)*E^((2*I)*(a + b*x))] - (3*I)*f^2*PolyLog[4, I*E^((2*I)*(a + b*x))]) 
/(24*b^3)
 
3.4.30.3 Rubi [A] (verified)

Time = 0.85 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.16, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {6807, 3042, 4669, 3011, 7163, 2720, 7143}

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 (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx\)

\(\Big \downarrow \) 6807

\(\displaystyle \frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {b \int (e+f x)^3 \sec (2 a+2 b x)dx}{3 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {b \int (e+f x)^3 \csc \left (2 a+2 b x+\frac {\pi }{2}\right )dx}{3 f}\)

\(\Big \downarrow \) 4669

\(\displaystyle \frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {b \left (-\frac {3 f \int (e+f x)^2 \log \left (1-i e^{2 i (a+b x)}\right )dx}{2 b}+\frac {3 f \int (e+f x)^2 \log \left (1+i e^{2 i (a+b x)}\right )dx}{2 b}-\frac {i (e+f x)^3 \arctan \left (e^{2 i (a+b x)}\right )}{b}\right )}{3 f}\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {b \left (\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \int (e+f x) \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )dx}{b}\right )}{2 b}-\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \int (e+f x) \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )dx}{b}\right )}{2 b}-\frac {i (e+f x)^3 \arctan \left (e^{2 i (a+b x)}\right )}{b}\right )}{3 f}\)

\(\Big \downarrow \) 7163

\(\displaystyle \frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {b \left (\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \left (\frac {i f \int \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )dx}{2 b}-\frac {i (e+f x) \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )}{2 b}\right )}{b}\right )}{2 b}-\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \left (\frac {i f \int \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )dx}{2 b}-\frac {i (e+f x) \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )}{2 b}\right )}{b}\right )}{2 b}-\frac {i (e+f x)^3 \arctan \left (e^{2 i (a+b x)}\right )}{b}\right )}{3 f}\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {b \left (\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \left (\frac {f \int e^{-2 i (a+b x)} \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}-\frac {i (e+f x) \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )}{2 b}\right )}{b}\right )}{2 b}-\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \left (\frac {f \int e^{-2 i (a+b x)} \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}-\frac {i (e+f x) \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )}{2 b}\right )}{b}\right )}{2 b}-\frac {i (e+f x)^3 \arctan \left (e^{2 i (a+b x)}\right )}{b}\right )}{3 f}\)

\(\Big \downarrow \) 7143

\(\displaystyle \frac {(e+f x)^3 \text {arctanh}(\cot (a+b x))}{3 f}-\frac {b \left (-\frac {i (e+f x)^3 \arctan \left (e^{2 i (a+b x)}\right )}{b}+\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \left (\frac {f \operatorname {PolyLog}\left (4,-i e^{2 i (a+b x)}\right )}{4 b^2}-\frac {i (e+f x) \operatorname {PolyLog}\left (3,-i e^{2 i (a+b x)}\right )}{2 b}\right )}{b}\right )}{2 b}-\frac {3 f \left (\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{2 b}-\frac {i f \left (\frac {f \operatorname {PolyLog}\left (4,i e^{2 i (a+b x)}\right )}{4 b^2}-\frac {i (e+f x) \operatorname {PolyLog}\left (3,i e^{2 i (a+b x)}\right )}{2 b}\right )}{b}\right )}{2 b}\right )}{3 f}\)

input
Int[(e + f*x)^2*ArcTanh[Cot[a + b*x]],x]
 
output
((e + f*x)^3*ArcTanh[Cot[a + b*x]])/(3*f) - (b*(((-I)*(e + f*x)^3*ArcTan[E 
^((2*I)*(a + b*x))])/b + (3*f*(((I/2)*(e + f*x)^2*PolyLog[2, (-I)*E^((2*I) 
*(a + b*x))])/b - (I*f*(((-1/2*I)*(e + f*x)*PolyLog[3, (-I)*E^((2*I)*(a + 
b*x))])/b + (f*PolyLog[4, (-I)*E^((2*I)*(a + b*x))])/(4*b^2)))/b))/(2*b) - 
 (3*f*(((I/2)*(e + f*x)^2*PolyLog[2, I*E^((2*I)*(a + b*x))])/b - (I*f*(((- 
1/2*I)*(e + f*x)*PolyLog[3, I*E^((2*I)*(a + b*x))])/b + (f*PolyLog[4, I*E^ 
((2*I)*(a + b*x))])/(4*b^2)))/b))/(2*b)))/(3*f)
 

3.4.30.3.1 Defintions of rubi rules used

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 

rule 3011
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) 
*(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + 
b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F]))   Int[(f + g*x)^( 
m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e 
, f, g, n}, x] && GtQ[m, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4669
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]
 

rule 6807
Int[ArcTanh[Cot[(a_.) + (b_.)*(x_)]]*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] 
:> Simp[(e + f*x)^(m + 1)*(ArcTanh[Cot[a + b*x]]/(f*(m + 1))), x] - Simp[b/ 
(f*(m + 1))   Int[(e + f*x)^(m + 1)*Sec[2*a + 2*b*x], x], x] /; FreeQ[{a, b 
, e, f}, x] && IGtQ[m, 0]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 

rule 7163
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. 
)*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a 
+ b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F]))   Int[(e + f*x) 
^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c 
, d, e, f, n, p}, x] && GtQ[m, 0]
 
3.4.30.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 10.21 (sec) , antiderivative size = 2719, normalized size of antiderivative = 11.62

method result size
risch \(\text {Expression too large to display}\) \(2719\)

input
int((f*x+e)^2*arctanh(cot(b*x+a)),x,method=_RETURNVERBOSE)
 
output
-1/6*f^2*ln(-I*exp(2*I*(b*x+a))+1)*x^3+1/6*(f*x+e)^3/f*ln(exp(2*I*(b*x+a)) 
+I)-1/8*I*f^2*polylog(4,I*exp(2*I*(b*x+a)))/b^3+1/8*I*f^2*polylog(4,-I*exp 
(2*I*(b*x+a)))/b^3-f*e/b*ln(-I*exp(2*I*(b*x+a))+1)*a*x+1/2*I*f*e/b*polylog 
(2,I*exp(2*I*(b*x+a)))*x+1/2*I*f*e/b^2*polylog(2,I*exp(2*I*(b*x+a)))*a+f*e 
/b*ln(1+I*exp(2*I*(b*x+a)))*a*x-1/2*I*f*e/b*polylog(2,-I*exp(2*I*(b*x+a))) 
*x-1/2*I*f*e/b^2*polylog(2,-I*exp(2*I*(b*x+a)))*a-I*f/b^2*a*e*dilog(((-I)^ 
(1/2)-exp(I*(b*x+a)))/(-I)^(1/2))-I*f/b^2*a*e*dilog(((-I)^(1/2)+exp(I*(b*x 
+a)))/(-I)^(1/2))+f/b*a*e*ln(((-I)^(1/2)-exp(I*(b*x+a)))/(-I)^(1/2))*x+f/b 
*a*e*ln(((-I)^(1/2)+exp(I*(b*x+a)))/(-I)^(1/2))*x-f/b*a*e*ln(1+exp(I*(b*x+ 
a))*(-1)^(3/4))*x-f/b*a*e*ln(1-exp(I*(b*x+a))*(-1)^(3/4))*x+I*f/b^2*a*e*di 
log(1+exp(I*(b*x+a))*(-1)^(3/4))+I*f/b^2*a*e*dilog(1-exp(I*(b*x+a))*(-1)^( 
3/4))+1/6/f*e^3*ln(-exp(2*I*(b*x+a))+I)+1/6*f^2*ln(1+I*exp(2*I*(b*x+a)))*x 
^3-1/2*f*ln(exp(2*I*(b*x+a))-I)*x^2*e-1/2*f^2/b^2*ln(1+I*exp(2*I*(b*x+a))) 
*a^2*x+1/2*f/b^2*a^2*e*ln(-exp(2*I*(b*x+a))+I)+1/4*I*f^2*a^2/b^3*polylog(2 
,-I*exp(2*I*(b*x+a)))-1/4*I*f^2/b*polylog(2,-I*exp(2*I*(b*x+a)))*x^2-1/3*f 
^2/b^3*ln(1+I*exp(2*I*(b*x+a)))*a^3+1/2*f*e*ln(1+I*exp(2*I*(b*x+a)))*x^2+1 
/4*f*e/b^2*polylog(3,-I*exp(2*I*(b*x+a)))-1/6*f^2/b^3*a^3*ln(-exp(2*I*(b*x 
+a))+I)+1/4*f^2/b^2*polylog(3,-I*exp(2*I*(b*x+a)))*x-1/2/b*a*e^2*ln(-exp(2 
*I*(b*x+a))+I)-1/2*f^2*ln(((-I)^(1/2)-exp(I*(b*x+a)))/(-I)^(1/2))/b^3*a^3- 
1/2*f^2*ln(((-I)^(1/2)+exp(I*(b*x+a)))/(-I)^(1/2))/b^3*a^3-1/2*ln(((-I)...
 
3.4.30.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1085 vs. \(2 (180) = 360\).

Time = 0.34 (sec) , antiderivative size = 1085, normalized size of antiderivative = 4.64 \[ \int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx=\text {Too large to display} \]

input
integrate((f*x+e)^2*arctanh(cot(b*x+a)),x, algorithm="fricas")
 
output
1/48*(-3*I*f^2*polylog(4, I*cos(2*b*x + 2*a) + sin(2*b*x + 2*a)) - 3*I*f^2 
*polylog(4, I*cos(2*b*x + 2*a) - sin(2*b*x + 2*a)) + 3*I*f^2*polylog(4, -I 
*cos(2*b*x + 2*a) + sin(2*b*x + 2*a)) + 3*I*f^2*polylog(4, -I*cos(2*b*x + 
2*a) - sin(2*b*x + 2*a)) - 6*(-I*b^2*f^2*x^2 - 2*I*b^2*e*f*x - I*b^2*e^2)* 
dilog(I*cos(2*b*x + 2*a) + sin(2*b*x + 2*a)) - 6*(-I*b^2*f^2*x^2 - 2*I*b^2 
*e*f*x - I*b^2*e^2)*dilog(I*cos(2*b*x + 2*a) - sin(2*b*x + 2*a)) - 6*(I*b^ 
2*f^2*x^2 + 2*I*b^2*e*f*x + I*b^2*e^2)*dilog(-I*cos(2*b*x + 2*a) + sin(2*b 
*x + 2*a)) - 6*(I*b^2*f^2*x^2 + 2*I*b^2*e*f*x + I*b^2*e^2)*dilog(-I*cos(2* 
b*x + 2*a) - sin(2*b*x + 2*a)) + 8*(b^3*f^2*x^3 + 3*b^3*e*f*x^2 + 3*b^3*e^ 
2*x)*log(-(cos(2*b*x + 2*a) + sin(2*b*x + 2*a) + 1)/(cos(2*b*x + 2*a) - si 
n(2*b*x + 2*a) + 1)) + 4*(3*a*b^2*e^2 - 3*a^2*b*e*f + a^3*f^2)*log(cos(2*b 
*x + 2*a) + I*sin(2*b*x + 2*a) + I) - 4*(3*a*b^2*e^2 - 3*a^2*b*e*f + a^3*f 
^2)*log(cos(2*b*x + 2*a) - I*sin(2*b*x + 2*a) + I) - 4*(b^3*f^2*x^3 + 3*b^ 
3*e*f*x^2 + 3*b^3*e^2*x + 3*a*b^2*e^2 - 3*a^2*b*e*f + a^3*f^2)*log(I*cos(2 
*b*x + 2*a) + sin(2*b*x + 2*a) + 1) + 4*(b^3*f^2*x^3 + 3*b^3*e*f*x^2 + 3*b 
^3*e^2*x + 3*a*b^2*e^2 - 3*a^2*b*e*f + a^3*f^2)*log(I*cos(2*b*x + 2*a) - s 
in(2*b*x + 2*a) + 1) - 4*(b^3*f^2*x^3 + 3*b^3*e*f*x^2 + 3*b^3*e^2*x + 3*a* 
b^2*e^2 - 3*a^2*b*e*f + a^3*f^2)*log(-I*cos(2*b*x + 2*a) + sin(2*b*x + 2*a 
) + 1) + 4*(b^3*f^2*x^3 + 3*b^3*e*f*x^2 + 3*b^3*e^2*x + 3*a*b^2*e^2 - 3*a^ 
2*b*e*f + a^3*f^2)*log(-I*cos(2*b*x + 2*a) - sin(2*b*x + 2*a) + 1) + 4*...
 
3.4.30.6 Sympy [F]

\[ \int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx=\int \left (e + f x\right )^{2} \operatorname {atanh}{\left (\cot {\left (a + b x \right )} \right )}\, dx \]

input
integrate((f*x+e)**2*atanh(cot(b*x+a)),x)
 
output
Integral((e + f*x)**2*atanh(cot(a + b*x)), x)
 
3.4.30.7 Maxima [F]

\[ \int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx=\int { {\left (f x + e\right )}^{2} \operatorname {artanh}\left (\cot \left (b x + a\right )\right ) \,d x } \]

input
integrate((f*x+e)^2*arctanh(cot(b*x+a)),x, algorithm="maxima")
 
output
1/12*(f^2*x^3 + 3*e*f*x^2 + 3*e^2*x)*log(2*cos(2*b*x + 2*a)^2 + 2*sin(2*b* 
x + 2*a)^2 + 4*sin(2*b*x + 2*a) + 2) - 1/12*(f^2*x^3 + 3*e*f*x^2 + 3*e^2*x 
)*log(2*cos(2*b*x + 2*a)^2 + 2*sin(2*b*x + 2*a)^2 - 4*sin(2*b*x + 2*a) + 2 
) - integrate(2/3*((b*f^2*x^3 + 3*b*e*f*x^2 + 3*b*e^2*x)*cos(4*b*x + 4*a)* 
cos(2*b*x + 2*a) + (b*f^2*x^3 + 3*b*e*f*x^2 + 3*b*e^2*x)*sin(4*b*x + 4*a)* 
sin(2*b*x + 2*a) + (b*f^2*x^3 + 3*b*e*f*x^2 + 3*b*e^2*x)*cos(2*b*x + 2*a)) 
/(cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 + 2*cos(4*b*x + 4*a) + 1), x)
 
3.4.30.8 Giac [F]

\[ \int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx=\int { {\left (f x + e\right )}^{2} \operatorname {artanh}\left (\cot \left (b x + a\right )\right ) \,d x } \]

input
integrate((f*x+e)^2*arctanh(cot(b*x+a)),x, algorithm="giac")
 
output
integrate((f*x + e)^2*arctanh(cot(b*x + a)), x)
 
3.4.30.9 Mupad [F(-1)]

Timed out. \[ \int (e+f x)^2 \text {arctanh}(\cot (a+b x)) \, dx=\int \mathrm {atanh}\left (\mathrm {cot}\left (a+b\,x\right )\right )\,{\left (e+f\,x\right )}^2 \,d x \]

input
int(atanh(cot(a + b*x))*(e + f*x)^2,x)
 
output
int(atanh(cot(a + b*x))*(e + f*x)^2, x)