3.189 \(\int \frac {\tanh ^4(x)}{a+a \cosh (x)} \, dx\)

Optimal. Leaf size=33 \[ -\frac {\tanh ^3(x)}{3 a}+\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {\tanh (x) \text {sech}(x)}{2 a} \]

[Out]

1/2*arctan(sinh(x))/a-1/2*sech(x)*tanh(x)/a-1/3*tanh(x)^3/a

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2706, 2607, 30, 2611, 3770} \[ -\frac {\tanh ^3(x)}{3 a}+\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {\tanh (x) \text {sech}(x)}{2 a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[Sinh[x]]/(2*a) - (Sech[x]*Tanh[x])/(2*a) - Tanh[x]^3/(3*a)

Rule 30

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

Rule 2607

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

Rule 2611

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

Rule 2706

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\tanh ^4(x)}{a+a \cosh (x)} \, dx &=\frac {\int \text {sech}(x) \tanh ^2(x) \, dx}{a}-\frac {\int \text {sech}^2(x) \tanh ^2(x) \, dx}{a}\\ &=-\frac {\text {sech}(x) \tanh (x)}{2 a}-\frac {i \operatorname {Subst}\left (\int x^2 \, dx,x,i \tanh (x)\right )}{a}+\frac {\int \text {sech}(x) \, dx}{2 a}\\ &=\frac {\tan ^{-1}(\sinh (x))}{2 a}-\frac {\text {sech}(x) \tanh (x)}{2 a}-\frac {\tanh ^3(x)}{3 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 46, normalized size = 1.39 \[ \frac {\cosh ^2\left (\frac {x}{2}\right ) \left (6 \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+\tanh (x) \left (2 \text {sech}^2(x)-3 \text {sech}(x)-2\right )\right )}{3 a (\cosh (x)+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Cosh[x/2]^2*(6*ArcTan[Tanh[x/2]] + (-2 - 3*Sech[x] + 2*Sech[x]^2)*Tanh[x]))/(3*a*(1 + Cosh[x]))

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 315, normalized size = 9.55 \[ -\frac {3 \, \cosh \relax (x)^{5} + 3 \, {\left (5 \, \cosh \relax (x) - 2\right )} \sinh \relax (x)^{4} + 3 \, \sinh \relax (x)^{5} - 6 \, \cosh \relax (x)^{4} + 6 \, {\left (5 \, \cosh \relax (x)^{2} - 4 \, \cosh \relax (x)\right )} \sinh \relax (x)^{3} + 6 \, {\left (5 \, \cosh \relax (x)^{3} - 6 \, \cosh \relax (x)^{2}\right )} \sinh \relax (x)^{2} - 3 \, {\left (\cosh \relax (x)^{6} + 6 \, \cosh \relax (x) \sinh \relax (x)^{5} + \sinh \relax (x)^{6} + 3 \, {\left (5 \, \cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{4} + 3 \, \cosh \relax (x)^{4} + 4 \, {\left (5 \, \cosh \relax (x)^{3} + 3 \, \cosh \relax (x)\right )} \sinh \relax (x)^{3} + 3 \, {\left (5 \, \cosh \relax (x)^{4} + 6 \, \cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{2} + 3 \, \cosh \relax (x)^{2} + 6 \, {\left (\cosh \relax (x)^{5} + 2 \, \cosh \relax (x)^{3} + \cosh \relax (x)\right )} \sinh \relax (x) + 1\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + 3 \, {\left (5 \, \cosh \relax (x)^{4} - 8 \, \cosh \relax (x)^{3} - 1\right )} \sinh \relax (x) - 3 \, \cosh \relax (x) - 2}{3 \, {\left (a \cosh \relax (x)^{6} + 6 \, a \cosh \relax (x) \sinh \relax (x)^{5} + a \sinh \relax (x)^{6} + 3 \, a \cosh \relax (x)^{4} + 3 \, {\left (5 \, a \cosh \relax (x)^{2} + a\right )} \sinh \relax (x)^{4} + 4 \, {\left (5 \, a \cosh \relax (x)^{3} + 3 \, a \cosh \relax (x)\right )} \sinh \relax (x)^{3} + 3 \, a \cosh \relax (x)^{2} + 3 \, {\left (5 \, a \cosh \relax (x)^{4} + 6 \, a \cosh \relax (x)^{2} + a\right )} \sinh \relax (x)^{2} + 6 \, {\left (a \cosh \relax (x)^{5} + 2 \, a \cosh \relax (x)^{3} + a \cosh \relax (x)\right )} \sinh \relax (x) + a\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*(3*cosh(x)^5 + 3*(5*cosh(x) - 2)*sinh(x)^4 + 3*sinh(x)^5 - 6*cosh(x)^4 + 6*(5*cosh(x)^2 - 4*cosh(x))*sinh
(x)^3 + 6*(5*cosh(x)^3 - 6*cosh(x)^2)*sinh(x)^2 - 3*(cosh(x)^6 + 6*cosh(x)*sinh(x)^5 + sinh(x)^6 + 3*(5*cosh(x
)^2 + 1)*sinh(x)^4 + 3*cosh(x)^4 + 4*(5*cosh(x)^3 + 3*cosh(x))*sinh(x)^3 + 3*(5*cosh(x)^4 + 6*cosh(x)^2 + 1)*s
inh(x)^2 + 3*cosh(x)^2 + 6*(cosh(x)^5 + 2*cosh(x)^3 + cosh(x))*sinh(x) + 1)*arctan(cosh(x) + sinh(x)) + 3*(5*c
osh(x)^4 - 8*cosh(x)^3 - 1)*sinh(x) - 3*cosh(x) - 2)/(a*cosh(x)^6 + 6*a*cosh(x)*sinh(x)^5 + a*sinh(x)^6 + 3*a*
cosh(x)^4 + 3*(5*a*cosh(x)^2 + a)*sinh(x)^4 + 4*(5*a*cosh(x)^3 + 3*a*cosh(x))*sinh(x)^3 + 3*a*cosh(x)^2 + 3*(5
*a*cosh(x)^4 + 6*a*cosh(x)^2 + a)*sinh(x)^2 + 6*(a*cosh(x)^5 + 2*a*cosh(x)^3 + a*cosh(x))*sinh(x) + a)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 39, normalized size = 1.18 \[ \frac {\arctan \left (e^{x}\right )}{a} - \frac {3 \, e^{\left (5 \, x\right )} - 6 \, e^{\left (4 \, x\right )} - 3 \, e^{x} - 2}{3 \, a {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(e^x)/a - 1/3*(3*e^(5*x) - 6*e^(4*x) - 3*e^x - 2)/(a*(e^(2*x) + 1)^3)

________________________________________________________________________________________

maple [B]  time = 0.10, size = 71, normalized size = 2.15 \[ \frac {\tanh ^{5}\left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-\frac {8 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3 a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-\frac {\tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {\arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4/(a+a*cosh(x)),x)

[Out]

1/a/(tanh(1/2*x)^2+1)^3*tanh(1/2*x)^5-8/3/a/(tanh(1/2*x)^2+1)^3*tanh(1/2*x)^3-1/a/(tanh(1/2*x)^2+1)^3*tanh(1/2
*x)+1/a*arctan(tanh(1/2*x))

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 57, normalized size = 1.73 \[ -\frac {3 \, e^{\left (-x\right )} + 6 \, e^{\left (-4 \, x\right )} - 3 \, e^{\left (-5 \, x\right )} + 2}{3 \, {\left (3 \, a e^{\left (-2 \, x\right )} + 3 \, a e^{\left (-4 \, x\right )} + a e^{\left (-6 \, x\right )} + a\right )}} - \frac {\arctan \left (e^{\left (-x\right )}\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*(3*e^(-x) + 6*e^(-4*x) - 3*e^(-5*x) + 2)/(3*a*e^(-2*x) + 3*a*e^(-4*x) + a*e^(-6*x) + a) - arctan(e^(-x))/
a

________________________________________________________________________________________

mupad [B]  time = 0.96, size = 95, normalized size = 2.88 \[ \frac {8}{3\,a\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {\frac {4}{a}-\frac {2\,{\mathrm {e}}^x}{a}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}+\frac {\frac {2}{a}-\frac {{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+1}+\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4/(a + a*cosh(x)),x)

[Out]

8/(3*a*(3*exp(2*x) + 3*exp(4*x) + exp(6*x) + 1)) - (4/a - (2*exp(x))/a)/(2*exp(2*x) + exp(4*x) + 1) + (2/a - e
xp(x)/a)/(exp(2*x) + 1) + atan((exp(x)*(a^2)^(1/2))/a)/(a^2)^(1/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\tanh ^{4}{\relax (x )}}{\cosh {\relax (x )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________