3.4.17 \(\int x^2 \text {arctanh}(c+d \tan (a+b x)) \, dx\) [317]

3.4.17.1 Optimal result
3.4.17.2 Mathematica [A] (verified)
3.4.17.3 Rubi [A] (verified)
3.4.17.4 Maple [C] (warning: unable to verify)
3.4.17.5 Fricas [B] (verification not implemented)
3.4.17.6 Sympy [F]
3.4.17.7 Maxima [F]
3.4.17.8 Giac [F]
3.4.17.9 Mupad [F(-1)]

3.4.17.1 Optimal result

Integrand size = 15, antiderivative size = 395 \[ \int x^2 \text {arctanh}(c+d \tan (a+b x)) \, dx=\frac {1}{3} x^3 \text {arctanh}(c+d \tan (a+b x))+\frac {1}{6} x^3 \log \left (1+\frac {(1-c+i d) e^{2 i a+2 i b x}}{1-c-i d}\right )-\frac {1}{6} x^3 \log \left (1+\frac {(1+c-i d) e^{2 i a+2 i b x}}{1+c+i d}\right )-\frac {i x^2 \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 x^2 \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 {x \operatorname {PolyLog}\left (3,-\frac {(1-c+i d) e^{2 i a+2 i b x}}{1-c-i d}\right )}{4 b^2}-\frac {x \operatorname {PolyLog}\left (3,-\frac {(1+c-i d) e^{2 i a+2 i b x}}{1+c+i d}\right )}{4 b^2}+\frac {i \operatorname {PolyLog}\left (4,-\frac {(1-c+i d) e^{2 i a+2 i b x}}{1-c-i d}\right )}{8 b^3}-\frac {i \operatorname {PolyLog}\left (4,-\frac {(1+c-i d) e^{2 i a+2 i b x}}{1+c+i d}\right )}{8 b^3} \]

output
1/3*x^3*arctanh(c+d*tan(b*x+a))+1/6*x^3*ln(1+(1-c+I*d)*exp(2*I*a+2*I*b*x)/ 
(1-c-I*d))-1/6*x^3*ln(1+(1+c-I*d)*exp(2*I*a+2*I*b*x)/(1+c+I*d))-1/4*I*x^2* 
polylog(2,-(1-c+I*d)*exp(2*I*a+2*I*b*x)/(1-c-I*d))/b+1/4*I*x^2*polylog(2,- 
(1+c-I*d)*exp(2*I*a+2*I*b*x)/(1+c+I*d))/b+1/4*x*polylog(3,-(1-c+I*d)*exp(2 
*I*a+2*I*b*x)/(1-c-I*d))/b^2-1/4*x*polylog(3,-(1+c-I*d)*exp(2*I*a+2*I*b*x) 
/(1+c+I*d))/b^2+1/8*I*polylog(4,-(1-c+I*d)*exp(2*I*a+2*I*b*x)/(1-c-I*d))/b 
^3-1/8*I*polylog(4,-(1+c-I*d)*exp(2*I*a+2*I*b*x)/(1+c+I*d))/b^3
 
3.4.17.2 Mathematica [A] (verified)

Time = 3.61 (sec) , antiderivative size = 349, normalized size of antiderivative = 0.88 \[ \int x^2 \text {arctanh}(c+d \tan (a+b x)) \, dx=\frac {8 b^3 x^3 \text {arctanh}(c+d \tan (a+b x))+4 b^3 x^3 \log \left (1+\frac {(-1+c+i d) e^{-2 i (a+b x)}}{-1+c-i d}\right )-4 b^3 x^3 \log \left (1+\frac {(1+c+i d) e^{-2 i (a+b x)}}{1+c-i d}\right )+6 i b^2 x^2 \operatorname {PolyLog}\left (2,\frac {(1-c-i d) e^{-2 i (a+b x)}}{-1+c-i d}\right )-6 i b^2 x^2 \operatorname {PolyLog}\left (2,\frac {(-1-c-i d) e^{-2 i (a+b x)}}{1+c-i d}\right )+6 b x \operatorname {PolyLog}\left (3,\frac {(1-c-i d) e^{-2 i (a+b x)}}{-1+c-i d}\right )-6 b x \operatorname {PolyLog}\left (3,\frac {(-1-c-i d) e^{-2 i (a+b x)}}{1+c-i d}\right )-3 i \operatorname {PolyLog}\left (4,\frac {(1-c-i d) e^{-2 i (a+b x)}}{-1+c-i d}\right )+3 i \operatorname {PolyLog}\left (4,\frac {(-1-c-i d) e^{-2 i (a+b x)}}{1+c-i d}\right )}{24 b^3} \]

input
Integrate[x^2*ArcTanh[c + d*Tan[a + b*x]],x]
 
output
(8*b^3*x^3*ArcTanh[c + d*Tan[a + b*x]] + 4*b^3*x^3*Log[1 + (-1 + c + I*d)/ 
((-1 + c - I*d)*E^((2*I)*(a + b*x)))] - 4*b^3*x^3*Log[1 + (1 + c + I*d)/(( 
1 + c - I*d)*E^((2*I)*(a + b*x)))] + (6*I)*b^2*x^2*PolyLog[2, (1 - c - I*d 
)/((-1 + c - I*d)*E^((2*I)*(a + b*x)))] - (6*I)*b^2*x^2*PolyLog[2, (-1 - c 
 - I*d)/((1 + c - I*d)*E^((2*I)*(a + b*x)))] + 6*b*x*PolyLog[3, (1 - c - I 
*d)/((-1 + c - I*d)*E^((2*I)*(a + b*x)))] - 6*b*x*PolyLog[3, (-1 - c - I*d 
)/((1 + c - I*d)*E^((2*I)*(a + b*x)))] - (3*I)*PolyLog[4, (1 - c - I*d)/(( 
-1 + c - I*d)*E^((2*I)*(a + b*x)))] + (3*I)*PolyLog[4, (-1 - c - I*d)/((1 
+ c - I*d)*E^((2*I)*(a + b*x)))])/(24*b^3)
 
3.4.17.3 Rubi [A] (verified)

Time = 1.55 (sec) , antiderivative size = 522, normalized size of antiderivative = 1.32, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6821, 2620, 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 x^2 \text {arctanh}(d \tan (a+b x)+c) \, dx\)

