\(\int \frac {\cosh ^2(c+d x)}{(a+b \text {sech}^2(c+d x))^3} \, dx\) [93]

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

Optimal result

Integrand size = 23, antiderivative size = 204 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx=\frac {(a-6 b) x}{2 a^4}+\frac {b^{3/2} \left (35 a^2+56 a b+24 b^2\right ) \text {arctanh}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{8 a^4 (a+b)^{5/2} d}+\frac {\cosh (c+d x) \sinh (c+d x)}{2 a d \left (a+b-b \tanh ^2(c+d x)\right )^2}+\frac {b (2 a+3 b) \tanh (c+d x)}{4 a^2 (a+b) d \left (a+b-b \tanh ^2(c+d x)\right )^2}+\frac {b (4 a+3 b) (a+4 b) \tanh (c+d x)}{8 a^3 (a+b)^2 d \left (a+b-b \tanh ^2(c+d x)\right )} \] Output:

1/2*(a-6*b)*x/a^4+1/8*b^(3/2)*(35*a^2+56*a*b+24*b^2)*arctanh(b^(1/2)*tanh( 
d*x+c)/(a+b)^(1/2))/a^4/(a+b)^(5/2)/d+1/2*cosh(d*x+c)*sinh(d*x+c)/a/d/(a+b 
-b*tanh(d*x+c)^2)^2+1/4*b*(2*a+3*b)*tanh(d*x+c)/a^2/(a+b)/d/(a+b-b*tanh(d* 
x+c)^2)^2+1/8*b*(4*a+3*b)*(a+4*b)*tanh(d*x+c)/a^3/(a+b)^2/d/(a+b-b*tanh(d* 
x+c)^2)
                                                                                    
                                                                                    
 

Mathematica [A] (verified)

Time = 2.92 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.76 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx=\frac {4 (a-6 b) (c+d x)+\frac {b^{3/2} \left (35 a^2+56 a b+24 b^2\right ) \text {arctanh}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{(a+b)^{5/2}}+a \left (2+\frac {13 a b^2}{(a+b)^2 (a+2 b+a \cosh (2 (c+d x)))}+\frac {2 b^3 (3 a+8 b+5 a \cosh (2 (c+d x)))}{(a+b)^2 (a+2 b+a \cosh (2 (c+d x)))^2}\right ) \sinh (2 (c+d x))}{8 a^4 d} \] Input:

Integrate[Cosh[c + d*x]^2/(a + b*Sech[c + d*x]^2)^3,x]
 

Output:

(4*(a - 6*b)*(c + d*x) + (b^(3/2)*(35*a^2 + 56*a*b + 24*b^2)*ArcTanh[(Sqrt 
[b]*Tanh[c + d*x])/Sqrt[a + b]])/(a + b)^(5/2) + a*(2 + (13*a*b^2)/((a + b 
)^2*(a + 2*b + a*Cosh[2*(c + d*x)])) + (2*b^3*(3*a + 8*b + 5*a*Cosh[2*(c + 
 d*x)]))/((a + b)^2*(a + 2*b + a*Cosh[2*(c + d*x)])^2))*Sinh[2*(c + d*x)]) 
/(8*a^4*d)
 

Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.20, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 4634, 316, 402, 27, 402, 25, 397, 219, 221}

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 {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sec (i c+i d x)^2 \left (a+b \sec (i c+i d x)^2\right )^3}dx\)

\(\Big \downarrow \) 4634

