\(\int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx\) [30]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 43 \[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=\frac {3 \arctan (\sinh (x))}{2 a}-\frac {2 \tanh (x)}{a}+\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}(x) \tanh (x)}{a+a \cosh (x)} \] Output:

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

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.14 \[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=\frac {\cosh \left (\frac {x}{2}\right ) \left (-2 \sinh \left (\frac {x}{2}\right )+\cosh \left (\frac {x}{2}\right ) \left (6 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )+(-2+\text {sech}(x)) \tanh (x)\right )\right )}{a (1+\cosh (x))} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.02, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.846, Rules used = {3042, 3247, 25, 3042, 3227, 3042, 4254, 24, 4255, 3042, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin \left (\frac {\pi }{2}+i x\right )^3 \left (a+a \sin \left (\frac {\pi }{2}+i x\right )\right )}dx\)

\(\Big \downarrow \) 3247

\(\displaystyle -\frac {\int -\left ((3 a-2 a \cosh (x)) \text {sech}^3(x)\right )dx}{a^2}-\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int (3 a-2 a \cosh (x)) \text {sech}^3(x)dx}{a^2}-\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}+\frac {\int \frac {3 a-2 a \sin \left (i x+\frac {\pi }{2}\right )}{\sin \left (i x+\frac {\pi }{2}\right )^3}dx}{a^2}\)

\(\Big \downarrow \) 3227

\(\displaystyle \frac {3 a \int \text {sech}^3(x)dx-2 a \int \text {sech}^2(x)dx}{a^2}-\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}+\frac {3 a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx-2 a \int \csc \left (i x+\frac {\pi }{2}\right )^2dx}{a^2}\)

\(\Big \downarrow \) 4254

\(\displaystyle -\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}+\frac {3 a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx-2 i a \int 1d(-i \tanh (x))}{a^2}\)

\(\Big \downarrow \) 24

\(\displaystyle -\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}+\frac {-2 a \tanh (x)+3 a \int \csc \left (i x+\frac {\pi }{2}\right )^3dx}{a^2}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {3 a \left (\frac {\int \text {sech}(x)dx}{2}+\frac {1}{2} \tanh (x) \text {sech}(x)\right )-2 a \tanh (x)}{a^2}-\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}+\frac {-2 a \tanh (x)+3 a \left (\frac {1}{2} \tanh (x) \text {sech}(x)+\frac {1}{2} \int \csc \left (i x+\frac {\pi }{2}\right )dx\right )}{a^2}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {3 a \left (\frac {1}{2} \arctan (\sinh (x))+\frac {1}{2} \tanh (x) \text {sech}(x)\right )-2 a \tanh (x)}{a^2}-\frac {\tanh (x) \text {sech}(x)}{a \cosh (x)+a}\)

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

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