\(\Big \downarrow \) 6821

\(\displaystyle -\frac {1}{3} b (i c+d+i) \int \frac {e^{2 i a+2 i b x} x^3}{c+(c-i d+1) e^{2 i a+2 i b x}+i d+1}dx+\frac {1}{3} b (-d+i (1-c)) \int \frac {e^{2 i a+2 i b x} x^3}{-c+(-c+i d+1) e^{2 i a+2 i b x}-i d+1}dx+\frac {1}{3} x^3 \text {arctanh}(d \tan (a+b x)+c)\)

\(\Big \downarrow \) 2620

\(\displaystyle \frac {1}{3} b (-d+i (1-c)) \left (\frac {x^3 \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))}-\frac {3 \int x^2 \log \left (\frac {e^{2 i a+2 i b x} (-c+i d+1)}{-c-i d+1}+1\right )dx}{2 b (-d+i (1-c))}\right )-\frac {1}{3} b (i c+d+i) \left (\frac {x^3 \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))}-\frac {3 \int x^2 \log \left (\frac {e^{2 i a+2 i b x} (c-i d+1)}{c+i d+1}+1\right )dx}{2 (b d+i (b c+b))}\right )+\frac {1}{3} x^3 \text {arctanh}(d \tan (a+b x)+c)\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {1}{3} b (-d+i (1-c)) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{2 b}-\frac {i \int x \operatorname {PolyLog}\left (2,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )dx}{b}\right )}{2 b (-d+i (1-c))}\right )-\frac {1}{3} b (i c+d+i) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{2 b}-\frac {i \int x \operatorname {PolyLog}\left (2,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )dx}{b}\right )}{2 (b d+i (b c+b))}\right )+\frac {1}{3} x^3 \text {arctanh}(d \tan (a+b x)+c)\)

\(\Big \downarrow \) 7163

