\(\int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx\) [61]

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

Optimal result

Integrand size = 13, antiderivative size = 114 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx=-\frac {b \left (a^2+2 b^2\right ) \arctan (\sinh (x))}{2 a^4}+\frac {2 b^4 \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a^4 \sqrt {a-b} \sqrt {a+b}}+\frac {\left (2 a^2+3 b^2\right ) \tanh (x)}{3 a^3}-\frac {b \text {sech}(x) \tanh (x)}{2 a^2}+\frac {\text {sech}^2(x) \tanh (x)}{3 a} \] Output:

-1/2*b*(a^2+2*b^2)*arctan(sinh(x))/a^4+2*b^4*arctanh((a-b)^(1/2)*tanh(1/2* 
x)/(a+b)^(1/2))/a^4/(a-b)^(1/2)/(a+b)^(1/2)+1/3*(2*a^2+3*b^2)*tanh(x)/a^3- 
1/2*b*sech(x)*tanh(x)/a^2+1/3*sech(x)^2*tanh(x)/a
 

Mathematica [A] (verified)

Time = 0.31 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.89 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx=\frac {-6 b \left (a^2+2 b^2\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )-\frac {12 b^4 \arctan \left (\frac {(a-b) \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}+a \left (4 a^2+6 b^2-3 a b \text {sech}(x)+2 a^2 \text {sech}^2(x)\right ) \tanh (x)}{6 a^4} \] Input:

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

Output:

(-6*b*(a^2 + 2*b^2)*ArcTan[Tanh[x/2]] - (12*b^4*ArcTan[((a - b)*Tanh[x/2]) 
/Sqrt[-a^2 + b^2]])/Sqrt[-a^2 + b^2] + a*(4*a^2 + 6*b^2 - 3*a*b*Sech[x] + 
2*a^2*Sech[x]^2)*Tanh[x])/(6*a^4)
 

Rubi [A] (verified)

Time = 1.13 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.15, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.154, Rules used = {3042, 3281, 25, 3042, 3534, 25, 3042, 3534, 27, 3042, 3480, 3042, 3138, 221, 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}^4(x)}{a+b \cosh (x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3281

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3534

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3534

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3480

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3138

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

\(\Big \downarrow \) 221

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

\(\Big \downarrow \) 4257

\(\displaystyle \frac {\tanh (x) \text {sech}^2(x)}{3 a}-\frac {\frac {3 b \tanh (x) \text {sech}(x)}{2 a}-\frac {\frac {2 \left (2 a^2+3 b^2\right ) \tanh (x)}{a}-\frac {3 \left (\frac {b \left (a^2+2 b^2\right ) \arctan (\sinh (x))}{a}-\frac {4 b^4 \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b}}\right )}{a}}{2 a}}{3 a}\)

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

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

rule 3138
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ 
e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + b + 
(a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] 
 && NeQ[a^2 - b^2, 0]
 

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

rule 3480
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_ 
.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(A*b 
- a*B)/(b*c - a*d)   Int[1/(a + b*Sin[e + f*x]), x], x] + Simp[(B*c - A*d)/ 
(b*c - a*d)   Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f 
, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
 

rule 3534
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
 (f_.)*(x_)])^(n_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) 
 + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x 
]*(a + b*Sin[e + f*x])^(m + 1)*((c + d*Sin[e + f*x])^(n + 1)/(f*(m + 1)*(b* 
c - a*d)*(a^2 - b^2))), x] + Simp[1/((m + 1)*(b*c - a*d)*(a^2 - b^2))   Int 
[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[(m + 1)*(b*c - a* 
d)*(a*A - b*B + a*C) + d*(A*b^2 - a*b*B + a^2*C)*(m + n + 2) - (c*(A*b^2 - 
a*b*B + a^2*C) + (m + 1)*(b*c - a*d)*(A*b - a*B + b*C))*Sin[e + f*x] - d*(A 
*b^2 - a*b*B + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && 
NeQ[c^2 - d^2, 0] && LtQ[m, -1] && ((EqQ[a, 0] && IntegerQ[m] &&  !IntegerQ 
[n]) ||  !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] &&  !IntegerQ[m]) | 
| EqQ[a, 0])))
 

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 = 1.59 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.27