\(\displaystyle \frac {\int \frac {1}{\left (1-\tanh ^2(c+d x)\right )^2 \left (-b \tanh ^2(c+d x)+a+b\right )^3}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 316

\(\displaystyle \frac {\frac {\int \frac {-5 b \tanh ^2(c+d x)+a-b}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )^3}d\tanh (c+d x)}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {b (2 a+3 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )^2}-\frac {\int -\frac {2 \left (2 a^2-4 b a-3 b^2-3 b (2 a+3 b) \tanh ^2(c+d x)\right )}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )^2}d\tanh (c+d x)}{4 a (a+b)}}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\frac {\int \frac {2 a^2-4 b a-3 b^2-3 b (2 a+3 b) \tanh ^2(c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )^2}d\tanh (c+d x)}{2 a (a+b)}+\frac {b (2 a+3 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {\frac {b (4 a+3 b) (a+4 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}-\frac {\int -\frac {4 a^3-12 b a^2-25 b^2 a-12 b^3-b (4 a+3 b) (a+4 b) \tanh ^2(c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )}d\tanh (c+d x)}{2 a (a+b)}}{2 a (a+b)}+\frac {b (2 a+3 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {\frac {\int \frac {4 a^3-12 b a^2-25 b^2 a-12 b^3-b (4 a+3 b) (a+4 b) \tanh ^2(c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (-b \tanh ^2(c+d x)+a+b\right )}d\tanh (c+d x)}{2 a (a+b)}+\frac {b (4 a+3 b) (a+4 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{2 a (a+b)}+\frac {b (2 a+3 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {\frac {\frac {\frac {b^2 \left (35 a^2+56 a b+24 b^2\right ) \int \frac {1}{-b \tanh ^2(c+d x)+a+b}d\tanh (c+d x)}{a}+\frac {4 (a-6 b) (a+b)^2 \int \frac {1}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{a}}{2 a (a+b)}+\frac {b (4 a+3 b) (a+4 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{2 a (a+b)}+\frac {b (2 a+3 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\frac {\frac {\frac {\frac {b^2 \left (35 a^2+56 a b+24 b^2\right ) \int \frac {1}{-b \tanh ^2(c+d x)+a+b}d\tanh (c+d x)}{a}+\frac {4 (a-6 b) (a+b)^2 \text {arctanh}(\tanh (c+d x))}{a}}{2 a (a+b)}+\frac {b (4 a+3 b) (a+4 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{2 a (a+b)}+\frac {b (2 a+3 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {\frac {\frac {\frac {\frac {b^{3/2} \left (35 a^2+56 a b+24 b^2\right ) \text {arctanh}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}+\frac {4 (a-6 b) (a+b)^2 \text {arctanh}(\tanh (c+d x))}{a}}{2 a (a+b)}+\frac {b (4 a+3 b) (a+4 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )}}{2 a (a+b)}+\frac {b (2 a+3 b) \tanh (c+d x)}{2 a (a+b) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{2 a}+\frac {\tanh (c+d x)}{2 a \left (1-\tanh ^2(c+d x)\right ) \left (a-b \tanh ^2(c+d x)+b\right )^2}}{d}\)

Input:

Int[Cosh[c + d*x]^2/(a + b*Sech[c + d*x]^2)^3,x]
 

Output:

(Tanh[c + d*x]/(2*a*(1 - Tanh[c + d*x]^2)*(a + b - b*Tanh[c + d*x]^2)^2) + 
 ((b*(2*a + 3*b)*Tanh[c + d*x])/(2*a*(a + b)*(a + b - b*Tanh[c + d*x]^2)^2 
) + (((4*(a - 6*b)*(a + b)^2*ArcTanh[Tanh[c + d*x]])/a + (b^(3/2)*(35*a^2 
+ 56*a*b + 24*b^2)*ArcTanh[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a + b]])/(a*Sqrt[a 
 + b]))/(2*a*(a + b)) + (b*(4*a + 3*b)*(a + 4*b)*Tanh[c + d*x])/(2*a*(a + 
b)*(a + b - b*Tanh[c + d*x]^2)))/(2*a*(a + b)))/(2*a))/d
 

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 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

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 316
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) 
), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d))   Int[(a + b*x^2)^(p + 1)*(c + d*x 
^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x 
], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  ! 
( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, 
 p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 

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

rule 4634
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_) 
)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f 
Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), 
x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ 
[m/2] && IntegerQ[n/2]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(438\) vs. \(2(186)=372\).

Time = 4.07 (sec) , antiderivative size = 439, normalized size of antiderivative = 2.15

method result size
derivativedivides \(\frac {\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-a +6 b \right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{4}}-\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (a -6 b \right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{4}}-\frac {2 b^{2} \left (\frac {-\frac {a \left (13 a +8 b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{8 \left (a +b \right )}-\frac {a \left (39 a^{2}+19 a b -8 b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{8 \left (a +b \right )^{2}}-\frac {a \left (39 a^{2}+19 a b -8 b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{8 \left (a +b \right )^{2}}-\frac {a \left (13 a +8 b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 \left (a +b \right )}}{\left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b \right )^{2}}+\frac {\left (35 a^{2}+56 a b +24 b^{2}\right ) \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{8 a^{2}+16 a b +8 b^{2}}\right )}{a^{4}}}{d}\) \(439\)
default \(\frac {\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-a +6 b \right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{4}}-\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {1}{2 a^{3} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (a -6 b \right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{4}}-\frac {2 b^{2} \left (\frac {-\frac {a \left (13 a +8 b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{8 \left (a +b \right )}-\frac {a \left (39 a^{2}+19 a b -8 b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{8 \left (a +b \right )^{2}}-\frac {a \left (39 a^{2}+19 a b -8 b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{8 \left (a +b \right )^{2}}-\frac {a \left (13 a +8 b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 \left (a +b \right )}}{\left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b \right )^{2}}+\frac {\left (35 a^{2}+56 a b +24 b^{2}\right ) \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{8 a^{2}+16 a b +8 b^{2}}\right )}{a^{4}}}{d}\) \(439\)
risch \(\frac {x}{2 a^{3}}-\frac {3 x b}{a^{4}}+\frac {{\mathrm e}^{2 d x +2 c}}{8 a^{3} d}-\frac {{\mathrm e}^{-2 d x -2 c}}{8 a^{3} d}-\frac {b^{2} \left (13 a^{3} {\mathrm e}^{6 d x +6 c}+40 a^{2} b \,{\mathrm e}^{6 d x +6 c}+24 a \,b^{2} {\mathrm e}^{6 d x +6 c}+39 a^{3} {\mathrm e}^{4 d x +4 c}+134 a^{2} b \,{\mathrm e}^{4 d x +4 c}+184 a \,b^{2} {\mathrm e}^{4 d x +4 c}+80 b^{3} {\mathrm e}^{4 d x +4 c}+39 a^{3} {\mathrm e}^{2 d x +2 c}+104 a^{2} b \,{\mathrm e}^{2 d x +2 c}+56 a \,b^{2} {\mathrm e}^{2 d x +2 c}+13 a^{3}+10 a^{2} b \right )}{4 a^{4} d \left (a +b \right )^{2} \left ({\mathrm e}^{4 d x +4 c} a +2 a \,{\mathrm e}^{2 d x +2 c}+4 b \,{\mathrm e}^{2 d x +2 c}+a \right )^{2}}+\frac {35 \sqrt {b \left (a +b \right )}\, b \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {-a +2 \sqrt {b \left (a +b \right )}-2 b}{a}\right )}{16 \left (a +b \right )^{3} d \,a^{2}}+\frac {7 \sqrt {b \left (a +b \right )}\, b^{2} \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {-a +2 \sqrt {b \left (a +b \right )}-2 b}{a}\right )}{2 \left (a +b \right )^{3} d \,a^{3}}+\frac {3 \sqrt {b \left (a +b \right )}\, b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {-a +2 \sqrt {b \left (a +b \right )}-2 b}{a}\right )}{2 \left (a +b \right )^{3} d \,a^{4}}-\frac {35 \sqrt {b \left (a +b \right )}\, b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {b \left (a +b \right )}+2 b}{a}\right )}{16 \left (a +b \right )^{3} d \,a^{2}}-\frac {7 \sqrt {b \left (a +b \right )}\, b^{2} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {b \left (a +b \right )}+2 b}{a}\right )}{2 \left (a +b \right )^{3} d \,a^{3}}-\frac {3 \sqrt {b \left (a +b \right )}\, b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {b \left (a +b \right )}+2 b}{a}\right )}{2 \left (a +b \right )^{3} d \,a^{4}}\) \(579\)

Input:

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

Output:

1/d*(1/2/a^3/(tanh(1/2*d*x+1/2*c)-1)^2+1/2/a^3/(tanh(1/2*d*x+1/2*c)-1)+1/2 
/a^4*(-a+6*b)*ln(tanh(1/2*d*x+1/2*c)-1)-1/2/a^3/(tanh(1/2*d*x+1/2*c)+1)^2+ 
1/2/a^3/(tanh(1/2*d*x+1/2*c)+1)+1/2*(a-6*b)/a^4*ln(tanh(1/2*d*x+1/2*c)+1)- 
2*b^2/a^4*((-1/8*a*(13*a+8*b)/(a+b)*tanh(1/2*d*x+1/2*c)^7-1/8*a*(39*a^2+19 
*a*b-8*b^2)/(a+b)^2*tanh(1/2*d*x+1/2*c)^5-1/8*a*(39*a^2+19*a*b-8*b^2)/(a+b 
)^2*tanh(1/2*d*x+1/2*c)^3-1/8*a*(13*a+8*b)/(a+b)*tanh(1/2*d*x+1/2*c))/(tan 
h(1/2*d*x+1/2*c)^4*a+tanh(1/2*d*x+1/2*c)^4*b+2*tanh(1/2*d*x+1/2*c)^2*a-2*t 
anh(1/2*d*x+1/2*c)^2*b+a+b)^2+1/8*(35*a^2+56*a*b+24*b^2)/(a^2+2*a*b+b^2)*( 
-1/4/b^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*d*x+1/2*c)^2+2*tanh(1/2*d 
*x+1/2*c)*b^(1/2)+(a+b)^(1/2))+1/4/b^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh 
(1/2*d*x+1/2*c)^2-2*tanh(1/2*d*x+1/2*c)*b^(1/2)+(a+b)^(1/2)))))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 5729 vs. \(2 (195) = 390\).

Time = 0.53 (sec) , antiderivative size = 11740, normalized size of antiderivative = 57.55 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx=\text {Too large to display} \] Input:

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

Output:

Too large to include
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx=\text {Timed out} \] Input:

integrate(cosh(d*x+c)**2/(a+b*sech(d*x+c)**2)**3,x)
 

Output:

Timed out
                                                                                    
                                                                                    
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1373 vs. \(2 (195) = 390\).

Time = 0.22 (sec) , antiderivative size = 1373, normalized size of antiderivative = 6.73 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx=\text {Too large to display} \] Input:

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

Output:

3/64*(5*a^3*b + 30*a^2*b^2 + 40*a*b^3 + 16*b^4)*log((a*e^(2*d*x + 2*c) + a 
 + 2*b - 2*sqrt((a + b)*b))/(a*e^(2*d*x + 2*c) + a + 2*b + 2*sqrt((a + b)* 
b)))/((a^6 + 2*a^5*b + a^4*b^2)*sqrt((a + b)*b)*d) - 3/64*(5*a^3*b + 30*a^ 
2*b^2 + 40*a*b^3 + 16*b^4)*log((a*e^(-2*d*x - 2*c) + a + 2*b - 2*sqrt((a + 
 b)*b))/(a*e^(-2*d*x - 2*c) + a + 2*b + 2*sqrt((a + b)*b)))/((a^6 + 2*a^5* 
b + a^4*b^2)*sqrt((a + b)*b)*d) + 1/32*(15*a^2*b + 20*a*b^2 + 8*b^3)*log(( 
a*e^(-2*d*x - 2*c) + a + 2*b - 2*sqrt((a + b)*b))/(a*e^(-2*d*x - 2*c) + a 
+ 2*b + 2*sqrt((a + b)*b)))/((a^5 + 2*a^4*b + a^3*b^2)*sqrt((a + b)*b)*d) 
- 1/16*(9*a^4*b + 32*a^3*b^2 + 20*a^2*b^3 + 3*(3*a^4*b + 34*a^3*b^2 + 64*a 
^2*b^3 + 32*a*b^4)*e^(6*d*x + 6*c) + (27*a^4*b + 264*a^3*b^2 + 740*a^2*b^3 
 + 832*a*b^4 + 320*b^5)*e^(4*d*x + 4*c) + (27*a^4*b + 194*a^3*b^2 + 336*a^ 
2*b^3 + 160*a*b^4)*e^(2*d*x + 2*c))/((a^8 + 2*a^7*b + a^6*b^2 + (a^8 + 2*a 
^7*b + a^6*b^2)*e^(8*d*x + 8*c) + 4*(a^8 + 4*a^7*b + 5*a^6*b^2 + 2*a^5*b^3 
)*e^(6*d*x + 6*c) + 2*(3*a^8 + 14*a^7*b + 27*a^6*b^2 + 24*a^5*b^3 + 8*a^4* 
b^4)*e^(4*d*x + 4*c) + 4*(a^8 + 4*a^7*b + 5*a^6*b^2 + 2*a^5*b^3)*e^(2*d*x 
+ 2*c))*d) + 1/16*(9*a^4*b + 32*a^3*b^2 + 20*a^2*b^3 + (27*a^4*b + 194*a^3 
*b^2 + 336*a^2*b^3 + 160*a*b^4)*e^(-2*d*x - 2*c) + (27*a^4*b + 264*a^3*b^2 
 + 740*a^2*b^3 + 832*a*b^4 + 320*b^5)*e^(-4*d*x - 4*c) + 3*(3*a^4*b + 34*a 
^3*b^2 + 64*a^2*b^3 + 32*a*b^4)*e^(-6*d*x - 6*c))/((a^8 + 2*a^7*b + a^6*b^ 
2 + 4*(a^8 + 4*a^7*b + 5*a^6*b^2 + 2*a^5*b^3)*e^(-2*d*x - 2*c) + 2*(3*a...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 395 vs. \(2 (195) = 390\).

Time = 0.63 (sec) , antiderivative size = 395, normalized size of antiderivative = 1.94 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx=\frac {\frac {{\left (35 \, a^{2} b^{2} + 56 \, a b^{3} + 24 \, b^{4}\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + a + 2 \, b}{2 \, \sqrt {-a b - b^{2}}}\right )}{{\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \sqrt {-a b - b^{2}}} - \frac {2 \, {\left (13 \, a^{3} b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 40 \, a^{2} b^{3} e^{\left (6 \, d x + 6 \, c\right )} + 24 \, a b^{4} e^{\left (6 \, d x + 6 \, c\right )} + 39 \, a^{3} b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 134 \, a^{2} b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 184 \, a b^{4} e^{\left (4 \, d x + 4 \, c\right )} + 80 \, b^{5} e^{\left (4 \, d x + 4 \, c\right )} + 39 \, a^{3} b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 104 \, a^{2} b^{3} e^{\left (2 \, d x + 2 \, c\right )} + 56 \, a b^{4} e^{\left (2 \, d x + 2 \, c\right )} + 13 \, a^{3} b^{2} + 10 \, a^{2} b^{3}\right )}}{{\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} {\left (a e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + a\right )}^{2}} + \frac {4 \, {\left (d x + c\right )} {\left (a - 6 \, b\right )}}{a^{4}} + \frac {e^{\left (2 \, d x + 2 \, c\right )}}{a^{3}} - \frac {{\left (2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 12 \, b e^{\left (2 \, d x + 2 \, c\right )} + a\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{a^{4}}}{8 \, d} \] Input:

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

Output:

1/8*((35*a^2*b^2 + 56*a*b^3 + 24*b^4)*arctan(1/2*(a*e^(2*d*x + 2*c) + a + 
2*b)/sqrt(-a*b - b^2))/((a^6 + 2*a^5*b + a^4*b^2)*sqrt(-a*b - b^2)) - 2*(1 
3*a^3*b^2*e^(6*d*x + 6*c) + 40*a^2*b^3*e^(6*d*x + 6*c) + 24*a*b^4*e^(6*d*x 
 + 6*c) + 39*a^3*b^2*e^(4*d*x + 4*c) + 134*a^2*b^3*e^(4*d*x + 4*c) + 184*a 
*b^4*e^(4*d*x + 4*c) + 80*b^5*e^(4*d*x + 4*c) + 39*a^3*b^2*e^(2*d*x + 2*c) 
 + 104*a^2*b^3*e^(2*d*x + 2*c) + 56*a*b^4*e^(2*d*x + 2*c) + 13*a^3*b^2 + 1 
0*a^2*b^3)/((a^6 + 2*a^5*b + a^4*b^2)*(a*e^(4*d*x + 4*c) + 2*a*e^(2*d*x + 
2*c) + 4*b*e^(2*d*x + 2*c) + a)^2) + 4*(d*x + c)*(a - 6*b)/a^4 + e^(2*d*x 
+ 2*c)/a^3 - (2*a*e^(2*d*x + 2*c) - 12*b*e^(2*d*x + 2*c) + a)*e^(-2*d*x - 
2*c)/a^4)/d
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx=\int \frac {{\mathrm {cosh}\left (c+d\,x\right )}^2}{{\left (a+\frac {b}{{\mathrm {cosh}\left (c+d\,x\right )}^2}\right )}^3} \,d x \] Input:

int(cosh(c + d*x)^2/(a + b/cosh(c + d*x)^2)^3,x)
 

Output:

int(cosh(c + d*x)^2/(a + b/cosh(c + d*x)^2)^3, x)
 

Reduce [B] (verification not implemented)

Time = 0.58 (sec) , antiderivative size = 5371, normalized size of antiderivative = 26.33 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \text {sech}^2(c+d x)\right )^3} \, dx =\text {Too large to display} \] Input:

int(cosh(d*x+c)^2/(a+b*sech(d*x+c)^2)^3,x)
 

Output:

(70*e**(10*c + 10*d*x)*sqrt(b)*sqrt(a + b)*log( - sqrt(2*sqrt(b)*sqrt(a + 
b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a**5*b + 252*e**(10*c + 10*d*x)*sqrt 
(b)*sqrt(a + b)*log( - sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x 
)*sqrt(a))*a**4*b**2 + 272*e**(10*c + 10*d*x)*sqrt(b)*sqrt(a + b)*log( - s 
qrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a**3*b**3 + 9 
6*e**(10*c + 10*d*x)*sqrt(b)*sqrt(a + b)*log( - sqrt(2*sqrt(b)*sqrt(a + b) 
 - a - 2*b) + e**(c + d*x)*sqrt(a))*a**2*b**4 + 70*e**(10*c + 10*d*x)*sqrt 
(b)*sqrt(a + b)*log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*s 
qrt(a))*a**5*b + 252*e**(10*c + 10*d*x)*sqrt(b)*sqrt(a + b)*log(sqrt(2*sqr 
t(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a**4*b**2 + 272*e**(10 
*c + 10*d*x)*sqrt(b)*sqrt(a + b)*log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) 
 + e**(c + d*x)*sqrt(a))*a**3*b**3 + 96*e**(10*c + 10*d*x)*sqrt(b)*sqrt(a 
+ b)*log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a** 
2*b**4 - 70*e**(10*c + 10*d*x)*sqrt(b)*sqrt(a + b)*log(2*sqrt(b)*sqrt(a + 
b) + e**(2*c + 2*d*x)*a + a + 2*b)*a**5*b - 252*e**(10*c + 10*d*x)*sqrt(b) 
*sqrt(a + b)*log(2*sqrt(b)*sqrt(a + b) + e**(2*c + 2*d*x)*a + a + 2*b)*a** 
4*b**2 - 272*e**(10*c + 10*d*x)*sqrt(b)*sqrt(a + b)*log(2*sqrt(b)*sqrt(a + 
 b) + e**(2*c + 2*d*x)*a + a + 2*b)*a**3*b**3 - 96*e**(10*c + 10*d*x)*sqrt 
(b)*sqrt(a + b)*log(2*sqrt(b)*sqrt(a + b) + e**(2*c + 2*d*x)*a + a + 2*b)* 
a**2*b**4 + 280*e**(8*c + 8*d*x)*sqrt(b)*sqrt(a + b)*log( - sqrt(2*sqrt...