\(\displaystyle \frac {1}{3} b (-d+i (1-c)) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{2 b}-\frac {i \left (\frac {i \int \operatorname {PolyLog}\left (3,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )dx}{2 b}-\frac {i x \operatorname {PolyLog}\left (3,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{2 b}\right )}{b}\right )}{2 b (-d+i (1-c))}\right )-\frac {1}{3} b (i c+d+i) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{2 b}-\frac {i \left (\frac {i \int \operatorname {PolyLog}\left (3,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )dx}{2 b}-\frac {i x \operatorname {PolyLog}\left (3,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{2 b}\right )}{b}\right )}{2 (b d+i (b c+b))}\right )+\frac {1}{3} x^3 \text {arctanh}(d \tan (a+b x)+c)\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {1}{3} b (-d+i (1-c)) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{2 b}-\frac {i \left (\frac {\int e^{-2 i a-2 i b x} \operatorname {PolyLog}\left (3,-\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}-\frac {i x \operatorname {PolyLog}\left (3,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{2 b}\right )}{b}\right )}{2 b (-d+i (1-c))}\right )-\frac {1}{3} b (i c+d+i) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{2 b}-\frac {i \left (\frac {\int e^{-2 i a-2 i b x} \operatorname {PolyLog}\left (3,-\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}-\frac {i x \operatorname {PolyLog}\left (3,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{2 b}\right )}{b}\right )}{2 (b d+i (b c+b))}\right )+\frac {1}{3} x^3 \text {arctanh}(d \tan (a+b x)+c)\)

\(\Big \downarrow \) 7143