rule 3247
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] + Simp[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] /; Fre 
eQ[{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 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 

rule 4255
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] + Simp[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 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
Maple [A] (verified)

Time = 0.76 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.07

method result size
default \(\frac {-\tanh \left (\frac {x}{2}\right )+\frac {-3 \tanh \left (\frac {x}{2}\right )^{3}-\tanh \left (\frac {x}{2}\right )}{\left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )^{2}}+3 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a}\) \(46\)
risch \(\frac {3 \,{\mathrm e}^{4 x}+3 \,{\mathrm e}^{3 x}+5 \,{\mathrm e}^{2 x}+{\mathrm e}^{x}+4}{\left ({\mathrm e}^{2 x}+1\right )^{2} a \left ({\mathrm e}^{x}+1\right )}+\frac {3 i \ln \left ({\mathrm e}^{x}+i\right )}{2 a}-\frac {3 i \ln \left ({\mathrm e}^{x}-i\right )}{2 a}\) \(66\)
parallelrisch \(\frac {3 i \left (-1-\cosh \left (2 x \right )\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-i\right )+3 i \left (1+\cosh \left (2 x \right )\right ) \ln \left (\tanh \left (\frac {x}{2}\right )+i\right )-2 \tanh \left (\frac {x}{2}\right ) \left (\cosh \left (x \right )+2 \cosh \left (2 x \right )+1\right )}{2 a \left (1+\cosh \left (2 x \right )\right )}\) \(67\)

Input:

int(sech(x)^3/(a+cosh(x)*a),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 325 vs. \(2 (39) = 78\).

Time = 0.09 (sec) , antiderivative size = 325, normalized size of antiderivative = 7.56 \[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=\frac {3 \, \cosh \left (x\right )^{4} + 3 \, {\left (4 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{3} + 3 \, \sinh \left (x\right )^{4} + 3 \, \cosh \left (x\right )^{3} + {\left (18 \, \cosh \left (x\right )^{2} + 9 \, \cosh \left (x\right ) + 5\right )} \sinh \left (x\right )^{2} + 3 \, {\left (\cosh \left (x\right )^{5} + {\left (5 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{4} + \sinh \left (x\right )^{5} + \cosh \left (x\right )^{4} + 2 \, {\left (5 \, \cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{3} + 2 \, \cosh \left (x\right )^{3} + 2 \, {\left (5 \, \cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right )^{2} + 3 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{2} + 2 \, \cosh \left (x\right )^{2} + {\left (5 \, \cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right )^{3} + 6 \, \cosh \left (x\right )^{2} + 4 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \cosh \left (x\right ) + 1\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + 5 \, \cosh \left (x\right )^{2} + {\left (12 \, \cosh \left (x\right )^{3} + 9 \, \cosh \left (x\right )^{2} + 10 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \cosh \left (x\right ) + 4}{a \cosh \left (x\right )^{5} + a \sinh \left (x\right )^{5} + a \cosh \left (x\right )^{4} + {\left (5 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{4} + 2 \, a \cosh \left (x\right )^{3} + 2 \, {\left (5 \, a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{3} + 2 \, a \cosh \left (x\right )^{2} + 2 \, {\left (5 \, a \cosh \left (x\right )^{3} + 3 \, a \cosh \left (x\right )^{2} + 3 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{2} + a \cosh \left (x\right ) + {\left (5 \, a \cosh \left (x\right )^{4} + 4 \, a \cosh \left (x\right )^{3} + 6 \, a \cosh \left (x\right )^{2} + 4 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + a} \] Input:

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

Output:

(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)*s 
inh(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*c 
osh(x)^3 + 3*a*cosh(x)^2 + 3*a*cosh(x) + a)*sinh(x)^2 + a*cosh(x) + (5*a*c 
osh(x)^4 + 4*a*cosh(x)^3 + 6*a*cosh(x)^2 + 4*a*cosh(x) + a)*sinh(x) + a)
 

Sympy [F]

\[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=\frac {\int \frac {\operatorname {sech}^{3}{\left (x \right )}}{\cosh {\left (x \right )} + 1}\, dx}{a} \] Input:

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.70 \[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=-\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} \] Input:

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

Output:

-(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
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.12 \[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=\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 )}} \] Input:

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

Output:

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))
 

Mupad [B] (verification not implemented)

Time = 1.98 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.70 \[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=\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 )} \] Input:

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

Output:

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))
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.84 \[ \int \frac {\text {sech}^3(x)}{a+a \cosh (x)} \, dx=\frac {3 e^{5 x} \mathit {atan} \left (e^{x}\right )+3 e^{4 x} \mathit {atan} \left (e^{x}\right )+6 e^{3 x} \mathit {atan} \left (e^{x}\right )+6 e^{2 x} \mathit {atan} \left (e^{x}\right )+3 e^{x} \mathit {atan} \left (e^{x}\right )+3 \mathit {atan} \left (e^{x}\right )-3 e^{5 x}-3 e^{3 x}-e^{2 x}-2 e^{x}+1}{a \left (e^{5 x}+e^{4 x}+2 e^{3 x}+2 e^{2 x}+e^{x}+1\right )} \] Input:

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

Output:

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