\(\int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx\) [94]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 57 \[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {b \left (a^2+b^2\right ) \log (b+a \sinh (x))}{a^4}+\frac {\left (a^2+b^2\right ) \sinh (x)}{a^3}-\frac {b \sinh ^2(x)}{2 a^2}+\frac {\sinh ^3(x)}{3 a} \]

[Out]

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

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3957, 2916, 12, 786} \[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {b \sinh ^2(x)}{2 a^2}-\frac {b \left (a^2+b^2\right ) \log (a \sinh (x)+b)}{a^4}+\frac {\left (a^2+b^2\right ) \sinh (x)}{a^3}+\frac {\sinh ^3(x)}{3 a} \]

[In]

Int[Cosh[x]^3/(a + b*Csch[x]),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 786

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

Rule 2916

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.98 \[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=\frac {-6 b \left (a^2+b^2\right ) \log (b+a \sinh (x))+6 a \left (a^2+b^2\right ) \sinh (x)-3 a^2 b \sinh ^2(x)+2 a^3 \sinh ^3(x)}{6 a^4} \]

[In]

Integrate[Cosh[x]^3/(a + b*Csch[x]),x]

[Out]

(-6*b*(a^2 + b^2)*Log[b + a*Sinh[x]] + 6*a*(a^2 + b^2)*Sinh[x] - 3*a^2*b*Sinh[x]^2 + 2*a^3*Sinh[x]^3)/(6*a^4)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(135\) vs. \(2(53)=106\).

Time = 14.75 (sec) , antiderivative size = 136, normalized size of antiderivative = 2.39

method result size
risch \(\frac {b x}{a^{2}}+\frac {b^{3} x}{a^{4}}+\frac {{\mathrm e}^{3 x}}{24 a}-\frac {b \,{\mathrm e}^{2 x}}{8 a^{2}}+\frac {3 \,{\mathrm e}^{x}}{8 a}+\frac {{\mathrm e}^{x} b^{2}}{2 a^{3}}-\frac {3 \,{\mathrm e}^{-x}}{8 a}-\frac {{\mathrm e}^{-x} b^{2}}{2 a^{3}}-\frac {b \,{\mathrm e}^{-2 x}}{8 a^{2}}-\frac {{\mathrm e}^{-3 x}}{24 a}-\frac {b \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}-1\right )}{a^{2}}-\frac {b^{3} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}-1\right )}{a^{4}}\) \(136\)
default \(\frac {2 b \left (-\frac {a^{2}}{2}-\frac {b^{2}}{2}\right ) \ln \left (-\tanh \left (\frac {x}{2}\right )^{2} b +2 a \tanh \left (\frac {x}{2}\right )+b \right )}{a^{4}}-\frac {1}{3 a \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {-a +b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {2 a^{2}-a b +2 b^{2}}{2 a^{3} \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\left (a^{2}+b^{2}\right ) b \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a^{4}}-\frac {1}{3 a \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {a +b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {2 a^{2}+a b +2 b^{2}}{2 a^{3} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (a^{2}+b^{2}\right ) b \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a^{4}}\) \(191\)

[In]

int(cosh(x)^3/(a+b*csch(x)),x,method=_RETURNVERBOSE)

[Out]

b*x/a^2+1/a^4*b^3*x+1/24/a*exp(3*x)-1/8/a^2*b*exp(2*x)+3/8/a*exp(x)+1/2/a^3*exp(x)*b^2-3/8/a*exp(-x)-1/2/a^3*e
xp(-x)*b^2-1/8/a^2*b*exp(-2*x)-1/24/a*exp(-3*x)-1/a^2*b*ln(exp(2*x)+2*b/a*exp(x)-1)-1/a^4*b^3*ln(exp(2*x)+2*b/
a*exp(x)-1)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 476 vs. \(2 (53) = 106\).

Time = 0.26 (sec) , antiderivative size = 476, normalized size of antiderivative = 8.35 \[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=\frac {a^{3} \cosh \left (x\right )^{6} + a^{3} \sinh \left (x\right )^{6} - 3 \, a^{2} b \cosh \left (x\right )^{5} + 3 \, {\left (2 \, a^{3} \cosh \left (x\right ) - a^{2} b\right )} \sinh \left (x\right )^{5} + 24 \, {\left (a^{2} b + b^{3}\right )} x \cosh \left (x\right )^{3} + 3 \, {\left (3 \, a^{3} + 4 \, a b^{2}\right )} \cosh \left (x\right )^{4} + 3 \, {\left (5 \, a^{3} \cosh \left (x\right )^{2} - 5 \, a^{2} b \cosh \left (x\right ) + 3 \, a^{3} + 4 \, a b^{2}\right )} \sinh \left (x\right )^{4} - 3 \, a^{2} b \cosh \left (x\right ) + 2 \, {\left (10 \, a^{3} \cosh \left (x\right )^{3} - 15 \, a^{2} b \cosh \left (x\right )^{2} + 12 \, {\left (a^{2} b + b^{3}\right )} x + 6 \, {\left (3 \, a^{3} + 4 \, a b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} - a^{3} - 3 \, {\left (3 \, a^{3} + 4 \, a b^{2}\right )} \cosh \left (x\right )^{2} + 3 \, {\left (5 \, a^{3} \cosh \left (x\right )^{4} - 10 \, a^{2} b \cosh \left (x\right )^{3} - 3 \, a^{3} - 4 \, a b^{2} + 24 \, {\left (a^{2} b + b^{3}\right )} x \cosh \left (x\right ) + 6 \, {\left (3 \, a^{3} + 4 \, a b^{2}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} - 24 \, {\left ({\left (a^{2} b + b^{3}\right )} \cosh \left (x\right )^{3} + 3 \, {\left (a^{2} b + b^{3}\right )} \cosh \left (x\right )^{2} \sinh \left (x\right ) + 3 \, {\left (a^{2} b + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} + {\left (a^{2} b + b^{3}\right )} \sinh \left (x\right )^{3}\right )} \log \left (\frac {2 \, {\left (a \sinh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 3 \, {\left (2 \, a^{3} \cosh \left (x\right )^{5} - 5 \, a^{2} b \cosh \left (x\right )^{4} + 24 \, {\left (a^{2} b + b^{3}\right )} x \cosh \left (x\right )^{2} + 4 \, {\left (3 \, a^{3} + 4 \, a b^{2}\right )} \cosh \left (x\right )^{3} - a^{2} b - 2 \, {\left (3 \, a^{3} + 4 \, a b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{24 \, {\left (a^{4} \cosh \left (x\right )^{3} + 3 \, a^{4} \cosh \left (x\right )^{2} \sinh \left (x\right ) + 3 \, a^{4} \cosh \left (x\right ) \sinh \left (x\right )^{2} + a^{4} \sinh \left (x\right )^{3}\right )}} \]

[In]

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

[Out]

1/24*(a^3*cosh(x)^6 + a^3*sinh(x)^6 - 3*a^2*b*cosh(x)^5 + 3*(2*a^3*cosh(x) - a^2*b)*sinh(x)^5 + 24*(a^2*b + b^
3)*x*cosh(x)^3 + 3*(3*a^3 + 4*a*b^2)*cosh(x)^4 + 3*(5*a^3*cosh(x)^2 - 5*a^2*b*cosh(x) + 3*a^3 + 4*a*b^2)*sinh(
x)^4 - 3*a^2*b*cosh(x) + 2*(10*a^3*cosh(x)^3 - 15*a^2*b*cosh(x)^2 + 12*(a^2*b + b^3)*x + 6*(3*a^3 + 4*a*b^2)*c
osh(x))*sinh(x)^3 - a^3 - 3*(3*a^3 + 4*a*b^2)*cosh(x)^2 + 3*(5*a^3*cosh(x)^4 - 10*a^2*b*cosh(x)^3 - 3*a^3 - 4*
a*b^2 + 24*(a^2*b + b^3)*x*cosh(x) + 6*(3*a^3 + 4*a*b^2)*cosh(x)^2)*sinh(x)^2 - 24*((a^2*b + b^3)*cosh(x)^3 +
3*(a^2*b + b^3)*cosh(x)^2*sinh(x) + 3*(a^2*b + b^3)*cosh(x)*sinh(x)^2 + (a^2*b + b^3)*sinh(x)^3)*log(2*(a*sinh
(x) + b)/(cosh(x) - sinh(x))) + 3*(2*a^3*cosh(x)^5 - 5*a^2*b*cosh(x)^4 + 24*(a^2*b + b^3)*x*cosh(x)^2 + 4*(3*a
^3 + 4*a*b^2)*cosh(x)^3 - a^2*b - 2*(3*a^3 + 4*a*b^2)*cosh(x))*sinh(x))/(a^4*cosh(x)^3 + 3*a^4*cosh(x)^2*sinh(
x) + 3*a^4*cosh(x)*sinh(x)^2 + a^4*sinh(x)^3)

Sympy [F]

\[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=\int \frac {\cosh ^{3}{\left (x \right )}}{a + b \operatorname {csch}{\left (x \right )}}\, dx \]

[In]

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

[Out]

Integral(cosh(x)**3/(a + b*csch(x)), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (53) = 106\).

Time = 0.18 (sec) , antiderivative size = 127, normalized size of antiderivative = 2.23 \[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {{\left (3 \, a b e^{\left (-x\right )} - a^{2} - 3 \, {\left (3 \, a^{2} + 4 \, b^{2}\right )} e^{\left (-2 \, x\right )}\right )} e^{\left (3 \, x\right )}}{24 \, a^{3}} - \frac {3 \, a b e^{\left (-2 \, x\right )} + a^{2} e^{\left (-3 \, x\right )} + 3 \, {\left (3 \, a^{2} + 4 \, b^{2}\right )} e^{\left (-x\right )}}{24 \, a^{3}} - \frac {{\left (a^{2} b + b^{3}\right )} x}{a^{4}} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left (-2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} - a\right )}{a^{4}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.70 \[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=-\frac {a^{2} {\left (e^{\left (-x\right )} - e^{x}\right )}^{3} + 3 \, a b {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 12 \, a^{2} {\left (e^{\left (-x\right )} - e^{x}\right )} + 12 \, b^{2} {\left (e^{\left (-x\right )} - e^{x}\right )}}{24 \, a^{3}} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left ({\left | -a {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, b \right |}\right )}{a^{4}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 2.41 (sec) , antiderivative size = 121, normalized size of antiderivative = 2.12 \[ \int \frac {\cosh ^3(x)}{a+b \text {csch}(x)} \, dx=\frac {{\mathrm {e}}^{3\,x}}{24\,a}-\frac {{\mathrm {e}}^{-3\,x}}{24\,a}+\frac {x\,\left (a^2\,b+b^3\right )}{a^4}+\frac {{\mathrm {e}}^x\,\left (3\,a^2+4\,b^2\right )}{8\,a^3}-\frac {b\,{\mathrm {e}}^{-2\,x}}{8\,a^2}-\frac {b\,{\mathrm {e}}^{2\,x}}{8\,a^2}-\frac {\ln \left (2\,b\,{\mathrm {e}}^x-a+a\,{\mathrm {e}}^{2\,x}\right )\,\left (a^2\,b+b^3\right )}{a^4}-\frac {{\mathrm {e}}^{-x}\,\left (3\,a^2+4\,b^2\right )}{8\,a^3} \]

[In]

int(cosh(x)^3/(a + b/sinh(x)),x)

[Out]

exp(3*x)/(24*a) - exp(-3*x)/(24*a) + (x*(a^2*b + b^3))/a^4 + (exp(x)*(3*a^2 + 4*b^2))/(8*a^3) - (b*exp(-2*x))/
(8*a^2) - (b*exp(2*x))/(8*a^2) - (log(2*b*exp(x) - a + a*exp(2*x))*(a^2*b + b^3))/a^4 - (exp(-x)*(3*a^2 + 4*b^
2))/(8*a^3)