\(\int \frac {\cosh ^2(c+d x)}{(a+b \sinh ^2(c+d x))^2} \, dx\) [297]

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

Optimal result

Integrand size = 23, antiderivative size = 79 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \sinh ^2(c+d x)\right )^2} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {a-b} d}+\frac {\tanh (c+d x)}{2 a d \left (a-(a-b) \tanh ^2(c+d x)\right )} \] Output:

1/2*arctanh((a-b)^(1/2)*tanh(d*x+c)/a^(1/2))/a^(3/2)/(a-b)^(1/2)/d+1/2*tan 
h(d*x+c)/a/d/(a-(a-b)*tanh(d*x+c)^2)
 

Mathematica [A] (verified)

Time = 0.36 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.99 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \sinh ^2(c+d x)\right )^2} \, dx=\frac {\frac {\text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b}}+\frac {\sqrt {a} \sinh (2 (c+d x))}{2 a-b+b \cosh (2 (c+d x))}}{2 a^{3/2} d} \] Input:

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

Output:

(ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]]/Sqrt[a - b] + (Sqrt[a]*Sinh[ 
2*(c + d*x)])/(2*a - b + b*Cosh[2*(c + d*x)]))/(2*a^(3/2)*d)
 

Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3670, 215, 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 \sinh ^2(c+d x)\right )^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (i c+i d x)^2}{\left (a-b \sin (i c+i d x)^2\right )^2}dx\)

\(\Big \downarrow \) 3670

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

\(\Big \downarrow \) 215

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

(ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]]/(2*a^(3/2)*Sqrt[a - b]) + Ta 
nh[c + d*x]/(2*a*(a - (a - b)*Tanh[c + d*x]^2)))/d
 

Defintions of rubi rules used

rule 215
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) 
/(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1))   Int[(a + b*x^2)^(p + 1 
), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 
*p])
 

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 3670
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( 
p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Su 
bst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, Tan[e 
 + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(235\) vs. \(2(67)=134\).

Time = 57.58 (sec) , antiderivative size = 236, normalized size of antiderivative = 2.99

method result size
risch \(-\frac {2 \,{\mathrm e}^{2 d x +2 c} a -{\mathrm e}^{2 d x +2 c} b +b}{a b d \left (b \,{\mathrm e}^{4 d x +4 c}+4 \,{\mathrm e}^{2 d x +2 c} a -2 \,{\mathrm e}^{2 d x +2 c} b +b \right )}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}-2 a^{2}+2 a b}{b \sqrt {a^{2}-a b}}\right )}{4 \sqrt {a^{2}-a b}\, d a}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}+2 a^{2}-2 a b}{b \sqrt {a^{2}-a b}}\right )}{4 \sqrt {a^{2}-a b}\, d a}\) \(236\)
derivativedivides \(\frac {-\frac {2 \left (-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 a}-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}\right )}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +4 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+a}+\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) a}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) a}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}}{d}\) \(252\)
default \(\frac {-\frac {2 \left (-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 a}-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}\right )}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +4 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+a}+\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) a}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) a}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}}{d}\) \(252\)

Input:

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

Output:

-(2*exp(2*d*x+2*c)*a-exp(2*d*x+2*c)*b+b)/a/b/d/(b*exp(4*d*x+4*c)+4*exp(2*d 
*x+2*c)*a-2*exp(2*d*x+2*c)*b+b)+1/4/(a^2-a*b)^(1/2)/d/a*ln(exp(2*d*x+2*c)+ 
(2*a*(a^2-a*b)^(1/2)-b*(a^2-a*b)^(1/2)-2*a^2+2*a*b)/b/(a^2-a*b)^(1/2))-1/4 
/(a^2-a*b)^(1/2)/d/a*ln(exp(2*d*x+2*c)+(2*a*(a^2-a*b)^(1/2)-b*(a^2-a*b)^(1 
/2)+2*a^2-2*a*b)/b/(a^2-a*b)^(1/2))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 582 vs. \(2 (68) = 136\).

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

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

Output:

[-1/4*(4*a^2*b - 4*a*b^2 + 4*(2*a^3 - 3*a^2*b + a*b^2)*cosh(d*x + c)^2 + 8 
*(2*a^3 - 3*a^2*b + a*b^2)*cosh(d*x + c)*sinh(d*x + c) + 4*(2*a^3 - 3*a^2* 
b + a*b^2)*sinh(d*x + c)^2 - (b^2*cosh(d*x + c)^4 + 4*b^2*cosh(d*x + c)*si 
nh(d*x + c)^3 + b^2*sinh(d*x + c)^4 + 2*(2*a*b - b^2)*cosh(d*x + c)^2 + 2* 
(3*b^2*cosh(d*x + c)^2 + 2*a*b - b^2)*sinh(d*x + c)^2 + b^2 + 4*(b^2*cosh( 
d*x + c)^3 + (2*a*b - b^2)*cosh(d*x + c))*sinh(d*x + c))*sqrt(a^2 - a*b)*l 
og((b^2*cosh(d*x + c)^4 + 4*b^2*cosh(d*x + c)*sinh(d*x + c)^3 + b^2*sinh(d 
*x + c)^4 + 2*(2*a*b - b^2)*cosh(d*x + c)^2 + 2*(3*b^2*cosh(d*x + c)^2 + 2 
*a*b - b^2)*sinh(d*x + c)^2 + 8*a^2 - 8*a*b + b^2 + 4*(b^2*cosh(d*x + c)^3 
 + (2*a*b - b^2)*cosh(d*x + c))*sinh(d*x + c) - 4*(b*cosh(d*x + c)^2 + 2*b 
*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + 2*a - b)*sqrt(a^2 - a*b 
))/(b*cosh(d*x + c)^4 + 4*b*cosh(d*x + c)*sinh(d*x + c)^3 + b*sinh(d*x + c 
)^4 + 2*(2*a - b)*cosh(d*x + c)^2 + 2*(3*b*cosh(d*x + c)^2 + 2*a - b)*sinh 
(d*x + c)^2 + 4*(b*cosh(d*x + c)^3 + (2*a - b)*cosh(d*x + c))*sinh(d*x + c 
) + b)))/((a^3*b^2 - a^2*b^3)*d*cosh(d*x + c)^4 + 4*(a^3*b^2 - a^2*b^3)*d* 
cosh(d*x + c)*sinh(d*x + c)^3 + (a^3*b^2 - a^2*b^3)*d*sinh(d*x + c)^4 + 2* 
(2*a^4*b - 3*a^3*b^2 + a^2*b^3)*d*cosh(d*x + c)^2 + 2*(3*(a^3*b^2 - a^2*b^ 
3)*d*cosh(d*x + c)^2 + (2*a^4*b - 3*a^3*b^2 + a^2*b^3)*d)*sinh(d*x + c)^2 
+ (a^3*b^2 - a^2*b^3)*d + 4*((a^3*b^2 - a^2*b^3)*d*cosh(d*x + c)^3 + (2*a^ 
4*b - 3*a^3*b^2 + a^2*b^3)*d*cosh(d*x + c))*sinh(d*x + c)), -1/2*(2*a^2...
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \sinh ^2(c+d x)\right )^2} \, dx=\text {Exception raised: ValueError} \] Input:

integrate(cosh(d*x+c)^2/(a+b*sinh(d*x+c)^2)^2,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(b-a>0)', see `assume?` for more 
details)Is
 

Giac [A] (verification not implemented)

Time = 0.46 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.59 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \sinh ^2(c+d x)\right )^2} \, dx=\frac {\frac {\arctan \left (\frac {b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a - b}{2 \, \sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} a} - \frac {2 \, {\left (2 \, a e^{\left (2 \, d x + 2 \, c\right )} - b e^{\left (2 \, d x + 2 \, c\right )} + b\right )}}{{\left (b e^{\left (4 \, d x + 4 \, c\right )} + 4 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + b\right )} a b}}{2 \, d} \] Input:

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

Output:

1/2*(arctan(1/2*(b*e^(2*d*x + 2*c) + 2*a - b)/sqrt(-a^2 + a*b))/(sqrt(-a^2 
 + a*b)*a) - 2*(2*a*e^(2*d*x + 2*c) - b*e^(2*d*x + 2*c) + b)/((b*e^(4*d*x 
+ 4*c) + 4*a*e^(2*d*x + 2*c) - 2*b*e^(2*d*x + 2*c) + b)*a*b))/d
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 700, normalized size of antiderivative = 8.86 \[ \int \frac {\cosh ^2(c+d x)}{\left (a+b \sinh ^2(c+d x)\right )^2} \, dx=\frac {e^{4 d x +4 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) b +e^{4 d x +4 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) b -e^{4 d x +4 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a -b}+e^{2 d x +2 c} b +2 a -b \right ) b +4 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) a -2 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) b +4 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) a -2 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) b -4 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a -b}+e^{2 d x +2 c} b +2 a -b \right ) a +2 e^{2 d x +2 c} \sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a -b}+e^{2 d x +2 c} b +2 a -b \right ) b +\sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) b +\sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a -b}-2 a +b}+e^{d x +c} \sqrt {b}\right ) b -\sqrt {a}\, \sqrt {a -b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a -b}+e^{2 d x +2 c} b +2 a -b \right ) b +2 e^{4 d x +4 c} a^{2}-2 e^{4 d x +4 c} a b -2 a^{2}+2 a b}{4 a^{2} d \left (e^{4 d x +4 c} a b -e^{4 d x +4 c} b^{2}+4 e^{2 d x +2 c} a^{2}-6 e^{2 d x +2 c} a b +2 e^{2 d x +2 c} b^{2}+a b -b^{2}\right )} \] Input:

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

Output:

(e**(4*c + 4*d*x)*sqrt(a)*sqrt(a - b)*log( - sqrt(2*sqrt(a)*sqrt(a - b) - 
2*a + b) + e**(c + d*x)*sqrt(b))*b + e**(4*c + 4*d*x)*sqrt(a)*sqrt(a - b)* 
log(sqrt(2*sqrt(a)*sqrt(a - b) - 2*a + b) + e**(c + d*x)*sqrt(b))*b - e**( 
4*c + 4*d*x)*sqrt(a)*sqrt(a - b)*log(2*sqrt(a)*sqrt(a - b) + e**(2*c + 2*d 
*x)*b + 2*a - b)*b + 4*e**(2*c + 2*d*x)*sqrt(a)*sqrt(a - b)*log( - sqrt(2* 
sqrt(a)*sqrt(a - b) - 2*a + b) + e**(c + d*x)*sqrt(b))*a - 2*e**(2*c + 2*d 
*x)*sqrt(a)*sqrt(a - b)*log( - sqrt(2*sqrt(a)*sqrt(a - b) - 2*a + b) + e** 
(c + d*x)*sqrt(b))*b + 4*e**(2*c + 2*d*x)*sqrt(a)*sqrt(a - b)*log(sqrt(2*s 
qrt(a)*sqrt(a - b) - 2*a + b) + e**(c + d*x)*sqrt(b))*a - 2*e**(2*c + 2*d* 
x)*sqrt(a)*sqrt(a - b)*log(sqrt(2*sqrt(a)*sqrt(a - b) - 2*a + b) + e**(c + 
 d*x)*sqrt(b))*b - 4*e**(2*c + 2*d*x)*sqrt(a)*sqrt(a - b)*log(2*sqrt(a)*sq 
rt(a - b) + e**(2*c + 2*d*x)*b + 2*a - b)*a + 2*e**(2*c + 2*d*x)*sqrt(a)*s 
qrt(a - b)*log(2*sqrt(a)*sqrt(a - b) + e**(2*c + 2*d*x)*b + 2*a - b)*b + s 
qrt(a)*sqrt(a - b)*log( - sqrt(2*sqrt(a)*sqrt(a - b) - 2*a + b) + e**(c + 
d*x)*sqrt(b))*b + sqrt(a)*sqrt(a - b)*log(sqrt(2*sqrt(a)*sqrt(a - b) - 2*a 
 + b) + e**(c + d*x)*sqrt(b))*b - sqrt(a)*sqrt(a - b)*log(2*sqrt(a)*sqrt(a 
 - b) + e**(2*c + 2*d*x)*b + 2*a - b)*b + 2*e**(4*c + 4*d*x)*a**2 - 2*e**( 
4*c + 4*d*x)*a*b - 2*a**2 + 2*a*b)/(4*a**2*d*(e**(4*c + 4*d*x)*a*b - e**(4 
*c + 4*d*x)*b**2 + 4*e**(2*c + 2*d*x)*a**2 - 6*e**(2*c + 2*d*x)*a*b + 2*e* 
*(2*c + 2*d*x)*b**2 + a*b - b**2))