\(\int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx\) [106]

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

Optimal result

Integrand size = 11, antiderivative size = 25 \[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=\frac {\cosh ^5(x)}{5}-\frac {\sinh ^3(x)}{3}-\frac {\sinh ^5(x)}{5} \]

[Out]

1/5*cosh(x)^5-1/3*sinh(x)^3-1/5*sinh(x)^5

Rubi [A] (verified)

Time = 0.13 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.636, Rules used = {3599, 3187, 3186, 2645, 30, 2644, 14} \[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=-\frac {\sinh ^5(x)}{5}-\frac {\sinh ^3(x)}{3}+\frac {\cosh ^5(x)}{5} \]

[In]

Int[Cosh[x]^3/(1 + Coth[x]),x]

[Out]

Cosh[x]^5/5 - Sinh[x]^3/3 - Sinh[x]^5/5

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2644

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 3186

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 3187

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3599

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[Sin[e + f*x]^
m*((a*Cos[e + f*x] + b*Sin[e + f*x])^n/Cos[e + f*x]^n), x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

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

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.36 \[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=\frac {1}{120} (\cosh (x)-\sinh (x)) (20 \cosh (2 x)+4 \cosh (4 x)+10 \sinh (2 x)+\sinh (4 x)) \]

[In]

Integrate[Cosh[x]^3/(1 + Coth[x]),x]

[Out]

((Cosh[x] - Sinh[x])*(20*Cosh[2*x] + 4*Cosh[4*x] + 10*Sinh[2*x] + Sinh[4*x]))/120

Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.96

method result size
risch \(\frac {{\mathrm e}^{3 x}}{48}+\frac {{\mathrm e}^{x}}{8}+\frac {{\mathrm e}^{-3 x}}{24}+\frac {{\mathrm e}^{-5 x}}{80}\) \(24\)
parallelrisch \(\frac {\cosh \left (3 x \right )}{16}+\frac {\cosh \left (x \right )}{8}-\frac {\sinh \left (3 x \right )}{48}+\frac {\sinh \left (x \right )}{8}-\frac {2}{15}-\frac {\sinh \left (5 x \right )}{80}+\frac {\cosh \left (5 x \right )}{80}\) \(35\)
default \(-\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+1\right )^{4}}+\frac {2}{5 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{5}}+\frac {4}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {3}{8 \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {1}{6 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {3}{8 \left (\tanh \left (\frac {x}{2}\right )-1\right )}\) \(82\)

[In]

int(cosh(x)^3/(1+coth(x)),x,method=_RETURNVERBOSE)

[Out]

1/48*exp(3*x)+1/8*exp(x)+1/24*exp(-3*x)+1/80*exp(-5*x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 56 vs. \(2 (19) = 38\).

Time = 0.24 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.24 \[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=\frac {\cosh \left (x\right )^{4} + \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + {\left (6 \, \cosh \left (x\right )^{2} + 5\right )} \sinh \left (x\right )^{2} + 5 \, \cosh \left (x\right )^{2} + {\left (\cosh \left (x\right )^{3} + 5 \, \cosh \left (x\right )\right )} \sinh \left (x\right )}{30 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \]

[In]

integrate(cosh(x)^3/(1+coth(x)),x, algorithm="fricas")

[Out]

1/30*(cosh(x)^4 + cosh(x)*sinh(x)^3 + sinh(x)^4 + (6*cosh(x)^2 + 5)*sinh(x)^2 + 5*cosh(x)^2 + (cosh(x)^3 + 5*c
osh(x))*sinh(x))/(cosh(x) + sinh(x))

Sympy [F]

\[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=\int \frac {\cosh ^{3}{\left (x \right )}}{\coth {\left (x \right )} + 1}\, dx \]

[In]

integrate(cosh(x)**3/(1+coth(x)),x)

[Out]

Integral(cosh(x)**3/(coth(x) + 1), x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08 \[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=\frac {1}{48} \, {\left (6 \, e^{\left (-2 \, x\right )} + 1\right )} e^{\left (3 \, x\right )} + \frac {1}{24} \, e^{\left (-3 \, x\right )} + \frac {1}{80} \, e^{\left (-5 \, x\right )} \]

[In]

integrate(cosh(x)^3/(1+coth(x)),x, algorithm="maxima")

[Out]

1/48*(6*e^(-2*x) + 1)*e^(3*x) + 1/24*e^(-3*x) + 1/80*e^(-5*x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=\frac {1}{240} \, {\left (10 \, e^{\left (2 \, x\right )} + 3\right )} e^{\left (-5 \, x\right )} + \frac {1}{48} \, e^{\left (3 \, x\right )} + \frac {1}{8} \, e^{x} \]

[In]

integrate(cosh(x)^3/(1+coth(x)),x, algorithm="giac")

[Out]

1/240*(10*e^(2*x) + 3)*e^(-5*x) + 1/48*e^(3*x) + 1/8*e^x

Mupad [B] (verification not implemented)

Time = 1.99 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \frac {\cosh ^3(x)}{1+\coth (x)} \, dx=\frac {{\mathrm {e}}^{-3\,x}}{24}+\frac {{\mathrm {e}}^{3\,x}}{48}+\frac {{\mathrm {e}}^{-5\,x}}{80}+\frac {{\mathrm {e}}^x}{8} \]

[In]

int(cosh(x)^3/(coth(x) + 1),x)

[Out]

exp(-3*x)/24 + exp(3*x)/48 + exp(-5*x)/80 + exp(x)/8