3.2.85 \(\int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx\) [185]

3.2.85.1 Optimal result
3.2.85.2 Mathematica [A] (verified)
3.2.85.3 Rubi [A] (verified)
3.2.85.4 Maple [B] (verified)
3.2.85.5 Fricas [C] (verification not implemented)
3.2.85.6 Sympy [F]
3.2.85.7 Maxima [C] (verification not implemented)
3.2.85.8 Giac [F]
3.2.85.9 Mupad [B] (verification not implemented)

3.2.85.1 Optimal result

Integrand size = 13, antiderivative size = 165 \[ \int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx=\frac {x^4 \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac {4 x^3 \coth ^{-1}(\tanh (a+b x))^{2+n}}{b^2 (1+n) (2+n)}+\frac {12 x^2 \coth ^{-1}(\tanh (a+b x))^{3+n}}{b^3 (1+n) (2+n) (3+n)}-\frac {24 x \coth ^{-1}(\tanh (a+b x))^{4+n}}{b^4 (1+n) (2+n) (3+n) (4+n)}+\frac {24 \coth ^{-1}(\tanh (a+b x))^{5+n}}{b^5 (1+n) (2+n) (3+n) (4+n) (5+n)} \]

output
x^4*arccoth(tanh(b*x+a))^(1+n)/b/(1+n)-4*x^3*arccoth(tanh(b*x+a))^(2+n)/b^ 
2/(1+n)/(2+n)+12*x^2*arccoth(tanh(b*x+a))^(3+n)/b^3/(3+n)/(n^2+3*n+2)-24*x 
*arccoth(tanh(b*x+a))^(4+n)/b^4/(n^2+5*n+4)/(n^2+5*n+6)+24*arccoth(tanh(b* 
x+a))^(5+n)/b^5/(n^2+7*n+12)/(n^3+8*n^2+17*n+10)
 
3.2.85.2 Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.88 \[ \int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx=\frac {\coth ^{-1}(\tanh (a+b x))^{1+n} \left (b^4 \left (120+154 n+71 n^2+14 n^3+n^4\right ) x^4-4 b^3 \left (60+47 n+12 n^2+n^3\right ) x^3 \coth ^{-1}(\tanh (a+b x))+12 b^2 \left (20+9 n+n^2\right ) x^2 \coth ^{-1}(\tanh (a+b x))^2-24 b (5+n) x \coth ^{-1}(\tanh (a+b x))^3+24 \coth ^{-1}(\tanh (a+b x))^4\right )}{b^5 (1+n) (2+n) (3+n) (4+n) (5+n)} \]

input
Integrate[x^4*ArcCoth[Tanh[a + b*x]]^n,x]
 
output
(ArcCoth[Tanh[a + b*x]]^(1 + n)*(b^4*(120 + 154*n + 71*n^2 + 14*n^3 + n^4) 
*x^4 - 4*b^3*(60 + 47*n + 12*n^2 + n^3)*x^3*ArcCoth[Tanh[a + b*x]] + 12*b^ 
2*(20 + 9*n + n^2)*x^2*ArcCoth[Tanh[a + b*x]]^2 - 24*b*(5 + n)*x*ArcCoth[T 
anh[a + b*x]]^3 + 24*ArcCoth[Tanh[a + b*x]]^4))/(b^5*(1 + n)*(2 + n)*(3 + 
n)*(4 + n)*(5 + n))
 
3.2.85.3 Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 150, normalized size of antiderivative = 0.91, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2599, 2599, 2599, 2599, 2588, 15}

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^4 \coth ^{-1}(\tanh (a+b x))^n \, dx\)

\(\Big \downarrow \) 2599

