\(\int \coth ^2(x) (a+b \tanh ^2(x))^{3/2} \, dx\) [224]

Optimal result
Mathematica [C] (verified)
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 = 77 \[ \int \coth ^2(x) \left (a+b \tanh ^2(x)\right )^{3/2} \, dx=-b^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )+(a+b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )-a \coth (x) \sqrt {a+b \tanh ^2(x)} \] Output:

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

Mathematica [C] (verified)

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

Time = 1.93 (sec) , antiderivative size = 197, normalized size of antiderivative = 2.56 \[ \int \coth ^2(x) \left (a+b \tanh ^2(x)\right )^{3/2} \, dx=-\frac {a \left ((a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)-\sqrt {2} (a+2 b) \sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}}}{\sqrt {2}}\right ),1\right )+\sqrt {2} (a+b) \sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}} \operatorname {EllipticPi}\left (\frac {b}{a+b},\arcsin \left (\frac {\sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}}}{\sqrt {2}}\right ),1\right )\right ) \tanh (x)}{\sqrt {2} \sqrt {(a-b+(a+b) \cosh (2 x)) \text {sech}^2(x)}} \] Input:

Integrate[Coth[x]^2*(a + b*Tanh[x]^2)^(3/2),x]
 

Output:

-((a*((a - b + (a + b)*Cosh[2*x])*Csch[x]^2 - Sqrt[2]*(a + 2*b)*Sqrt[((a - 
 b + (a + b)*Cosh[2*x])*Csch[x]^2)/b]*EllipticF[ArcSin[Sqrt[((a - b + (a + 
 b)*Cosh[2*x])*Csch[x]^2)/b]/Sqrt[2]], 1] + Sqrt[2]*(a + b)*Sqrt[((a - b + 
 (a + b)*Cosh[2*x])*Csch[x]^2)/b]*EllipticPi[b/(a + b), ArcSin[Sqrt[((a - 
b + (a + b)*Cosh[2*x])*Csch[x]^2)/b]/Sqrt[2]], 1])*Tanh[x])/(Sqrt[2]*Sqrt[ 
(a - b + (a + b)*Cosh[2*x])*Sech[x]^2]))
 

Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.588, Rules used = {3042, 25, 4153, 25, 376, 398, 224, 219, 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 ^2(x) \left (a+b \tanh ^2(x)\right )^{3/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\left (a-b \tan (i x)^2\right )^{3/2}}{\tan (i x)^2}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\left (a-b \tan (i x)^2\right )^{3/2}}{\tan (i x)^2}dx\)

\(\Big \downarrow \) 4153

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 376

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

\(\Big \downarrow \) 398

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

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

\(\Big \downarrow \) 291

\(\displaystyle (a+b)^2 \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}}-b^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )-a \coth (x) \sqrt {a+b \tanh ^2(x)}\)

\(\Big \downarrow \) 219

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

Input:

Int[Coth[x]^2*(a + b*Tanh[x]^2)^(3/2),x]
 

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], 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 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 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 376
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_) 
, x_Symbol] :> Simp[c*(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1 
)/(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 - 2)*Simp[c*(b*c - a*d)*(m + 1) + 2*c*(b*c*(p + 1) + a* 
d*(q - 1)) + d*((b*c - a*d)*(m + 1) + 2*b*c*(p + q))*x^2, x], x], x] /; Fre 
eQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && GtQ[q, 1] && LtQ[m, -1] & 
& IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
 

rule 398
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]) 
, x_Symbol] :> Simp[f/b   Int[1/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/ 
b   Int[1/((a + b*x^2)*Sqrt[c + d*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f} 
, x]
 

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 )^{2} \left (a +b \tanh \left (x \right )^{2}\right )^{\frac {3}{2}}d x\]

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 634 vs. \(2 (63) = 126\).

Time = 0.24 (sec) , antiderivative size = 3913, normalized size of antiderivative = 50.82 \[ \int \coth ^2(x) \left (a+b \tanh ^2(x)\right )^{3/2} \, dx=\text {Too large to display} \] Input:

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

Output:

Too large to include
 

Sympy [F]

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

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

Output:

Integral((a + b*tanh(x)**2)**(3/2)*coth(x)**2, x)
 

Maxima [F]

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

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

Output:

integrate((b*tanh(x)^2 + a)^(3/2)*coth(x)^2, x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 430 vs. \(2 (63) = 126\).

Time = 0.71 (sec) , antiderivative size = 430, normalized size of antiderivative = 5.58 \[ \int \coth ^2(x) \left (a+b \tanh ^2(x)\right )^{3/2} \, dx=-\frac {2 \, b^{2} \arctan \left (-\frac {\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b}}{2 \, \sqrt {-b}}\right )}{\sqrt {-b}} - \frac {1}{2} \, {\left (a + b\right )}^{\frac {3}{2}} \log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b} \right |}\right ) + \frac {1}{2} \, {\left (a + b\right )}^{\frac {3}{2}} \log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} - \sqrt {a + b} \right |}\right ) - \frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left ({\left | -{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} {\left (a + b\right )} - \sqrt {a + b} {\left (a - b\right )} \right |}\right )}{2 \, \sqrt {a + b}} + \frac {4 \, {\left ({\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} a^{2} + \sqrt {a + b} a^{2}\right )}}{{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )}^{2} - 2 \, {\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} \sqrt {a + b} - 3 \, a + b} \] Input:

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

Output:

-2*b^2*arctan(-1/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))/sqrt(-b))/sqrt(-b) - 1/2*(a 
 + b)^(3/2)*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*(a + b)^(3/2)*log(a 
bs(-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*(a^2 + 2*a*b + b^2)*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)))/sqrt(a + b) + 4*((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^2 
+ sqrt(a + b)*a^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 - 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)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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