method result size
default \(\frac {2 b^{4} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {2 \left (\frac {\left (-a^{3}-\frac {1}{2} a^{2} b -b^{2} a \right ) \tanh \left (\frac {x}{2}\right )^{5}+\left (-\frac {2}{3} a^{3}-2 b^{2} a \right ) \tanh \left (\frac {x}{2}\right )^{3}+\left (-a^{3}-b^{2} a +\frac {1}{2} a^{2} b \right ) \tanh \left (\frac {x}{2}\right )}{\left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )^{3}}+\frac {b \left (a^{2}+2 b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{2}\right )}{a^{4}}\) \(145\)
risch \(-\frac {3 a b \,{\mathrm e}^{5 x}+6 b^{2} {\mathrm e}^{4 x}+12 a^{2} {\mathrm e}^{2 x}+12 b^{2} {\mathrm e}^{2 x}-3 b \,{\mathrm e}^{x} a +4 a^{2}+6 b^{2}}{3 a^{3} \left ({\mathrm e}^{2 x}+1\right )^{3}}+\frac {b^{4} \ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}-b^{2}}-a^{2}+b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, a^{4}}-\frac {b^{4} \ln \left ({\mathrm e}^{x}+\frac {a \sqrt {a^{2}-b^{2}}+a^{2}-b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, a^{4}}+\frac {i b \ln \left ({\mathrm e}^{x}-i\right )}{2 a^{2}}+\frac {i b^{3} \ln \left ({\mathrm e}^{x}-i\right )}{a^{4}}-\frac {i b \ln \left ({\mathrm e}^{x}+i\right )}{2 a^{2}}-\frac {i b^{3} \ln \left ({\mathrm e}^{x}+i\right )}{a^{4}}\) \(242\)

Input:

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

Output:

2*b^4/a^4/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh(1/2*x)/((a+b)*(a-b))^(1/2 
))-2/a^4*(((-a^3-1/2*a^2*b-b^2*a)*tanh(1/2*x)^5+(-2/3*a^3-2*b^2*a)*tanh(1/ 
2*x)^3+(-a^3-b^2*a+1/2*a^2*b)*tanh(1/2*x))/(tanh(1/2*x)^2+1)^3+1/2*b*(a^2+ 
2*b^2)*arctan(tanh(1/2*x)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1207 vs. \(2 (96) = 192\).

Time = 0.17 (sec) , antiderivative size = 2483, normalized size of antiderivative = 21.78 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx=\text {Too large to display} \] Input:

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

Output:

[-1/3*(3*(a^4*b - a^2*b^3)*cosh(x)^5 + 3*(a^4*b - a^2*b^3)*sinh(x)^5 + 4*a 
^5 + 2*a^3*b^2 - 6*a*b^4 + 6*(a^3*b^2 - a*b^4)*cosh(x)^4 + 3*(2*a^3*b^2 - 
2*a*b^4 + 5*(a^4*b - a^2*b^3)*cosh(x))*sinh(x)^4 + 6*(5*(a^4*b - a^2*b^3)* 
cosh(x)^2 + 4*(a^3*b^2 - a*b^4)*cosh(x))*sinh(x)^3 + 12*(a^5 - a*b^4)*cosh 
(x)^2 + 6*(2*a^5 - 2*a*b^4 + 5*(a^4*b - a^2*b^3)*cosh(x)^3 + 6*(a^3*b^2 - 
a*b^4)*cosh(x)^2)*sinh(x)^2 - 3*(b^4*cosh(x)^6 + 6*b^4*cosh(x)*sinh(x)^5 + 
 b^4*sinh(x)^6 + 3*b^4*cosh(x)^4 + 3*b^4*cosh(x)^2 + 3*(5*b^4*cosh(x)^2 + 
b^4)*sinh(x)^4 + b^4 + 4*(5*b^4*cosh(x)^3 + 3*b^4*cosh(x))*sinh(x)^3 + 3*( 
5*b^4*cosh(x)^4 + 6*b^4*cosh(x)^2 + b^4)*sinh(x)^2 + 6*(b^4*cosh(x)^5 + 2* 
b^4*cosh(x)^3 + b^4*cosh(x))*sinh(x))*sqrt(a^2 - b^2)*log((b^2*cosh(x)^2 + 
 b^2*sinh(x)^2 + 2*a*b*cosh(x) + 2*a^2 - b^2 + 2*(b^2*cosh(x) + a*b)*sinh( 
x) - 2*sqrt(a^2 - b^2)*(b*cosh(x) + b*sinh(x) + a))/(b*cosh(x)^2 + b*sinh( 
x)^2 + 2*a*cosh(x) + 2*(b*cosh(x) + a)*sinh(x) + b)) + 3*((a^4*b + a^2*b^3 
 - 2*b^5)*cosh(x)^6 + 6*(a^4*b + a^2*b^3 - 2*b^5)*cosh(x)*sinh(x)^5 + (a^4 
*b + a^2*b^3 - 2*b^5)*sinh(x)^6 + a^4*b + a^2*b^3 - 2*b^5 + 3*(a^4*b + a^2 
*b^3 - 2*b^5)*cosh(x)^4 + 3*(a^4*b + a^2*b^3 - 2*b^5 + 5*(a^4*b + a^2*b^3 
- 2*b^5)*cosh(x)^2)*sinh(x)^4 + 4*(5*(a^4*b + a^2*b^3 - 2*b^5)*cosh(x)^3 + 
 3*(a^4*b + a^2*b^3 - 2*b^5)*cosh(x))*sinh(x)^3 + 3*(a^4*b + a^2*b^3 - 2*b 
^5)*cosh(x)^2 + 3*(a^4*b + a^2*b^3 - 2*b^5 + 5*(a^4*b + a^2*b^3 - 2*b^5)*c 
osh(x)^4 + 6*(a^4*b + a^2*b^3 - 2*b^5)*cosh(x)^2)*sinh(x)^2 + 6*((a^4*b...
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f 
or more de
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.08 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx=\frac {2 \, b^{4} \arctan \left (\frac {b e^{x} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} a^{4}} - \frac {{\left (a^{2} b + 2 \, b^{3}\right )} \arctan \left (e^{x}\right )}{a^{4}} - \frac {3 \, a b e^{\left (5 \, x\right )} + 6 \, b^{2} e^{\left (4 \, x\right )} + 12 \, a^{2} e^{\left (2 \, x\right )} + 12 \, b^{2} e^{\left (2 \, x\right )} - 3 \, a b e^{x} + 4 \, a^{2} + 6 \, b^{2}}{3 \, a^{3} {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 6.03 (sec) , antiderivative size = 547, normalized size of antiderivative = 4.80 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx=\frac {8}{3\,\left (a+3\,a\,{\mathrm {e}}^{2\,x}+3\,a\,{\mathrm {e}}^{4\,x}+a\,{\mathrm {e}}^{6\,x}\right )}-\frac {4}{a+2\,a\,{\mathrm {e}}^{2\,x}+a\,{\mathrm {e}}^{4\,x}}-\frac {2\,b^2}{a^3\,{\mathrm {e}}^{2\,x}+a^3}+\frac {b^3\,\left (\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,1{}\mathrm {i}-\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}\right )}{a^4}-\frac {b\,{\mathrm {e}}^x}{a^2\,{\mathrm {e}}^{2\,x}+a^2}+\frac {2\,b\,{\mathrm {e}}^x}{2\,a^2\,{\mathrm {e}}^{2\,x}+a^2\,{\mathrm {e}}^{4\,x}+a^2}+\frac {b\,\left (\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,1{}\mathrm {i}-\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}\right )}{2\,a^2}+\frac {b^4\,\ln \left (32\,a^3\,b^4-24\,b^6\,\sqrt {a^2-b^2}-48\,a\,b^6+16\,a^5\,b^2+24\,b^7\,{\mathrm {e}}^x+32\,a^6\,b\,{\mathrm {e}}^x+40\,a^2\,b^4\,\sqrt {a^2-b^2}+16\,a^4\,b^2\,\sqrt {a^2-b^2}-112\,a^2\,b^5\,{\mathrm {e}}^x+56\,a^4\,b^3\,{\mathrm {e}}^x+72\,a^3\,b^3\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}-72\,a\,b^5\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}+32\,a^5\,b\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}\right )}{a^4\,\sqrt {a^2-b^2}}-\frac {b^4\,\ln \left (24\,b^6\,\sqrt {a^2-b^2}-48\,a\,b^6+32\,a^3\,b^4+16\,a^5\,b^2+24\,b^7\,{\mathrm {e}}^x+32\,a^6\,b\,{\mathrm {e}}^x-40\,a^2\,b^4\,\sqrt {a^2-b^2}-16\,a^4\,b^2\,\sqrt {a^2-b^2}-112\,a^2\,b^5\,{\mathrm {e}}^x+56\,a^4\,b^3\,{\mathrm {e}}^x-72\,a^3\,b^3\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}+72\,a\,b^5\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}-32\,a^5\,b\,{\mathrm {e}}^x\,\sqrt {a^2-b^2}\right )}{a^4\,\sqrt {a^2-b^2}} \] Input:

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

Output:

8/(3*(a + 3*a*exp(2*x) + 3*a*exp(4*x) + a*exp(6*x))) - 4/(a + 2*a*exp(2*x) 
 + a*exp(4*x)) - (2*b^2)/(a^3*exp(2*x) + a^3) + (b^3*(log(exp(x) - 1i)*1i 
- log(exp(x) + 1i)*1i))/a^4 - (b*exp(x))/(a^2*exp(2*x) + a^2) + (2*b*exp(x 
))/(2*a^2*exp(2*x) + a^2*exp(4*x) + a^2) + (b*(log(exp(x) - 1i)*1i - log(e 
xp(x) + 1i)*1i))/(2*a^2) + (b^4*log(32*a^3*b^4 - 24*b^6*(a^2 - b^2)^(1/2) 
- 48*a*b^6 + 16*a^5*b^2 + 24*b^7*exp(x) + 32*a^6*b*exp(x) + 40*a^2*b^4*(a^ 
2 - b^2)^(1/2) + 16*a^4*b^2*(a^2 - b^2)^(1/2) - 112*a^2*b^5*exp(x) + 56*a^ 
4*b^3*exp(x) + 72*a^3*b^3*exp(x)*(a^2 - b^2)^(1/2) - 72*a*b^5*exp(x)*(a^2 
- b^2)^(1/2) + 32*a^5*b*exp(x)*(a^2 - b^2)^(1/2)))/(a^4*(a^2 - b^2)^(1/2)) 
 - (b^4*log(24*b^6*(a^2 - b^2)^(1/2) - 48*a*b^6 + 32*a^3*b^4 + 16*a^5*b^2 
+ 24*b^7*exp(x) + 32*a^6*b*exp(x) - 40*a^2*b^4*(a^2 - b^2)^(1/2) - 16*a^4* 
b^2*(a^2 - b^2)^(1/2) - 112*a^2*b^5*exp(x) + 56*a^4*b^3*exp(x) - 72*a^3*b^ 
3*exp(x)*(a^2 - b^2)^(1/2) + 72*a*b^5*exp(x)*(a^2 - b^2)^(1/2) - 32*a^5*b* 
exp(x)*(a^2 - b^2)^(1/2)))/(a^4*(a^2 - b^2)^(1/2))
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 517, normalized size of antiderivative = 4.54 \[ \int \frac {\text {sech}^4(x)}{a+b \cosh (x)} \, dx=\frac {-4 a^{5}+6 e^{6 x} \mathit {atan} \left (e^{x}\right ) b^{5}+18 e^{4 x} \mathit {atan} \left (e^{x}\right ) b^{5}+18 e^{2 x} \mathit {atan} \left (e^{x}\right ) b^{5}-3 \mathit {atan} \left (e^{x}\right ) a^{4} b -3 \mathit {atan} \left (e^{x}\right ) a^{2} b^{3}-6 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} b +a}{\sqrt {-a^{2}+b^{2}}}\right ) b^{4}+2 e^{6 x} a^{3} b^{2}-2 e^{6 x} a \,b^{4}-3 e^{5 x} a^{4} b +3 e^{5 x} a^{2} b^{3}+6 e^{2 x} a^{3} b^{2}+6 e^{2 x} a \,b^{4}+3 e^{x} a^{4} b -3 e^{x} a^{2} b^{3}-3 e^{6 x} \mathit {atan} \left (e^{x}\right ) a^{4} b -3 e^{6 x} \mathit {atan} \left (e^{x}\right ) a^{2} b^{3}-9 e^{4 x} \mathit {atan} \left (e^{x}\right ) a^{4} b -9 e^{4 x} \mathit {atan} \left (e^{x}\right ) a^{2} b^{3}-9 e^{2 x} \mathit {atan} \left (e^{x}\right ) a^{4} b -9 e^{2 x} \mathit {atan} \left (e^{x}\right ) a^{2} b^{3}-6 e^{6 x} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} b +a}{\sqrt {-a^{2}+b^{2}}}\right ) b^{4}-18 e^{4 x} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} b +a}{\sqrt {-a^{2}+b^{2}}}\right ) b^{4}-18 e^{2 x} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} b +a}{\sqrt {-a^{2}+b^{2}}}\right ) b^{4}+6 \mathit {atan} \left (e^{x}\right ) b^{5}-12 e^{2 x} a^{5}+4 a \,b^{4}}{3 a^{4} \left (e^{6 x} a^{2}-e^{6 x} b^{2}+3 e^{4 x} a^{2}-3 e^{4 x} b^{2}+3 e^{2 x} a^{2}-3 e^{2 x} b^{2}+a^{2}-b^{2}\right )} \] Input:

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