\(\displaystyle \frac {x^4 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {4 \int x^3 \coth ^{-1}(\tanh (a+b x))^{n+1}dx}{b (n+1)}\)

\(\Big \downarrow \) 2599

\(\displaystyle \frac {x^4 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {4 \left (\frac {x^3 \coth ^{-1}(\tanh (a+b x))^{n+2}}{b (n+2)}-\frac {3 \int x^2 \coth ^{-1}(\tanh (a+b x))^{n+2}dx}{b (n+2)}\right )}{b (n+1)}\)

\(\Big \downarrow \) 2599

\(\displaystyle \frac {x^4 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {4 \left (\frac {x^3 \coth ^{-1}(\tanh (a+b x))^{n+2}}{b (n+2)}-\frac {3 \left (\frac {x^2 \coth ^{-1}(\tanh (a+b x))^{n+3}}{b (n+3)}-\frac {2 \int x \coth ^{-1}(\tanh (a+b x))^{n+3}dx}{b (n+3)}\right )}{b (n+2)}\right )}{b (n+1)}\)

\(\Big \downarrow \) 2599

\(\displaystyle \frac {x^4 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {4 \left (\frac {x^3 \coth ^{-1}(\tanh (a+b x))^{n+2}}{b (n+2)}-\frac {3 \left (\frac {x^2 \coth ^{-1}(\tanh (a+b x))^{n+3}}{b (n+3)}-\frac {2 \left (\frac {x \coth ^{-1}(\tanh (a+b x))^{n+4}}{b (n+4)}-\frac {\int \coth ^{-1}(\tanh (a+b x))^{n+4}dx}{b (n+4)}\right )}{b (n+3)}\right )}{b (n+2)}\right )}{b (n+1)}\)

\(\Big \downarrow \) 2588

\(\displaystyle \frac {x^4 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {4 \left (\frac {x^3 \coth ^{-1}(\tanh (a+b x))^{n+2}}{b (n+2)}-\frac {3 \left (\frac {x^2 \coth ^{-1}(\tanh (a+b x))^{n+3}}{b (n+3)}-\frac {2 \left (\frac {x \coth ^{-1}(\tanh (a+b x))^{n+4}}{b (n+4)}-\frac {\int \coth ^{-1}(\tanh (a+b x))^{n+4}d\coth ^{-1}(\tanh (a+b x))}{b^2 (n+4)}\right )}{b (n+3)}\right )}{b (n+2)}\right )}{b (n+1)}\)

\(\Big \downarrow \) 15

\(\displaystyle \frac {x^4 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {4 \left (\frac {x^3 \coth ^{-1}(\tanh (a+b x))^{n+2}}{b (n+2)}-\frac {3 \left (\frac {x^2 \coth ^{-1}(\tanh (a+b x))^{n+3}}{b (n+3)}-\frac {2 \left (\frac {x \coth ^{-1}(\tanh (a+b x))^{n+4}}{b (n+4)}-\frac {\coth ^{-1}(\tanh (a+b x))^{n+5}}{b^2 (n+4) (n+5)}\right )}{b (n+3)}\right )}{b (n+2)}\right )}{b (n+1)}\)

input
Int[x^4*ArcCoth[Tanh[a + b*x]]^n,x]
 
output
(x^4*ArcCoth[Tanh[a + b*x]]^(1 + n))/(b*(1 + n)) - (4*((x^3*ArcCoth[Tanh[a 
 + b*x]]^(2 + n))/(b*(2 + n)) - (3*((x^2*ArcCoth[Tanh[a + b*x]]^(3 + n))/( 
b*(3 + n)) - (2*((x*ArcCoth[Tanh[a + b*x]]^(4 + n))/(b*(4 + n)) - ArcCoth[ 
Tanh[a + b*x]]^(5 + n)/(b^2*(4 + n)*(5 + n))))/(b*(3 + n))))/(b*(2 + n)))) 
/(b*(1 + n))
 

3.2.85.3.1 Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 2588
Int[(u_)^(m_.), x_Symbol] :> With[{c = Simplify[D[u, x]]}, Simp[1/c   Subst 
[Int[x^m, x], x, u], x]] /; FreeQ[m, x] && PiecewiseLinearQ[u, x]
 

rule 2599
Int[(u_)^(m_)*(v_)^(n_.), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Sim 
plify[D[v, x]]}, Simp[u^(m + 1)*(v^n/(a*(m + 1))), x] - Simp[b*(n/(a*(m + 1 
)))   Int[u^(m + 1)*v^(n - 1), x], x] /; NeQ[b*u - a*v, 0]] /; FreeQ[{m, n} 
, x] && PiecewiseLinearQ[u, v, x] && NeQ[m, -1] && ((LtQ[m, -1] && GtQ[n, 0 
] &&  !(ILtQ[m + n, -2] && (FractionQ[m] || GeQ[2*n + m + 1, 0]))) || (IGtQ 
[n, 0] && IGtQ[m, 0] && LeQ[n, m]) || (IGtQ[n, 0] &&  !IntegerQ[m]) || (ILt 
Q[m, 0] &&  !IntegerQ[n]))
 
3.2.85.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(419\) vs. \(2(165)=330\).

Time = 16.41 (sec) , antiderivative size = 420, normalized size of antiderivative = 2.55

method result size
parallelrisch \(-\frac {-24 \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{5}-120 \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right ) x^{4} b^{4}+240 \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{2} x^{3} b^{3}-240 \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{3} x^{2} b^{2}+120 \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{4} x b +48 x^{3} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{2} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{3} n^{2}+188 x^{3} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{2} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{3} n -12 x^{2} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{3} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{2} n^{2}-108 x^{2} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{3} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{2} n +24 x \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{4} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b n -14 x^{4} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{4} n^{3}-71 x^{4} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{4} n^{2}+4 x^{3} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{2} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{3} n^{3}-154 x^{4} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{4} n -x^{4} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )^{n} b^{4} n^{4}}{b^{5} \left (n^{5}+15 n^{4}+85 n^{3}+225 n^{2}+274 n +120\right )}\) \(420\)
risch \(\text {Expression too large to display}\) \(504228\)

input
int(x^4*arccoth(tanh(b*x+a))^n,x,method=_RETURNVERBOSE)
 
output
-(-24*arccoth(tanh(b*x+a))^n*arccoth(tanh(b*x+a))^5-120*arccoth(tanh(b*x+a 
))^n*arccoth(tanh(b*x+a))*x^4*b^4+240*arccoth(tanh(b*x+a))^n*arccoth(tanh( 
b*x+a))^2*x^3*b^3-240*arccoth(tanh(b*x+a))^n*arccoth(tanh(b*x+a))^3*x^2*b^ 
2+120*arccoth(tanh(b*x+a))^n*arccoth(tanh(b*x+a))^4*x*b+48*x^3*arccoth(tan 
h(b*x+a))^2*arccoth(tanh(b*x+a))^n*b^3*n^2+188*x^3*arccoth(tanh(b*x+a))^2* 
arccoth(tanh(b*x+a))^n*b^3*n-12*x^2*arccoth(tanh(b*x+a))^3*arccoth(tanh(b* 
x+a))^n*b^2*n^2-108*x^2*arccoth(tanh(b*x+a))^3*arccoth(tanh(b*x+a))^n*b^2* 
n+24*x*arccoth(tanh(b*x+a))^4*arccoth(tanh(b*x+a))^n*b*n-14*x^4*arccoth(ta 
nh(b*x+a))*arccoth(tanh(b*x+a))^n*b^4*n^3-71*x^4*arccoth(tanh(b*x+a))*arcc 
oth(tanh(b*x+a))^n*b^4*n^2+4*x^3*arccoth(tanh(b*x+a))^2*arccoth(tanh(b*x+a 
))^n*b^3*n^3-154*x^4*arccoth(tanh(b*x+a))*arccoth(tanh(b*x+a))^n*b^4*n-x^4 
*arccoth(tanh(b*x+a))*arccoth(tanh(b*x+a))^n*b^4*n^4)/b^5/(n^5+15*n^4+85*n 
^3+225*n^2+274*n+120)
 
3.2.85.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.26 (sec) , antiderivative size = 828, normalized size of antiderivative = 5.02 \[ \int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx=-\frac {{\left (96 \, a^{4} b n x - 4 \, {\left (b^{5} n^{4} + 10 \, b^{5} n^{3} + 35 \, b^{5} n^{2} + 50 \, b^{5} n + 24 \, b^{5}\right )} x^{5} - 3 i \, \pi ^{5} + 6 \, \pi ^{4} {\left (b n x - 5 \, a\right )} - 96 \, a^{5} - 4 \, {\left (a b^{4} n^{4} + 6 \, a b^{4} n^{3} + 11 \, a b^{4} n^{2} + 6 \, a b^{4} n\right )} x^{4} - 6 i \, \pi ^{3} {\left (8 \, a b n x - {\left (b^{2} n^{2} + b^{2} n\right )} x^{2} - 20 \, a^{2}\right )} + 16 \, {\left (a^{2} b^{3} n^{3} + 3 \, a^{2} b^{3} n^{2} + 2 \, a^{2} b^{3} n\right )} x^{3} - 4 \, \pi ^{2} {\left (36 \, a^{2} b n x + {\left (b^{3} n^{3} + 3 \, b^{3} n^{2} + 2 \, b^{3} n\right )} x^{3} - 60 \, a^{3} - 9 \, {\left (a b^{2} n^{2} + a b^{2} n\right )} x^{2}\right )} - 48 \, {\left (a^{3} b^{2} n^{2} + a^{3} b^{2} n\right )} x^{2} + 2 i \, \pi {\left (96 \, a^{3} b n x - {\left (b^{4} n^{4} + 6 \, b^{4} n^{3} + 11 \, b^{4} n^{2} + 6 \, b^{4} n\right )} x^{4} - 120 \, a^{4} + 8 \, {\left (a b^{3} n^{3} + 3 \, a b^{3} n^{2} + 2 \, a b^{3} n\right )} x^{3} - 36 \, {\left (a^{2} b^{2} n^{2} + a^{2} b^{2} n\right )} x^{2}\right )}\right )} \cosh \left (n \log \left (\frac {1}{2} i \, \pi + b x + a\right )\right ) + {\left (96 \, a^{4} b n x - 4 \, {\left (b^{5} n^{4} + 10 \, b^{5} n^{3} + 35 \, b^{5} n^{2} + 50 \, b^{5} n + 24 \, b^{5}\right )} x^{5} - 3 i \, \pi ^{5} + 6 \, \pi ^{4} {\left (b n x - 5 \, a\right )} - 96 \, a^{5} - 4 \, {\left (a b^{4} n^{4} + 6 \, a b^{4} n^{3} + 11 \, a b^{4} n^{2} + 6 \, a b^{4} n\right )} x^{4} - 6 i \, \pi ^{3} {\left (8 \, a b n x - {\left (b^{2} n^{2} + b^{2} n\right )} x^{2} - 20 \, a^{2}\right )} + 16 \, {\left (a^{2} b^{3} n^{3} + 3 \, a^{2} b^{3} n^{2} + 2 \, a^{2} b^{3} n\right )} x^{3} - 4 \, \pi ^{2} {\left (36 \, a^{2} b n x + {\left (b^{3} n^{3} + 3 \, b^{3} n^{2} + 2 \, b^{3} n\right )} x^{3} - 60 \, a^{3} - 9 \, {\left (a b^{2} n^{2} + a b^{2} n\right )} x^{2}\right )} - 48 \, {\left (a^{3} b^{2} n^{2} + a^{3} b^{2} n\right )} x^{2} + 2 i \, \pi {\left (96 \, a^{3} b n x - {\left (b^{4} n^{4} + 6 \, b^{4} n^{3} + 11 \, b^{4} n^{2} + 6 \, b^{4} n\right )} x^{4} - 120 \, a^{4} + 8 \, {\left (a b^{3} n^{3} + 3 \, a b^{3} n^{2} + 2 \, a b^{3} n\right )} x^{3} - 36 \, {\left (a^{2} b^{2} n^{2} + a^{2} b^{2} n\right )} x^{2}\right )}\right )} \sinh \left (n \log \left (\frac {1}{2} i \, \pi + b x + a\right )\right )}{4 \, {\left (b^{5} n^{5} + 15 \, b^{5} n^{4} + 85 \, b^{5} n^{3} + 225 \, b^{5} n^{2} + 274 \, b^{5} n + 120 \, b^{5}\right )}} \]

input
integrate(x^4*arccoth(tanh(b*x+a))^n,x, algorithm="fricas")
 
output
-1/4*((96*a^4*b*n*x - 4*(b^5*n^4 + 10*b^5*n^3 + 35*b^5*n^2 + 50*b^5*n + 24 
*b^5)*x^5 - 3*I*pi^5 + 6*pi^4*(b*n*x - 5*a) - 96*a^5 - 4*(a*b^4*n^4 + 6*a* 
b^4*n^3 + 11*a*b^4*n^2 + 6*a*b^4*n)*x^4 - 6*I*pi^3*(8*a*b*n*x - (b^2*n^2 + 
 b^2*n)*x^2 - 20*a^2) + 16*(a^2*b^3*n^3 + 3*a^2*b^3*n^2 + 2*a^2*b^3*n)*x^3 
 - 4*pi^2*(36*a^2*b*n*x + (b^3*n^3 + 3*b^3*n^2 + 2*b^3*n)*x^3 - 60*a^3 - 9 
*(a*b^2*n^2 + a*b^2*n)*x^2) - 48*(a^3*b^2*n^2 + a^3*b^2*n)*x^2 + 2*I*pi*(9 
6*a^3*b*n*x - (b^4*n^4 + 6*b^4*n^3 + 11*b^4*n^2 + 6*b^4*n)*x^4 - 120*a^4 + 
 8*(a*b^3*n^3 + 3*a*b^3*n^2 + 2*a*b^3*n)*x^3 - 36*(a^2*b^2*n^2 + a^2*b^2*n 
)*x^2))*cosh(n*log(1/2*I*pi + b*x + a)) + (96*a^4*b*n*x - 4*(b^5*n^4 + 10* 
b^5*n^3 + 35*b^5*n^2 + 50*b^5*n + 24*b^5)*x^5 - 3*I*pi^5 + 6*pi^4*(b*n*x - 
 5*a) - 96*a^5 - 4*(a*b^4*n^4 + 6*a*b^4*n^3 + 11*a*b^4*n^2 + 6*a*b^4*n)*x^ 
4 - 6*I*pi^3*(8*a*b*n*x - (b^2*n^2 + b^2*n)*x^2 - 20*a^2) + 16*(a^2*b^3*n^ 
3 + 3*a^2*b^3*n^2 + 2*a^2*b^3*n)*x^3 - 4*pi^2*(36*a^2*b*n*x + (b^3*n^3 + 3 
*b^3*n^2 + 2*b^3*n)*x^3 - 60*a^3 - 9*(a*b^2*n^2 + a*b^2*n)*x^2) - 48*(a^3* 
b^2*n^2 + a^3*b^2*n)*x^2 + 2*I*pi*(96*a^3*b*n*x - (b^4*n^4 + 6*b^4*n^3 + 1 
1*b^4*n^2 + 6*b^4*n)*x^4 - 120*a^4 + 8*(a*b^3*n^3 + 3*a*b^3*n^2 + 2*a*b^3* 
n)*x^3 - 36*(a^2*b^2*n^2 + a^2*b^2*n)*x^2))*sinh(n*log(1/2*I*pi + b*x + a) 
))/(b^5*n^5 + 15*b^5*n^4 + 85*b^5*n^3 + 225*b^5*n^2 + 274*b^5*n + 120*b^5)
 
3.2.85.6 Sympy [F]

\[ \int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx=\text {Too large to display} \]

input
integrate(x**4*acoth(tanh(b*x+a))**n,x)
 
output
Piecewise((x**5*acoth(tanh(a))**n/5, Eq(b, 0)), (-x**4/(4*b*acoth(tanh(a + 
 b*x))**4) - x**3/(3*b**2*acoth(tanh(a + b*x))**3) - x**2/(2*b**3*acoth(ta 
nh(a + b*x))**2) - x/(b**4*acoth(tanh(a + b*x))) + log(acoth(tanh(a + b*x) 
))/b**5, Eq(n, -5)), (Integral(x**4/acoth(tanh(a + b*x))**4, x), Eq(n, -4) 
), (Integral(x**4/acoth(tanh(a + b*x))**3, x), Eq(n, -3)), (Integral(x**4/ 
acoth(tanh(a + b*x))**2, x), Eq(n, -2)), (Integral(x**4/acoth(tanh(a + b*x 
)), x), Eq(n, -1)), (b**4*n**4*x**4*acoth(tanh(a + b*x))*acoth(tanh(a + b* 
x))**n/(b**5*n**5 + 15*b**5*n**4 + 85*b**5*n**3 + 225*b**5*n**2 + 274*b**5 
*n + 120*b**5) + 14*b**4*n**3*x**4*acoth(tanh(a + b*x))*acoth(tanh(a + b*x 
))**n/(b**5*n**5 + 15*b**5*n**4 + 85*b**5*n**3 + 225*b**5*n**2 + 274*b**5* 
n + 120*b**5) + 71*b**4*n**2*x**4*acoth(tanh(a + b*x))*acoth(tanh(a + b*x) 
)**n/(b**5*n**5 + 15*b**5*n**4 + 85*b**5*n**3 + 225*b**5*n**2 + 274*b**5*n 
 + 120*b**5) + 154*b**4*n*x**4*acoth(tanh(a + b*x))*acoth(tanh(a + b*x))** 
n/(b**5*n**5 + 15*b**5*n**4 + 85*b**5*n**3 + 225*b**5*n**2 + 274*b**5*n + 
120*b**5) + 120*b**4*x**4*acoth(tanh(a + b*x))*acoth(tanh(a + b*x))**n/(b* 
*5*n**5 + 15*b**5*n**4 + 85*b**5*n**3 + 225*b**5*n**2 + 274*b**5*n + 120*b 
**5) - 4*b**3*n**3*x**3*acoth(tanh(a + b*x))**2*acoth(tanh(a + b*x))**n/(b 
**5*n**5 + 15*b**5*n**4 + 85*b**5*n**3 + 225*b**5*n**2 + 274*b**5*n + 120* 
b**5) - 48*b**3*n**2*x**3*acoth(tanh(a + b*x))**2*acoth(tanh(a + b*x))**n/ 
(b**5*n**5 + 15*b**5*n**4 + 85*b**5*n**3 + 225*b**5*n**2 + 274*b**5*n +...
 
3.2.85.7 Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.38 (sec) , antiderivative size = 380, normalized size of antiderivative = 2.30 \[ \int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx=\frac {{\left (4 \, {\left (n^{4} + 10 \, n^{3} + 35 \, n^{2} + 50 \, n + 24\right )} b^{5} x^{5} - 3 i \, \pi ^{5} + 30 \, \pi ^{4} a + 120 i \, \pi ^{3} a^{2} - 240 \, \pi ^{2} a^{3} - 240 i \, \pi a^{4} + 96 \, a^{5} - 2 \, {\left (i \, \pi {\left (n^{4} + 6 \, n^{3} + 11 \, n^{2} + 6 \, n\right )} b^{4} - 2 \, {\left (n^{4} + 6 \, n^{3} + 11 \, n^{2} + 6 \, n\right )} a b^{4}\right )} x^{4} + 4 \, {\left (\pi ^{2} {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} b^{3} + 4 i \, \pi {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} a b^{3} - 4 \, {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} a^{2} b^{3}\right )} x^{3} - 6 \, {\left (-i \, \pi ^{3} {\left (n^{2} + n\right )} b^{2} + 6 \, \pi ^{2} {\left (n^{2} + n\right )} a b^{2} + 12 i \, \pi {\left (n^{2} + n\right )} a^{2} b^{2} - 8 \, {\left (n^{2} + n\right )} a^{3} b^{2}\right )} x^{2} - 6 \, {\left (\pi ^{4} b n + 8 i \, \pi ^{3} a b n - 24 \, \pi ^{2} a^{2} b n - 32 i \, \pi a^{3} b n + 16 \, a^{4} b n\right )} x\right )} {\left (\cosh \left (-n \log \left (-i \, \pi + 2 \, b x + 2 \, a\right )\right ) - \sinh \left (-n \log \left (-i \, \pi + 2 \, b x + 2 \, a\right )\right )\right )}}{{\left (2^{n + 2} n^{5} + 15 \cdot 2^{n + 2} n^{4} + 85 \cdot 2^{n + 2} n^{3} + 225 \cdot 2^{n + 2} n^{2} + 137 \cdot 2^{n + 3} n + 15 \cdot 2^{n + 5}\right )} b^{5}} \]

input
integrate(x^4*arccoth(tanh(b*x+a))^n,x, algorithm="maxima")
 
output
(4*(n^4 + 10*n^3 + 35*n^2 + 50*n + 24)*b^5*x^5 - 3*I*pi^5 + 30*pi^4*a + 12 
0*I*pi^3*a^2 - 240*pi^2*a^3 - 240*I*pi*a^4 + 96*a^5 - 2*(I*pi*(n^4 + 6*n^3 
 + 11*n^2 + 6*n)*b^4 - 2*(n^4 + 6*n^3 + 11*n^2 + 6*n)*a*b^4)*x^4 + 4*(pi^2 
*(n^3 + 3*n^2 + 2*n)*b^3 + 4*I*pi*(n^3 + 3*n^2 + 2*n)*a*b^3 - 4*(n^3 + 3*n 
^2 + 2*n)*a^2*b^3)*x^3 - 6*(-I*pi^3*(n^2 + n)*b^2 + 6*pi^2*(n^2 + n)*a*b^2 
 + 12*I*pi*(n^2 + n)*a^2*b^2 - 8*(n^2 + n)*a^3*b^2)*x^2 - 6*(pi^4*b*n + 8* 
I*pi^3*a*b*n - 24*pi^2*a^2*b*n - 32*I*pi*a^3*b*n + 16*a^4*b*n)*x)*(cosh(-n 
*log(-I*pi + 2*b*x + 2*a)) - sinh(-n*log(-I*pi + 2*b*x + 2*a)))/((2^(n + 2 
)*n^5 + 15*2^(n + 2)*n^4 + 85*2^(n + 2)*n^3 + 225*2^(n + 2)*n^2 + 137*2^(n 
 + 3)*n + 15*2^(n + 5))*b^5)
 
3.2.85.8 Giac [F]

\[ \int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx=\int { x^{4} \operatorname {arcoth}\left (\tanh \left (b x + a\right )\right )^{n} \,d x } \]

input
integrate(x^4*arccoth(tanh(b*x+a))^n,x, algorithm="giac")
 
output
integrate(x^4*arccoth(tanh(b*x + a))^n, x)
 
3.2.85.9 Mupad [B] (verification not implemented)

Time = 4.82 (sec) , antiderivative size = 546, normalized size of antiderivative = 3.31 \[ \int x^4 \coth ^{-1}(\tanh (a+b x))^n \, dx=-{\left (\frac {\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )}{2}-\frac {\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )}{2}\right )}^n\,\left (\frac {3\,{\left (\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+2\,b\,x\right )}^5}{4\,b^5\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )}-\frac {x^5\,\left (n^4+10\,n^3+35\,n^2+50\,n+24\right )}{n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120}+\frac {3\,n\,x\,{\left (\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+2\,b\,x\right )}^4}{2\,b^4\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )}+\frac {n\,x^4\,\left (\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+2\,b\,x\right )\,\left (n^3+6\,n^2+11\,n+6\right )}{2\,b\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )}+\frac {3\,n\,x^2\,\left (n+1\right )\,{\left (\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+2\,b\,x\right )}^3}{2\,b^3\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )}+\frac {n\,x^3\,{\left (\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+2\,b\,x\right )}^2\,\left (n^2+3\,n+2\right )}{b^2\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )}\right ) \]

