### 3.651 $$\int \frac{1}{(a \coth (x)+b \text{csch}(x))^3} \, dx$$

Optimal. Leaf size=50 $\frac{a^2-b^2}{2 a^3 (a \cosh (x)+b)^2}+\frac{2 b}{a^3 (a \cosh (x)+b)}+\frac{\log (a \cosh (x)+b)}{a^3}$

[Out]

(a^2 - b^2)/(2*a^3*(b + a*Cosh[x])^2) + (2*b)/(a^3*(b + a*Cosh[x])) + Log[b + a*Cosh[x]]/a^3

________________________________________________________________________________________

Rubi [A]  time = 0.107477, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.273, Rules used = {4392, 2668, 697} $\frac{a^2-b^2}{2 a^3 (a \cosh (x)+b)^2}+\frac{2 b}{a^3 (a \cosh (x)+b)}+\frac{\log (a \cosh (x)+b)}{a^3}$

Antiderivative was successfully veriﬁed.

[In]

Int[(a*Coth[x] + b*Csch[x])^(-3),x]

[Out]

(a^2 - b^2)/(2*a^3*(b + a*Cosh[x])^2) + (2*b)/(a^3*(b + a*Cosh[x])) + Log[b + a*Cosh[x]]/a^3

Rule 4392

Int[(cot[(c_.) + (d_.)*(x_)]^(n_.)*(a_.) + csc[(c_.) + (d_.)*(x_)]^(n_.)*(b_.))^(p_)*(u_.), x_Symbol] :> Int[A
ctivateTrig[u]*Csc[c + d*x]^(n*p)*(b + a*Cos[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{1}{(a \coth (x)+b \text{csch}(x))^3} \, dx &=-\left (i \int \frac{\sinh ^3(x)}{(i b+i a \cosh (x))^3} \, dx\right )\\ &=-\frac{\operatorname{Subst}\left (\int \frac{-a^2-x^2}{(i b+x)^3} \, dx,x,i a \cosh (x)\right )}{a^3}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{-a^2+b^2}{(i b+x)^3}+\frac{2 i b}{(i b+x)^2}-\frac{1}{i b+x}\right ) \, dx,x,i a \cosh (x)\right )}{a^3}\\ &=\frac{a^2-b^2}{2 a^3 (b+a \cosh (x))^2}+\frac{2 b}{a^3 (b+a \cosh (x))}+\frac{\log (b+a \cosh (x))}{a^3}\\ \end{align*}

Mathematica [A]  time = 0.107567, size = 77, normalized size = 1.54 $\frac{a^2 \cosh (2 x) \log (a \cosh (x)+b)+a^2 \log (a \cosh (x)+b)+a^2+2 b^2 \log (a \cosh (x)+b)+4 a b \cosh (x) (\log (a \cosh (x)+b)+1)+3 b^2}{2 a^3 (a \cosh (x)+b)^2}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(a*Coth[x] + b*Csch[x])^(-3),x]

[Out]

