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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3818, 3787, 3767, 8, 3768, 3770} \[ -\frac {2 \tanh (x)}{a}+\frac {3 \tan ^{-1}(\sinh (x))}{2 a}-\frac {\tanh (x) \text {sech}^2(x)}{a \text {sech}(x)+a}+\frac {3 \tanh (x) \text {sech}(x)}{2 a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, 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]

Rule 3787

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3818

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(d^2*Cot[e
+ f*x]*(d*Csc[e + f*x])^(n - 2))/(f*(a + b*Csc[e + f*x])), x] - Dist[d^2/(a*b), Int[(d*Csc[e + f*x])^(n - 2)*(
b*(n - 2) - a*(n - 1)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && GtQ[n, 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 51, normalized size = 1.13 \[ \frac {\cosh \left (\frac {x}{2}\right ) \text {sech}(x) \left (\cosh \left (\frac {x}{2}\right ) \left (6 \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+\tanh (x) (\text {sech}(x)-2)\right )-2 \sinh \left (\frac {x}{2}\right )\right )}{a (\text {sech}(x)+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.38, size = 325, normalized size = 7.22 \[ \frac {3 \, \cosh \relax (x)^{4} + 3 \, {\left (4 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{3} + 3 \, \sinh \relax (x)^{4} + 3 \, \cosh \relax (x)^{3} + {\left (18 \, \cosh \relax (x)^{2} + 9 \, \cosh \relax (x) + 5\right )} \sinh \relax (x)^{2} + 3 \, {\left (\cosh \relax (x)^{5} + {\left (5 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{4} + \sinh \relax (x)^{5} + \cosh \relax (x)^{4} + 2 \, {\left (5 \, \cosh \relax (x)^{2} + 2 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{3} + 2 \, \cosh \relax (x)^{3} + 2 \, {\left (5 \, \cosh \relax (x)^{3} + 3 \, \cosh \relax (x)^{2} + 3 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{2} + 2 \, \cosh \relax (x)^{2} + {\left (5 \, \cosh \relax (x)^{4} + 4 \, \cosh \relax (x)^{3} + 6 \, \cosh \relax (x)^{2} + 4 \, \cosh \relax (x) + 1\right )} \sinh \relax (x) + \cosh \relax (x) + 1\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + 5 \, \cosh \relax (x)^{2} + {\left (12 \, \cosh \relax (x)^{3} + 9 \, \cosh \relax (x)^{2} + 10 \, \cosh \relax (x) + 1\right )} \sinh \relax (x) + \cosh \relax (x) + 4}{a \cosh \relax (x)^{5} + a \sinh \relax (x)^{5} + a \cosh \relax (x)^{4} + {\left (5 \, a \cosh \relax (x) + a\right )} \sinh \relax (x)^{4} + 2 \, a \cosh \relax (x)^{3} + 2 \, {\left (5 \, a \cosh \relax (x)^{2} + 2 \, a \cosh \relax (x) + a\right )} \sinh \relax (x)^{3} + 2 \, a \cosh \relax (x)^{2} + 2 \, {\left (5 \, a \cosh \relax (x)^{3} + 3 \, a \cosh \relax (x)^{2} + 3 \, a \cosh \relax (x) + a\right )} \sinh \relax (x)^{2} + a \cosh \relax (x) + {\left (5 \, a \cosh \relax (x)^{4} + 4 \, a \cosh \relax (x)^{3} + 6 \, a \cosh \relax (x)^{2} + 4 \, a \cosh \relax (x) + a\right )} \sinh \relax (x) + a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3*cosh(x)^4 + 3*(4*cosh(x) + 1)*sinh(x)^3 + 3*sinh(x)^4 + 3*cosh(x)^3 + (18*cosh(x)^2 + 9*cosh(x) + 5)*sinh(x
)^2 + 3*(cosh(x)^5 + (5*cosh(x) + 1)*sinh(x)^4 + sinh(x)^5 + cosh(x)^4 + 2*(5*cosh(x)^2 + 2*cosh(x) + 1)*sinh(
x)^3 + 2*cosh(x)^3 + 2*(5*cosh(x)^3 + 3*cosh(x)^2 + 3*cosh(x) + 1)*sinh(x)^2 + 2*cosh(x)^2 + (5*cosh(x)^4 + 4*
cosh(x)^3 + 6*cosh(x)^2 + 4*cosh(x) + 1)*sinh(x) + cosh(x) + 1)*arctan(cosh(x) + sinh(x)) + 5*cosh(x)^2 + (12*
cosh(x)^3 + 9*cosh(x)^2 + 10*cosh(x) + 1)*sinh(x) + cosh(x) + 4)/(a*cosh(x)^5 + a*sinh(x)^5 + a*cosh(x)^4 + (5
*a*cosh(x) + a)*sinh(x)^4 + 2*a*cosh(x)^3 + 2*(5*a*cosh(x)^2 + 2*a*cosh(x) + a)*sinh(x)^3 + 2*a*cosh(x)^2 + 2*
(5*a*cosh(x)^3 + 3*a*cosh(x)^2 + 3*a*cosh(x) + a)*sinh(x)^2 + a*cosh(x) + (5*a*cosh(x)^4 + 4*a*cosh(x)^3 + 6*a
*cosh(x)^2 + 4*a*cosh(x) + a)*sinh(x) + a)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 48, normalized size = 1.07 \[ \frac {3 \, \arctan \left (e^{x}\right )}{a} + \frac {e^{\left (3 \, x\right )} + 2 \, e^{\left (2 \, x\right )} - e^{x} + 2}{a {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} + \frac {2}{a {\left (e^{x} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.11, size = 61, normalized size = 1.36 \[ -\frac {\tanh \left (\frac {x}{2}\right )}{a}-\frac {3 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {\tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}+\frac {3 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 73, normalized size = 1.62 \[ -\frac {e^{\left (-x\right )} + 5 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + 4}{a e^{\left (-x\right )} + 2 \, a e^{\left (-2 \, x\right )} + 2 \, a e^{\left (-3 \, x\right )} + a e^{\left (-4 \, x\right )} + a e^{\left (-5 \, x\right )} + a} - \frac {3 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.35, size = 73, normalized size = 1.62 \[ \frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}+\frac {\frac {2}{a}+\frac {{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+1}+\frac {3\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}}-\frac {2\,{\mathrm {e}}^x}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/(a*(exp(x) + 1)) + (2/a + exp(x)/a)/(exp(2*x) + 1) + (3*atan((exp(x)*(a^2)^(1/2))/a))/(a^2)^(1/2) - (2*exp(x
))/(a*(2*exp(2*x) + exp(4*x) + 1))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________