input
int(x^4*acoth(tanh(a + b*x))^n,x)
 
output
-(log((2*exp(2*a)*exp(2*b*x))/(exp(2*a)*exp(2*b*x) - 1))/2 - log(-2/(exp(2 
*a)*exp(2*b*x) - 1))/2)^n*((3*(log(-2/(exp(2*a)*exp(2*b*x) - 1)) - log((2* 
exp(2*a)*exp(2*b*x))/(exp(2*a)*exp(2*b*x) - 1)) + 2*b*x)^5)/(4*b^5*(274*n 
+ 225*n^2 + 85*n^3 + 15*n^4 + n^5 + 120)) - (x^5*(50*n + 35*n^2 + 10*n^3 + 
 n^4 + 24))/(274*n + 225*n^2 + 85*n^3 + 15*n^4 + n^5 + 120) + (3*n*x*(log( 
-2/(exp(2*a)*exp(2*b*x) - 1)) - log((2*exp(2*a)*exp(2*b*x))/(exp(2*a)*exp( 
2*b*x) - 1)) + 2*b*x)^4)/(2*b^4*(274*n + 225*n^2 + 85*n^3 + 15*n^4 + n^5 + 
 120)) + (n*x^4*(log(-2/(exp(2*a)*exp(2*b*x) - 1)) - log((2*exp(2*a)*exp(2 
*b*x))/(exp(2*a)*exp(2*b*x) - 1)) + 2*b*x)*(11*n + 6*n^2 + n^3 + 6))/(2*b* 
(274*n + 225*n^2 + 85*n^3 + 15*n^4 + n^5 + 120)) + (3*n*x^2*(n + 1)*(log(- 
2/(exp(2*a)*exp(2*b*x) - 1)) - log((2*exp(2*a)*exp(2*b*x))/(exp(2*a)*exp(2 
*b*x) - 1)) + 2*b*x)^3)/(2*b^3*(274*n + 225*n^2 + 85*n^3 + 15*n^4 + n^5 + 
120)) + (n*x^3*(log(-2/(exp(2*a)*exp(2*b*x) - 1)) - log((2*exp(2*a)*exp(2* 
b*x))/(exp(2*a)*exp(2*b*x) - 1)) + 2*b*x)^2*(3*n + n^2 + 2))/(b^2*(274*n + 
 225*n^2 + 85*n^3 + 15*n^4 + n^5 + 120)))