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

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

[Out]

-arctan(sinh(x))/a+2*tanh(x)/a-tanh(x)/(a+a*cosh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 28, 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 = {2768, 2748, 3767, 8, 3770} \[ \frac {2 \tanh (x)}{a}-\frac {\tan ^{-1}(\sinh (x))}{a}-\frac {\tanh (x)}{a \cosh (x)+a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 127, normalized size = 4.54 \[ -\frac {2 \, {\left ({\left (\cosh \relax (x)^{3} + {\left (3 \, \cosh \relax (x) + 1\right )} \sinh \relax (x)^{2} + \sinh \relax (x)^{3} + \cosh \relax (x)^{2} + {\left (3 \, \cosh \relax (x)^{2} + 2 \, \cosh \relax (x) + 1\right )} \sinh \relax (x) + \cosh \relax (x) + 1\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + \cosh \relax (x)^{2} + {\left (2 \, \cosh \relax (x) + 1\right )} \sinh \relax (x) + \sinh \relax (x)^{2} + \cosh \relax (x) + 2\right )}}{a \cosh \relax (x)^{3} + a \sinh \relax (x)^{3} + a \cosh \relax (x)^{2} + {\left (3 \, a \cosh \relax (x) + a\right )} \sinh \relax (x)^{2} + a \cosh \relax (x) + {\left (3 \, a \cosh \relax (x)^{2} + 2 \, a \cosh \relax (x) + a\right )} \sinh \relax (x) + a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*((cosh(x)^3 + (3*cosh(x) + 1)*sinh(x)^2 + sinh(x)^3 + cosh(x)^2 + (3*cosh(x)^2 + 2*cosh(x) + 1)*sinh(x) + c
osh(x) + 1)*arctan(cosh(x) + sinh(x)) + cosh(x)^2 + (2*cosh(x) + 1)*sinh(x) + sinh(x)^2 + cosh(x) + 2)/(a*cosh
(x)^3 + a*sinh(x)^3 + a*cosh(x)^2 + (3*a*cosh(x) + a)*sinh(x)^2 + a*cosh(x) + (3*a*cosh(x)^2 + 2*a*cosh(x) + a
)*sinh(x) + a)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 39, normalized size = 1.39 \[ \frac {\tanh \left (\frac {x}{2}\right )}{a}+\frac {2 \tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}-\frac {2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.80, size = 45, normalized size = 1.61 \[ \frac {2 \, {\left (e^{\left (-x\right )} + e^{\left (-2 \, x\right )} + 2\right )}}{a e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a e^{\left (-3 \, x\right )} + a} + \frac {2 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.89, size = 58, normalized size = 2.07 \[ -\frac {\frac {2\,{\mathrm {e}}^{2\,x}}{a}+\frac {4}{a}+\frac {2\,{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{3\,x}+{\mathrm {e}}^x+1}-\frac {2\,\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(1/(cosh(x)^2*(a + a*cosh(x))),x)

[Out]

- ((2*exp(2*x))/a + 4/a + (2*exp(x))/a)/(exp(2*x) + exp(3*x) + exp(x) + 1) - (2*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 {\operatorname {sech}^{2}{\relax (x )}}{\cosh {\relax (x )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________