Output:

( - 3*e**(6*x)*atan(e**x)*a**4*b - 3*e**(6*x)*atan(e**x)*a**2*b**3 + 6*e** 
(6*x)*atan(e**x)*b**5 - 9*e**(4*x)*atan(e**x)*a**4*b - 9*e**(4*x)*atan(e** 
x)*a**2*b**3 + 18*e**(4*x)*atan(e**x)*b**5 - 9*e**(2*x)*atan(e**x)*a**4*b 
- 9*e**(2*x)*atan(e**x)*a**2*b**3 + 18*e**(2*x)*atan(e**x)*b**5 - 3*atan(e 
**x)*a**4*b - 3*atan(e**x)*a**2*b**3 + 6*atan(e**x)*b**5 - 6*e**(6*x)*sqrt 
( - a**2 + b**2)*atan((e**x*b + a)/sqrt( - a**2 + b**2))*b**4 - 18*e**(4*x 
)*sqrt( - a**2 + b**2)*atan((e**x*b + a)/sqrt( - a**2 + b**2))*b**4 - 18*e 
**(2*x)*sqrt( - a**2 + b**2)*atan((e**x*b + a)/sqrt( - a**2 + b**2))*b**4 
- 6*sqrt( - a**2 + b**2)*atan((e**x*b + a)/sqrt( - a**2 + b**2))*b**4 + 2* 
e**(6*x)*a**3*b**2 - 2*e**(6*x)*a*b**4 - 3*e**(5*x)*a**4*b + 3*e**(5*x)*a* 
*2*b**3 - 12*e**(2*x)*a**5 + 6*e**(2*x)*a**3*b**2 + 6*e**(2*x)*a*b**4 + 3* 
e**x*a**4*b - 3*e**x*a**2*b**3 - 4*a**5 + 4*a*b**4)/(3*a**4*(e**(6*x)*a**2 
 - e**(6*x)*b**2 + 3*e**(4*x)*a**2 - 3*e**(4*x)*b**2 + 3*e**(2*x)*a**2 - 3 
*e**(2*x)*b**2 + a**2 - b**2))