3.31 \(\int \frac{\text{sech}^4(x)}{a+a \cosh (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0769904, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2768, 2748, 3767, 3768, 3770} \[ -\frac{4 \tanh ^3(x)}{3 a}+\frac{4 \tanh (x)}{a}-\frac{3 \tan ^{-1}(\sinh (x))}{2 a}-\frac{3 \tanh (x) \text{sech}(x)}{2 a}-\frac{\tanh (x) \text{sech}^2(x)}{a \cosh (x)+a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2768

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

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

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

Mathematica [A]  time = 0.175914, size = 60, normalized size = 1.07 \[ \frac{\cosh \left (\frac{x}{2}\right ) \left (6 \sinh \left (\frac{x}{2}\right )+\cosh \left (\frac{x}{2}\right ) \left (\tanh (x) \left (2 \text{sech}^2(x)-3 \text{sech}(x)+10\right )-18 \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )\right )\right )}{3 a (\cosh (x)+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.024, size = 81, normalized size = 1.5 \begin{align*}{\frac{1}{a}\tanh \left ({\frac{x}{2}} \right ) }+5\,{\frac{ \left ( \tanh \left ( x/2 \right ) \right ) ^{5}}{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{3}}}+{\frac{16}{3\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{3} \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-3}}+3\,{\frac{\tanh \left ( x/2 \right ) }{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{3}}}-3\,{\frac{\arctan \left ( \tanh \left ( x/2 \right ) \right ) }{a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.66707, size = 136, normalized size = 2.43 \begin{align*} \frac{7 \, e^{\left (-x\right )} + 39 \, e^{\left (-2 \, x\right )} + 24 \, e^{\left (-3 \, x\right )} + 24 \, e^{\left (-4 \, x\right )} + 9 \, e^{\left (-5 \, x\right )} + 9 \, e^{\left (-6 \, x\right )} + 16}{3 \,{\left (a e^{\left (-x\right )} + 3 \, a e^{\left (-2 \, x\right )} + 3 \, a e^{\left (-3 \, x\right )} + 3 \, a e^{\left (-4 \, x\right )} + 3 \, a e^{\left (-5 \, x\right )} + a e^{\left (-6 \, x\right )} + a e^{\left (-7 \, x\right )} + a\right )}} + \frac{3 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*(7*e^(-x) + 39*e^(-2*x) + 24*e^(-3*x) + 24*e^(-4*x) + 9*e^(-5*x) + 9*e^(-6*x) + 16)/(a*e^(-x) + 3*a*e^(-2*
x) + 3*a*e^(-3*x) + 3*a*e^(-4*x) + 3*a*e^(-5*x) + a*e^(-6*x) + a*e^(-7*x) + a) + 3*arctan(e^(-x))/a

________________________________________________________________________________________

Fricas [B]  time = 1.95651, size = 2018, normalized size = 36.04 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*(9*cosh(x)^6 + 9*(6*cosh(x) + 1)*sinh(x)^5 + 9*sinh(x)^6 + 9*cosh(x)^5 + 3*(45*cosh(x)^2 + 15*cosh(x) + 8
)*sinh(x)^4 + 24*cosh(x)^4 + 6*(30*cosh(x)^3 + 15*cosh(x)^2 + 16*cosh(x) + 4)*sinh(x)^3 + 24*cosh(x)^3 + 3*(45
*cosh(x)^4 + 30*cosh(x)^3 + 48*cosh(x)^2 + 24*cosh(x) + 13)*sinh(x)^2 + 9*(cosh(x)^7 + (7*cosh(x) + 1)*sinh(x)
^6 + sinh(x)^7 + cosh(x)^6 + 3*(7*cosh(x)^2 + 2*cosh(x) + 1)*sinh(x)^5 + 3*cosh(x)^5 + (35*cosh(x)^3 + 15*cosh
(x)^2 + 15*cosh(x) + 3)*sinh(x)^4 + 3*cosh(x)^4 + (35*cosh(x)^4 + 20*cosh(x)^3 + 30*cosh(x)^2 + 12*cosh(x) + 3
)*sinh(x)^3 + 3*cosh(x)^3 + 3*(7*cosh(x)^5 + 5*cosh(x)^4 + 10*cosh(x)^3 + 6*cosh(x)^2 + 3*cosh(x) + 1)*sinh(x)
^2 + 3*cosh(x)^2 + (7*cosh(x)^6 + 6*cosh(x)^5 + 15*cosh(x)^4 + 12*cosh(x)^3 + 9*cosh(x)^2 + 6*cosh(x) + 1)*sin
h(x) + cosh(x) + 1)*arctan(cosh(x) + sinh(x)) + 39*cosh(x)^2 + (54*cosh(x)^5 + 45*cosh(x)^4 + 96*cosh(x)^3 + 7
2*cosh(x)^2 + 78*cosh(x) + 7)*sinh(x) + 7*cosh(x) + 16)/(a*cosh(x)^7 + a*sinh(x)^7 + a*cosh(x)^6 + (7*a*cosh(x
) + a)*sinh(x)^6 + 3*a*cosh(x)^5 + 3*(7*a*cosh(x)^2 + 2*a*cosh(x) + a)*sinh(x)^5 + 3*a*cosh(x)^4 + (35*a*cosh(
x)^3 + 15*a*cosh(x)^2 + 15*a*cosh(x) + 3*a)*sinh(x)^4 + 3*a*cosh(x)^3 + (35*a*cosh(x)^4 + 20*a*cosh(x)^3 + 30*
a*cosh(x)^2 + 12*a*cosh(x) + 3*a)*sinh(x)^3 + 3*a*cosh(x)^2 + 3*(7*a*cosh(x)^5 + 5*a*cosh(x)^4 + 10*a*cosh(x)^
3 + 6*a*cosh(x)^2 + 3*a*cosh(x) + a)*sinh(x)^2 + a*cosh(x) + (7*a*cosh(x)^6 + 6*a*cosh(x)^5 + 15*a*cosh(x)^4 +
 12*a*cosh(x)^3 + 9*a*cosh(x)^2 + 6*a*cosh(x) + a)*sinh(x) + a)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.15633, size = 77, normalized size = 1.38 \begin{align*} -\frac{3 \, \arctan \left (e^{x}\right )}{a} - \frac{2}{a{\left (e^{x} + 1\right )}} - \frac{3 \, e^{\left (5 \, x\right )} + 6 \, e^{\left (4 \, x\right )} + 24 \, e^{\left (2 \, x\right )} - 3 \, e^{x} + 10}{3 \, a{\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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