\(\displaystyle \frac {1}{3} x^3 \text {arctanh}(d \tan (a+b x)+c)+\frac {1}{3} b (-d+i (1-c)) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{2 b}-\frac {i \left (\frac {\operatorname {PolyLog}\left (4,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{4 b^2}-\frac {i x \operatorname {PolyLog}\left (3,-\frac {(-c+i d+1) e^{2 i a+2 i b x}}{-c-i d+1}\right )}{2 b}\right )}{b}\right )}{2 b (-d+i (1-c))}\right )-\frac {1}{3} b (i c+d+i) \left (\frac {x^3 \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))}-\frac {3 \left (\frac {i x^2 \operatorname {PolyLog}\left (2,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{2 b}-\frac {i \left (\frac {\operatorname {PolyLog}\left (4,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{4 b^2}-\frac {i x \operatorname {PolyLog}\left (3,-\frac {(c-i d+1) e^{2 i a+2 i b x}}{c+i d+1}\right )}{2 b}\right )}{b}\right )}{2 (b d+i (b c+b))}\right )\)

input
Int[x^2*ArcTanh[c + d*Tan[a + b*x]],x]
 
output
(x^3*ArcTanh[c + d*Tan[a + b*x]])/3 + (b*(I*(1 - c) - d)*((x^3*Log[1 + ((1 
 - c + I*d)*E^((2*I)*a + (2*I)*b*x))/(1 - c - I*d)])/(2*b*(I*(1 - c) - d)) 
 - (3*(((I/2)*x^2*PolyLog[2, -(((1 - c + I*d)*E^((2*I)*a + (2*I)*b*x))/(1 
- c - I*d))])/b - (I*(((-1/2*I)*x*PolyLog[3, -(((1 - c + I*d)*E^((2*I)*a + 
 (2*I)*b*x))/(1 - c - I*d))])/b + PolyLog[4, -(((1 - c + I*d)*E^((2*I)*a + 
 (2*I)*b*x))/(1 - c - I*d))]/(4*b^2)))/b))/(2*b*(I*(1 - c) - d))))/3 - (b* 
(I + I*c + d)*((x^3*Log[1 + ((1 + c - I*d)*E^((2*I)*a + (2*I)*b*x))/(1 + c 
 + I*d)])/(2*(I*(b + b*c) + b*d)) - (3*(((I/2)*x^2*PolyLog[2, -(((1 + c - 
I*d)*E^((2*I)*a + (2*I)*b*x))/(1 + c + I*d))])/b - (I*(((-1/2*I)*x*PolyLog 
[3, -(((1 + c - I*d)*E^((2*I)*a + (2*I)*b*x))/(1 + c + I*d))])/b + PolyLog 
[4, -(((1 + c - I*d)*E^((2*I)*a + (2*I)*b*x))/(1 + c + I*d))]/(4*b^2)))/b) 
)/(2*(I*(b + b*c) + b*d))))/3
 

3.4.17.3.1 Defintions of rubi rules used

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

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 6821
Int[ArcTanh[(c_.) + (d_.)*Tan[(a_.) + (b_.)*(x_)]]*((e_.) + (f_.)*(x_))^(m_ 
.), x_Symbol] :> Simp[(e + f*x)^(m + 1)*(ArcTanh[c + d*Tan[a + b*x]]/(f*(m 
+ 1))), x] + (-Simp[I*b*((1 + c - I*d)/(f*(m + 1)))   Int[(e + f*x)^(m + 1) 
*(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)/(f*(m + 1)))   Int[(e + f*x)^(m + 1)*(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, e, f}, x] && IGtQ[m, 0] && NeQ[(c + I*d)^2, 1]
 

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.17.4 Maple [C] (warning: unable to verify)

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

Time = 21.30 (sec) , antiderivative size = 6921, normalized size of antiderivative = 17.52

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

input
int(x^2*arctanh(c+d*tan(b*x+a)),x,method=_RETURNVERBOSE)
 
output
result too large to display
 
3.4.17.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. 2165 vs. \(2 (279) = 558\).

Time = 0.34 (sec) , antiderivative size = 2165, normalized size of antiderivative = 5.48 \[ \int x^2 \text {arctanh}(c+d \tan (a+b x)) \, dx=\text {Too large to display} \]

input
integrate(x^2*arctanh(c+d*tan(b*x+a)),x, algorithm="fricas")
 
output
1/48*(8*b^3*x^3*log(-(d*tan(b*x + a) + c + 1)/(d*tan(b*x + a) + c - 1)) - 
6*I*b^2*x^2*dilog(2*((I*(c + 1)*d - d^2)*tan(b*x + a)^2 - c^2 - I*(c + 1)* 
d + (I*c^2 - 2*(c + 1)*d - I*d^2 + 2*I*c + I)*tan(b*x + a) - 2*c - 1)/((c^ 
2 + d^2 + 2*c + 1)*tan(b*x + a)^2 + c^2 + d^2 + 2*c + 1) + 1) + 6*I*b^2*x^ 
2*dilog(2*((-I*(c + 1)*d - d^2)*tan(b*x + a)^2 - c^2 + I*(c + 1)*d + (-I*c 
^2 - 2*(c + 1)*d + I*d^2 - 2*I*c - I)*tan(b*x + a) - 2*c - 1)/((c^2 + d^2 
+ 2*c + 1)*tan(b*x + a)^2 + c^2 + d^2 + 2*c + 1) + 1) + 6*I*b^2*x^2*dilog( 
2*((I*(c - 1)*d - d^2)*tan(b*x + a)^2 - c^2 - I*(c - 1)*d + (I*c^2 - 2*(c 
- 1)*d - I*d^2 - 2*I*c + I)*tan(b*x + a) + 2*c - 1)/((c^2 + d^2 - 2*c + 1) 
*tan(b*x + a)^2 + c^2 + d^2 - 2*c + 1) + 1) - 6*I*b^2*x^2*dilog(2*((-I*(c 
- 1)*d - d^2)*tan(b*x + a)^2 - c^2 + I*(c - 1)*d + (-I*c^2 - 2*(c - 1)*d + 
 I*d^2 + 2*I*c - I)*tan(b*x + a) + 2*c - 1)/((c^2 + d^2 - 2*c + 1)*tan(b*x 
 + a)^2 + c^2 + d^2 - 2*c + 1) + 1) + 4*a^3*log(((I*(c + 1)*d + d^2)*tan(b 
*x + a)^2 - c^2 + I*(c + 1)*d + (I*c^2 + I*d^2 + 2*I*c + I)*tan(b*x + a) - 
 2*c - 1)/(tan(b*x + a)^2 + 1)) + 4*a^3*log(((I*(c + 1)*d - d^2)*tan(b*x + 
 a)^2 + c^2 + I*(c + 1)*d + (I*c^2 + I*d^2 + 2*I*c + I)*tan(b*x + a) + 2*c 
 + 1)/(tan(b*x + a)^2 + 1)) - 4*a^3*log(((I*(c - 1)*d + d^2)*tan(b*x + a)^ 
2 - c^2 + I*(c - 1)*d + (I*c^2 + I*d^2 - 2*I*c + I)*tan(b*x + a) + 2*c - 1 
)/(tan(b*x + a)^2 + 1)) - 4*a^3*log(((I*(c - 1)*d - d^2)*tan(b*x + a)^2 + 
c^2 + I*(c - 1)*d + (I*c^2 + I*d^2 - 2*I*c + I)*tan(b*x + a) - 2*c + 1)...
 
3.4.17.6 Sympy [F]

\[ \int x^2 \text {arctanh}(c+d \tan (a+b x)) \, dx=\int x^{2} \operatorname {atanh}{\left (c + d \tan {\left (a + b x \right )} \right )}\, dx \]

input
integrate(x**2*atanh(c+d*tan(b*x+a)),x)
 
output
Integral(x**2*atanh(c + d*tan(a + b*x)), x)
 
3.4.17.7 Maxima [F]

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

input
integrate(x^2*arctanh(c+d*tan(b*x+a)),x, algorithm="maxima")
 
output
1/12*x^3*log((c^2 + d^2 + 2*c + 1)*cos(2*b*x + 2*a)^2 + 4*(c + 1)*d*sin(2* 
b*x + 2*a) + (c^2 + d^2 + 2*c + 1)*sin(2*b*x + 2*a)^2 + c^2 + d^2 + 2*(c^2 
 - d^2 + 2*c + 1)*cos(2*b*x + 2*a) + 2*c + 1) - 1/12*x^3*log((c^2 + d^2 - 
2*c + 1)*cos(2*b*x + 2*a)^2 + 4*(c - 1)*d*sin(2*b*x + 2*a) + (c^2 + d^2 - 
2*c + 1)*sin(2*b*x + 2*a)^2 + c^2 + d^2 + 2*(c^2 - d^2 - 2*c + 1)*cos(2*b* 
x + 2*a) - 2*c + 1) - 4*b*d*integrate(-1/3*(2*(c^2 + d^2 - 1)*x^3*cos(2*b* 
x + 2*a)^2 + 2*c*d*x^3*sin(2*b*x + 2*a) + 2*(c^2 + d^2 - 1)*x^3*sin(2*b*x 
+ 2*a)^2 + (c^2 - d^2 - 1)*x^3*cos(2*b*x + 2*a) - (2*c*d*x^3*sin(2*b*x + 2 
*a) - (c^2 - d^2 - 1)*x^3*cos(2*b*x + 2*a))*cos(4*b*x + 4*a) + (2*c*d*x^3* 
cos(2*b*x + 2*a) + (c^2 - d^2 - 1)*x^3*sin(2*b*x + 2*a))*sin(4*b*x + 4*a)) 
/(c^4 + d^4 + 2*(c^2 + 1)*d^2 + (c^4 + d^4 + 2*(c^2 + 1)*d^2 - 2*c^2 + 1)* 
cos(4*b*x + 4*a)^2 + 4*(c^4 + d^4 + 2*(c^2 - 1)*d^2 - 2*c^2 + 1)*cos(2*b*x 
 + 2*a)^2 + (c^4 + d^4 + 2*(c^2 + 1)*d^2 - 2*c^2 + 1)*sin(4*b*x + 4*a)^2 + 
 4*(c^4 + d^4 + 2*(c^2 - 1)*d^2 - 2*c^2 + 1)*sin(2*b*x + 2*a)^2 - 2*c^2 + 
2*(c^4 + d^4 - 2*(3*c^2 - 1)*d^2 - 2*c^2 + 2*(c^4 - d^4 - 2*c^2 + 1)*cos(2 
*b*x + 2*a) - 4*(c*d^3 + (c^3 - c)*d)*sin(2*b*x + 2*a) + 1)*cos(4*b*x + 4* 
a) + 4*(c^4 - d^4 - 2*c^2 + 1)*cos(2*b*x + 2*a) - 4*(2*c*d^3 - 2*(c^3 - c) 
*d - 2*(c*d^3 + (c^3 - c)*d)*cos(2*b*x + 2*a) - (c^4 - d^4 - 2*c^2 + 1)*si 
n(2*b*x + 2*a))*sin(4*b*x + 4*a) + 8*(c*d^3 + (c^3 - c)*d)*sin(2*b*x + 2*a 
) + 1), x)
 
3.4.17.8 Giac [F]

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

input
integrate(x^2*arctanh(c+d*tan(b*x+a)),x, algorithm="giac")
 
output
integrate(x^2*arctanh(d*tan(b*x + a) + c), x)
 
3.4.17.9 Mupad [F(-1)]

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

input
int(x^2*atanh(c + d*tan(a + b*x)),x)
 
output
int(x^2*atanh(c + d*tan(a + b*x)), x)