\(\int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx\) [217]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [F]
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [B] (verification not implemented)
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 17, antiderivative size = 78 \[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )-\frac {(3 a+b) \coth (x) \sqrt {a+b \tanh ^2(x)}}{3 a}-\frac {1}{3} \coth ^3(x) \sqrt {a+b \tanh ^2(x)} \] Output:

(a+b)^(1/2)*arctanh((a+b)^(1/2)*tanh(x)/(a+b*tanh(x)^2)^(1/2))-1/3*(3*a+b) 
*coth(x)*(a+b*tanh(x)^2)^(1/2)/a-1/3*coth(x)^3*(a+b*tanh(x)^2)^(1/2)
 

Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 4.47 (sec) , antiderivative size = 161, normalized size of antiderivative = 2.06 \[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\frac {\cosh ^4(x) \coth ^3(x) \left (1+\frac {b \tanh ^2(x)}{a}\right ) \left (-\frac {\text {sech}^4(x) \left (\arcsin \left (\sqrt {-\frac {(a+b) \sinh ^2(x)}{a}}\right ) \sqrt {-\frac {(a+b) \sinh ^2(x)}{a}}+\sqrt {\cosh ^2(x)+\frac {b \sinh ^2(x)}{a}}\right ) \left (a-2 b \tanh ^2(x)\right )}{\sqrt {\cosh ^2(x)+\frac {b \sinh ^2(x)}{a}}}-\frac {4 (a+b) \operatorname {Hypergeometric2F1}\left (2,2,\frac {3}{2},-\frac {(a+b) \sinh ^2(x)}{a}\right ) \left (a \tanh (x)+b \tanh ^3(x)\right )^2}{a^2}\right )}{3 \sqrt {a+b \tanh ^2(x)}} \] Input:

Integrate[Coth[x]^4*Sqrt[a + b*Tanh[x]^2],x]
 

Output:

(Cosh[x]^4*Coth[x]^3*(1 + (b*Tanh[x]^2)/a)*(-((Sech[x]^4*(ArcSin[Sqrt[-((( 
a + b)*Sinh[x]^2)/a)]]*Sqrt[-(((a + b)*Sinh[x]^2)/a)] + Sqrt[Cosh[x]^2 + ( 
b*Sinh[x]^2)/a])*(a - 2*b*Tanh[x]^2))/Sqrt[Cosh[x]^2 + (b*Sinh[x]^2)/a]) - 
 (4*(a + b)*Hypergeometric2F1[2, 2, 3/2, -(((a + b)*Sinh[x]^2)/a)]*(a*Tanh 
[x] + b*Tanh[x]^3)^2)/a^2))/(3*Sqrt[a + b*Tanh[x]^2])
 

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {3042, 4153, 377, 445, 27, 291, 219}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {a-b \tan (i x)^2}}{\tan (i x)^4}dx\)

\(\Big \downarrow \) 4153

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

\(\Big \downarrow \) 377

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

\(\Big \downarrow \) 445

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 291

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

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{3} \left (3 \sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )-\frac {(3 a+b) \coth (x) \sqrt {a+b \tanh ^2(x)}}{a}\right )-\frac {1}{3} \coth ^3(x) \sqrt {a+b \tanh ^2(x)}\)

Input:

Int[Coth[x]^4*Sqrt[a + b*Tanh[x]^2],x]
 

Output:

-1/3*(Coth[x]^3*Sqrt[a + b*Tanh[x]^2]) + (3*Sqrt[a + b]*ArcTanh[(Sqrt[a + 
b]*Tanh[x])/Sqrt[a + b*Tanh[x]^2]] - ((3*a + b)*Coth[x]*Sqrt[a + b*Tanh[x] 
^2])/a)/3
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 377
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_) 
, x_Symbol] :> Simp[(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^q/(a*e*( 
m + 1))), x] - Simp[1/(a*e^2*(m + 1))   Int[(e*x)^(m + 2)*(a + b*x^2)^p*(c 
+ d*x^2)^(q - 1)*Simp[b*c*(m + 1) + 2*(b*c*(p + 1) + a*d*q) + d*(b*(m + 1) 
+ 2*b*(p + q + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b 
*c - a*d, 0] && LtQ[0, q, 1] && LtQ[m, -1] && IntBinomialQ[a, b, c, d, e, m 
, 2, p, q, x]
 

rule 445
Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_ 
.)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^2)^(p 
+ 1)*((c + d*x^2)^(q + 1)/(a*c*g*(m + 1))), x] + Simp[1/(a*c*g^2*(m + 1)) 
 Int[(g*x)^(m + 2)*(a + b*x^2)^p*(c + d*x^2)^q*Simp[a*f*c*(m + 1) - e*(b*c 
+ a*d)*(m + 2 + 1) - e*2*(b*c*p + a*d*q) - b*e*d*(m + 2*(p + q + 2) + 1)*x^ 
2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && LtQ[m, -1]
 

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

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
Maple [F]

\[\int \coth \left (x \right )^{4} \sqrt {a +b \tanh \left (x \right )^{2}}d x\]

Input:

int(coth(x)^4*(a+b*tanh(x)^2)^(1/2),x)
 

Output:

int(coth(x)^4*(a+b*tanh(x)^2)^(1/2),x)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 828 vs. \(2 (64) = 128\).

Time = 0.19 (sec) , antiderivative size = 2285, normalized size of antiderivative = 29.29 \[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\text {Too large to display} \] Input:

integrate(coth(x)^4*(a+b*tanh(x)^2)^(1/2),x, algorithm="fricas")
 

Output:

[1/12*(3*(a*cosh(x)^6 + 6*a*cosh(x)*sinh(x)^5 + a*sinh(x)^6 - 3*a*cosh(x)^ 
4 + 3*(5*a*cosh(x)^2 - a)*sinh(x)^4 + 4*(5*a*cosh(x)^3 - 3*a*cosh(x))*sinh 
(x)^3 + 3*a*cosh(x)^2 + 3*(5*a*cosh(x)^4 - 6*a*cosh(x)^2 + a)*sinh(x)^2 + 
6*(a*cosh(x)^5 - 2*a*cosh(x)^3 + a*cosh(x))*sinh(x) - a)*sqrt(a + b)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*b^2)*cosh(x))*sinh(x))*sqrt(a 
+ b)*sqrt(((a + b)*cosh(x)^2 + (a + b)*sinh(x)^2 + a - b)/(cosh(x)^2 - ...
 

Sympy [F]

\[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\int \sqrt {a + b \tanh ^{2}{\left (x \right )}} \coth ^{4}{\left (x \right )}\, dx \] Input:

integrate(coth(x)**4*(a+b*tanh(x)**2)**(1/2),x)
 

Output:

Integral(sqrt(a + b*tanh(x)**2)*coth(x)**4, x)
 

Maxima [F]

\[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\int { \sqrt {b \tanh \left (x\right )^{2} + a} \coth \left (x\right )^{4} \,d x } \] Input:

integrate(coth(x)^4*(a+b*tanh(x)^2)^(1/2),x, algorithm="maxima")
 

Output:

integrate(sqrt(b*tanh(x)^2 + a)*coth(x)^4, x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 629 vs. \(2 (64) = 128\).

Time = 0.59 (sec) , antiderivative size = 629, normalized size of antiderivative = 8.06 \[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx =\text {Too large to display} \] Input:

integrate(coth(x)^4*(a+b*tanh(x)^2)^(1/2),x, algorithm="giac")
 

Output:

-1/2*sqrt(a + b)*log(abs(-(sqrt(a + b)*e^(2*x) - sqrt(a*e^(4*x) + b*e^(4*x 
) + 2*a*e^(2*x) - 2*b*e^(2*x) + a + b))*(a + b) - sqrt(a + b)*(a - b))) - 
1/2*sqrt(a + b)*log(abs(-sqrt(a + b)*e^(2*x) + sqrt(a*e^(4*x) + b*e^(4*x) 
+ 2*a*e^(2*x) - 2*b*e^(2*x) + a + b) + sqrt(a + b))) + 1/2*sqrt(a + b)*log 
(abs(-sqrt(a + b)*e^(2*x) + sqrt(a*e^(4*x) + b*e^(4*x) + 2*a*e^(2*x) - 2*b 
*e^(2*x) + a + b) - sqrt(a + b))) + 4/3*(3*(sqrt(a + b)*e^(2*x) - sqrt(a*e 
^(4*x) + b*e^(4*x) + 2*a*e^(2*x) - 2*b*e^(2*x) + a + b))^5*(2*a + b) - 3*( 
sqrt(a + b)*e^(2*x) - sqrt(a*e^(4*x) + b*e^(4*x) + 2*a*e^(2*x) - 2*b*e^(2* 
x) + a + b))^4*(2*a + 3*b)*sqrt(a + b) - 2*(10*a^2 + 3*a*b - 3*b^2)*(sqrt( 
a + b)*e^(2*x) - sqrt(a*e^(4*x) + b*e^(4*x) + 2*a*e^(2*x) - 2*b*e^(2*x) + 
a + b))^3 + 6*(6*a^2 + 3*a*b + b^2)*(sqrt(a + b)*e^(2*x) - sqrt(a*e^(4*x) 
+ b*e^(4*x) + 2*a*e^(2*x) - 2*b*e^(2*x) + a + b))^2*sqrt(a + b) + 3*(26*a^ 
3 + 9*a^2*b - 4*a*b^2 - 3*b^3)*(sqrt(a + b)*e^(2*x) - sqrt(a*e^(4*x) + b*e 
^(4*x) + 2*a*e^(2*x) - 2*b*e^(2*x) + a + b)) + (34*a^3 - 17*a^2*b + 3*b^3) 
*sqrt(a + b))/((sqrt(a + b)*e^(2*x) - sqrt(a*e^(4*x) + b*e^(4*x) + 2*a*e^( 
2*x) - 2*b*e^(2*x) + a + b))^2 - 2*(sqrt(a + b)*e^(2*x) - sqrt(a*e^(4*x) + 
 b*e^(4*x) + 2*a*e^(2*x) - 2*b*e^(2*x) + a + b))*sqrt(a + b) - 3*a + b)^3
 

Mupad [F(-1)]

Timed out. \[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\int {\mathrm {coth}\left (x\right )}^4\,\sqrt {b\,{\mathrm {tanh}\left (x\right )}^2+a} \,d x \] Input:

int(coth(x)^4*(a + b*tanh(x)^2)^(1/2),x)
 

Output:

int(coth(x)^4*(a + b*tanh(x)^2)^(1/2), x)
 

Reduce [F]

\[ \int \coth ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\int \sqrt {\tanh \left (x \right )^{2} b +a}\, \coth \left (x \right )^{4}d x \] Input:

int(coth(x)^4*(a+b*tanh(x)^2)^(1/2),x)
 

Output:

int(sqrt(tanh(x)**2*b + a)*coth(x)**4,x)