(a^2 + 3*b^2 + a^2*Log[b + a*Cosh[x]] + 2*b^2*Log[b + a*Cosh[x]] + a^2*Cosh[2*x]*Log[b + a*Cosh[x]] + 4*a*b*Co
sh[x]*(1 + Log[b + a*Cosh[x]]))/(2*a^3*(b + a*Cosh[x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.055, size = 144, normalized size = 2.9 \begin{align*} -{\frac{1}{{a}^{3}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-2\,{\frac{1}{{a}^{2} \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}- \left ( \tanh \left ( x/2 \right ) \right ) ^{2}b+a+b \right ) }}+2\,{\frac{1}{ \left ( a-b \right ) \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}- \left ( \tanh \left ( x/2 \right ) \right ) ^{2}b+a+b \right ) ^{2}}}+2\,{\frac{b}{a \left ( a-b \right ) \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}- \left ( \tanh \left ( x/2 \right ) \right ) ^{2}b+a+b \right ) ^{2}}}+{\frac{1}{{a}^{3}}\ln \left ( a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b+a+b \right ) }-{\frac{1}{{a}^{3}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a*coth(x)+b*csch(x))^3,x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.06751, size = 150, normalized size = 3. \begin{align*} \frac{2 \,{\left (2 \, a b e^{\left (-x\right )} + 2 \, a b e^{\left (-3 \, x\right )} +{\left (a^{2} + 3 \, b^{2}\right )} e^{\left (-2 \, x\right )}\right )}}{4 \, a^{4} b e^{\left (-x\right )} + 4 \, a^{4} b e^{\left (-3 \, x\right )} + a^{5} e^{\left (-4 \, x\right )} + a^{5} + 2 \,{\left (a^{5} + 2 \, a^{3} b^{2}\right )} e^{\left (-2 \, x\right )}} + \frac{x}{a^{3}} + \frac{\log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a^{3}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(2*a*b*e^(-x) + 2*a*b*e^(-3*x) + (a^2 + 3*b^2)*e^(-2*x))/(4*a^4*b*e^(-x) + 4*a^4*b*e^(-3*x) + a^5*e^(-4*x) +
a^5 + 2*(a^5 + 2*a^3*b^2)*e^(-2*x)) + x/a^3 + log(2*b*e^(-x) + a*e^(-2*x) + a)/a^3

________________________________________________________________________________________

Fricas [B]  time = 2.1715, size = 1362, normalized size = 27.24 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(a^2*x*cosh(x)^4 + a^2*x*sinh(x)^4 + 4*(a*b*x - a*b)*cosh(x)^3 + 4*(a^2*x*cosh(x) + a*b*x - a*b)*sinh(x)^3 +
a^2*x - 2*(a^2 + 3*b^2 - (a^2 + 2*b^2)*x)*cosh(x)^2 + 2*(3*a^2*x*cosh(x)^2 - a^2 - 3*b^2 + (a^2 + 2*b^2)*x + 6
*(a*b*x - a*b)*cosh(x))*sinh(x)^2 + 4*(a*b*x - a*b)*cosh(x) - (a^2*cosh(x)^4 + a^2*sinh(x)^4 + 4*a*b*cosh(x)^3
+ 4*(a^2*cosh(x) + a*b)*sinh(x)^3 + 4*a*b*cosh(x) + 2*(a^2 + 2*b^2)*cosh(x)^2 + 2*(3*a^2*cosh(x)^2 + 6*a*b*co
sh(x) + a^2 + 2*b^2)*sinh(x)^2 + a^2 + 4*(a^2*cosh(x)^3 + 3*a*b*cosh(x)^2 + a*b + (a^2 + 2*b^2)*cosh(x))*sinh(
x))*log(2*(a*cosh(x) + b)/(cosh(x) - sinh(x))) + 4*(a^2*x*cosh(x)^3 + a*b*x + 3*(a*b*x - a*b)*cosh(x)^2 - a*b
- (a^2 + 3*b^2 - (a^2 + 2*b^2)*x)*cosh(x))*sinh(x))/(a^5*cosh(x)^4 + a^5*sinh(x)^4 + 4*a^4*b*cosh(x)^3 + 4*a^4
*b*cosh(x) + a^5 + 4*(a^5*cosh(x) + a^4*b)*sinh(x)^3 + 2*(a^5 + 2*a^3*b^2)*cosh(x)^2 + 2*(3*a^5*cosh(x)^2 + 6*
a^4*b*cosh(x) + a^5 + 2*a^3*b^2)*sinh(x)^2 + 4*(a^5*cosh(x)^3 + 3*a^4*b*cosh(x)^2 + a^4*b + (a^5 + 2*a^3*b^2)*
cosh(x))*sinh(x))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\left (a \coth{\left (x \right )} + b \operatorname{csch}{\left (x \right )}\right )^{3}}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*coth(x)+b*csch(x))**3,x)

[Out]

Integral((a*coth(x) + b*csch(x))**(-3), x)

________________________________________________________________________________________

Giac [A]  time = 1.16278, size = 89, normalized size = 1.78 \begin{align*} \frac{\log \left ({\left | a{\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a^{3}} - \frac{3 \, a{\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 4 \, b{\left (e^{\left (-x\right )} + e^{x}\right )} - 4 \, a}{2 \,{\left (a{\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b\right )}^{2} a^{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(abs(a*(e^(-x) + e^x) + 2*b))/a^3 - 1/2*(3*a*(e^(-x) + e^x)^2 + 4*b*(e^(-x) + e^x) - 4*a)/((a*(e^(-x) + e^x
) + 2*b)^2*a^2)