3.91 \(\int \frac{\cosh ^4(x)}{1+\tanh (x)} \, dx\)

Optimal. Leaf size=60 \[ \frac{5 x}{16}+\frac{1}{8 (1-\tanh (x))}-\frac{3}{16 (\tanh (x)+1)}+\frac{1}{32 (1-\tanh (x))^2}-\frac{3}{32 (\tanh (x)+1)^2}-\frac{1}{24 (\tanh (x)+1)^3} \]

[Out]

(5*x)/16 + 1/(32*(1 - Tanh[x])^2) + 1/(8*(1 - Tanh[x])) - 1/(24*(1 + Tanh[x])^3) - 3/(32*(1 + Tanh[x])^2) - 3/
(16*(1 + Tanh[x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0611005, antiderivative size = 60, 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 = {3487, 44, 207} \[ \frac{5 x}{16}+\frac{1}{8 (1-\tanh (x))}-\frac{3}{16 (\tanh (x)+1)}+\frac{1}{32 (1-\tanh (x))^2}-\frac{3}{32 (\tanh (x)+1)^2}-\frac{1}{24 (\tanh (x)+1)^3} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[x]^4/(1 + Tanh[x]),x]

[Out]

(5*x)/16 + 1/(32*(1 - Tanh[x])^2) + 1/(8*(1 - Tanh[x])) - 1/(24*(1 + Tanh[x])^3) - 3/(32*(1 + Tanh[x])^2) - 3/
(16*(1 + Tanh[x]))

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 207

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

Rubi steps

\begin{align*} \int \frac{\cosh ^4(x)}{1+\tanh (x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{(1-x)^3 (1+x)^4} \, dx,x,\tanh (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{1}{16 (-1+x)^3}+\frac{1}{8 (-1+x)^2}+\frac{1}{8 (1+x)^4}+\frac{3}{16 (1+x)^3}+\frac{3}{16 (1+x)^2}-\frac{5}{16 \left (-1+x^2\right )}\right ) \, dx,x,\tanh (x)\right )\\ &=\frac{1}{32 (1-\tanh (x))^2}+\frac{1}{8 (1-\tanh (x))}-\frac{1}{24 (1+\tanh (x))^3}-\frac{3}{32 (1+\tanh (x))^2}-\frac{3}{16 (1+\tanh (x))}-\frac{5}{16} \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\tanh (x)\right )\\ &=\frac{5 x}{16}+\frac{1}{32 (1-\tanh (x))^2}+\frac{1}{8 (1-\tanh (x))}-\frac{1}{24 (1+\tanh (x))^3}-\frac{3}{32 (1+\tanh (x))^2}-\frac{3}{16 (1+\tanh (x))}\\ \end{align*}

Mathematica [A]  time = 0.0448211, size = 42, normalized size = 0.7 \[ \frac{1}{192} (60 x+45 \sinh (2 x)+9 \sinh (4 x)+\sinh (6 x)-15 \cosh (2 x)-6 \cosh (4 x)-\cosh (6 x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[x]^4/(1 + Tanh[x]),x]

[Out]

(60*x - 15*Cosh[2*x] - 6*Cosh[4*x] - Cosh[6*x] + 45*Sinh[2*x] + 9*Sinh[4*x] + Sinh[6*x])/192

________________________________________________________________________________________

Maple [B]  time = 0.033, size = 116, normalized size = 1.9 \begin{align*} -{\frac{1}{3} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-6}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-5}-{\frac{15}{8} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-4}}+{\frac{25}{12} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-3}}-{\frac{15}{8} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}+{\frac{5}{16}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{1}{8} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-4}}+{\frac{1}{4} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-3}}+{\frac{1}{2} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}+{\frac{3}{8} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}-{\frac{5}{16}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)^4/(1+tanh(x)),x)

[Out]

-1/3/(tanh(1/2*x)+1)^6+1/(tanh(1/2*x)+1)^5-15/8/(tanh(1/2*x)+1)^4+25/12/(tanh(1/2*x)+1)^3-15/8/(tanh(1/2*x)+1)
^2+1/(tanh(1/2*x)+1)+5/16*ln(tanh(1/2*x)+1)+1/8/(tanh(1/2*x)-1)^4+1/4/(tanh(1/2*x)-1)^3+1/2/(tanh(1/2*x)-1)^2+
3/8/(tanh(1/2*x)-1)-5/16*ln(tanh(1/2*x)-1)

________________________________________________________________________________________

Maxima [A]  time = 1.11433, size = 49, normalized size = 0.82 \begin{align*} \frac{1}{128} \,{\left (10 \, e^{\left (-2 \, x\right )} + 1\right )} e^{\left (4 \, x\right )} + \frac{5}{16} \, x - \frac{5}{32} \, e^{\left (-2 \, x\right )} - \frac{5}{128} \, e^{\left (-4 \, x\right )} - \frac{1}{192} \, e^{\left (-6 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^4/(1+tanh(x)),x, algorithm="maxima")

[Out]

1/128*(10*e^(-2*x) + 1)*e^(4*x) + 5/16*x - 5/32*e^(-2*x) - 5/128*e^(-4*x) - 1/192*e^(-6*x)

________________________________________________________________________________________

Fricas [B]  time = 2.19796, size = 323, normalized size = 5.38 \begin{align*} \frac{\cosh \left (x\right )^{5} + 5 \, \cosh \left (x\right ) \sinh \left (x\right )^{4} + 5 \, \sinh \left (x\right )^{5} + 5 \,{\left (10 \, \cosh \left (x\right )^{2} + 9\right )} \sinh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{3} + 5 \,{\left (2 \, \cosh \left (x\right )^{3} + 9 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + 60 \,{\left (2 \, x - 1\right )} \cosh \left (x\right ) + 5 \,{\left (5 \, \cosh \left (x\right )^{4} + 27 \, \cosh \left (x\right )^{2} + 24 \, x + 12\right )} \sinh \left (x\right )}{384 \,{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^4/(1+tanh(x)),x, algorithm="fricas")

[Out]

1/384*(cosh(x)^5 + 5*cosh(x)*sinh(x)^4 + 5*sinh(x)^5 + 5*(10*cosh(x)^2 + 9)*sinh(x)^3 + 15*cosh(x)^3 + 5*(2*co
sh(x)^3 + 9*cosh(x))*sinh(x)^2 + 60*(2*x - 1)*cosh(x) + 5*(5*cosh(x)^4 + 27*cosh(x)^2 + 24*x + 12)*sinh(x))/(c
osh(x) + sinh(x))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cosh ^{4}{\left (x \right )}}{\tanh{\left (x \right )} + 1}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)**4/(1+tanh(x)),x)

[Out]

Integral(cosh(x)**4/(tanh(x) + 1), x)

________________________________________________________________________________________

Giac [A]  time = 1.25069, size = 57, normalized size = 0.95 \begin{align*} -\frac{1}{384} \,{\left (110 \, e^{\left (6 \, x\right )} + 60 \, e^{\left (4 \, x\right )} + 15 \, e^{\left (2 \, x\right )} + 2\right )} e^{\left (-6 \, x\right )} + \frac{5}{16} \, x + \frac{1}{128} \, e^{\left (4 \, x\right )} + \frac{5}{64} \, e^{\left (2 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^4/(1+tanh(x)),x, algorithm="giac")

[Out]

-1/384*(110*e^(6*x) + 60*e^(4*x) + 15*e^(2*x) + 2)*e^(-6*x) + 5/16*x + 1/128*e^(4*x) + 5/64*e^(2*x)