3.11.33 \(\int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx\) [1033]

3.11.33.1 Optimal result
3.11.33.2 Mathematica [A] (verified)
3.11.33.3 Rubi [A] (verified)
3.11.33.4 Maple [A] (verified)
3.11.33.5 Fricas [B] (verification not implemented)
3.11.33.6 Sympy [F]
3.11.33.7 Maxima [A] (verification not implemented)
3.11.33.8 Giac [A] (verification not implemented)
3.11.33.9 Mupad [B] (verification not implemented)

3.11.33.1 Optimal result

Integrand size = 15, antiderivative size = 52 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\text {arctanh}\left (\frac {b-a \tanh (x)}{\sqrt {a^2+b^2}}\right )}{2 \sqrt {a^2+b^2}}+\frac {\log (a+b \sinh (2 x))}{4 b} \]

output
1/4*ln(a+b*sinh(2*x))/b+1/2*arctanh((b-a*tanh(x))/(a^2+b^2)^(1/2))/(a^2+b^ 
2)^(1/2)
 
3.11.33.2 Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.13 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {1}{4} \left (-\frac {2 \arctan \left (\frac {b-a \tanh (x)}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}+\frac {\log (a+b \sinh (2 x))}{b}\right ) \]

input
Integrate[Sinh[x]^2/(a + b*Sinh[2*x]),x]
 
output
((-2*ArcTan[(b - a*Tanh[x])/Sqrt[-a^2 - b^2]])/Sqrt[-a^2 - b^2] + Log[a + 
b*Sinh[2*x]]/b)/4
 
3.11.33.3 Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.73, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.800, Rules used = {3042, 25, 4889, 25, 2142, 27, 240, 1142, 27, 1083, 219, 1103}

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 {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\sin (i x)^2}{a-i b \sin (2 i x)}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\sin (i x)^2}{a-i b \sin (2 i x)}dx\)

\(\Big \downarrow \) 4889

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 2142

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 240

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

\(\Big \downarrow \) 1142

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 1083

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

\(\Big \downarrow \) 219

\(\displaystyle -\frac {a \left (-\frac {\int \frac {b-a \tanh (x)}{-a \tanh ^2(x)+2 b \tanh (x)+a}d\tanh (x)}{a}-\frac {b \text {arctanh}\left (\frac {2 b-2 a \tanh (x)}{2 \sqrt {a^2+b^2}}\right )}{a \sqrt {a^2+b^2}}\right )}{2 b}-\frac {\log \left (1-\tanh ^2(x)\right )}{4 b}\)

\(\Big \downarrow \) 1103

\(\displaystyle -\frac {a \left (-\frac {b \text {arctanh}\left (\frac {2 b-2 a \tanh (x)}{2 \sqrt {a^2+b^2}}\right )}{a \sqrt {a^2+b^2}}-\frac {\log \left (-a \tanh ^2(x)+a+2 b \tanh (x)\right )}{2 a}\right )}{2 b}-\frac {\log \left (1-\tanh ^2(x)\right )}{4 b}\)

input
Int[Sinh[x]^2/(a + b*Sinh[2*x]),x]
 
output
-1/4*Log[1 - Tanh[x]^2]/b - (a*(-((b*ArcTanh[(2*b - 2*a*Tanh[x])/(2*Sqrt[a 
^2 + b^2])])/(a*Sqrt[a^2 + b^2])) - Log[a + 2*b*Tanh[x] - a*Tanh[x]^2]/(2* 
a)))/(2*b)
 

3.11.33.3.1 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 240
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x 
^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

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

rule 2142
Int[(Px_)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_) + (f_.)*(x_)^2)), x_Sym 
bol] :> With[{A = Coeff[Px, x, 0], B = Coeff[Px, x, 1], C = Coeff[Px, x, 2] 
, q = c^2*d^2 + b^2*d*f - 2*a*c*d*f + a^2*f^2}, Simp[1/q   Int[(A*c^2*d - a 
*c*C*d + A*b^2*f - a*b*B*f - a*A*c*f + a^2*C*f + c*(B*c*d - b*C*d + A*b*f - 
 a*B*f)*x)/(a + b*x + c*x^2), x], x] + Simp[1/q   Int[(c*C*d^2 + b*B*d*f - 
A*c*d*f - a*C*d*f + a*A*f^2 - f*(B*c*d - b*C*d + A*b*f - a*B*f)*x)/(d + f*x 
^2), x], x] /; NeQ[q, 0]] /; FreeQ[{a, b, c, d, f}, x] && PolyQ[Px, x, 2]
 

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

rule 4889
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors 
[Tan[v], x]}, Simp[d/Coefficient[v, x, 1]   Subst[Int[SubstFor[1/(1 + d^2*x 
^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /;  !FalseQ[v] && FunctionOfQ[N 
onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] &&  !MatchQ[ 
u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I 
ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
 
3.11.33.4 Maple [A] (verified)

Time = 1.45 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.65

method result size
default \(\frac {a \left (\frac {\ln \left (a \tanh \left (x \right )^{2}-2 b \tanh \left (x \right )-a \right )}{2 a}-\frac {b \,\operatorname {arctanh}\left (\frac {2 a \tanh \left (x \right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a \sqrt {a^{2}+b^{2}}}\right )}{2 b}-\frac {\ln \left (1+\tanh \left (x \right )\right )}{4 b}-\frac {\ln \left (\tanh \left (x \right )-1\right )}{4 b}\) \(86\)
risch \(\frac {x}{2 b}-\frac {x \,a^{2} b}{a^{2} b^{2}+b^{4}}-\frac {x \,b^{3}}{a^{2} b^{2}+b^{4}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right ) a^{2}}{4 \left (a^{2}+b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right )}{4 a^{2}+4 b^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right ) \sqrt {a^{2} b^{2}+b^{4}}}{4 \left (a^{2}+b^{2}\right ) b}+\frac {\ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right ) a^{2}}{4 \left (a^{2}+b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right )}{4 a^{2}+4 b^{2}}-\frac {\ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right ) \sqrt {a^{2} b^{2}+b^{4}}}{4 \left (a^{2}+b^{2}\right ) b}\) \(327\)

input
int(sinh(x)^2/(a+b*sinh(2*x)),x,method=_RETURNVERBOSE)
 
output
1/2/b*a*(1/2/a*ln(a*tanh(x)^2-2*b*tanh(x)-a)-1/a*b/(a^2+b^2)^(1/2)*arctanh 
(1/2*(2*a*tanh(x)-2*b)/(a^2+b^2)^(1/2)))-1/4/b*ln(1+tanh(x))-1/4/b*ln(tanh 
(x)-1)
 
3.11.33.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 251 vs. \(2 (46) = 92\).

Time = 0.27 (sec) , antiderivative size = 251, normalized size of antiderivative = 4.83 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\sqrt {a^{2} + b^{2}} b \log \left (\frac {b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} + 2 \, a b \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + a b\right )} \sinh \left (x\right )^{2} + 2 \, a^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + a b \cosh \left (x\right )\right )} \sinh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + a\right )} \sqrt {a^{2} + b^{2}}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, a \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} + a\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} + a \cosh \left (x\right )\right )} \sinh \left (x\right ) - b}\right ) - 2 \, {\left (a^{2} + b^{2}\right )} x + {\left (a^{2} + b^{2}\right )} \log \left (\frac {2 \, {\left (2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right )}{4 \, {\left (a^{2} b + b^{3}\right )}} \]

input
integrate(sinh(x)^2/(a+b*sinh(2*x)),x, algorithm="fricas")
 
output
1/4*(sqrt(a^2 + b^2)*b*log((b^2*cosh(x)^4 + 4*b^2*cosh(x)*sinh(x)^3 + b^2* 
sinh(x)^4 + 2*a*b*cosh(x)^2 + 2*(3*b^2*cosh(x)^2 + a*b)*sinh(x)^2 + 2*a^2 
+ b^2 + 4*(b^2*cosh(x)^3 + a*b*cosh(x))*sinh(x) + 2*(b*cosh(x)^2 + 2*b*cos 
h(x)*sinh(x) + b*sinh(x)^2 + a)*sqrt(a^2 + b^2))/(b*cosh(x)^4 + 4*b*cosh(x 
)*sinh(x)^3 + b*sinh(x)^4 + 2*a*cosh(x)^2 + 2*(3*b*cosh(x)^2 + a)*sinh(x)^ 
2 + 4*(b*cosh(x)^3 + a*cosh(x))*sinh(x) - b)) - 2*(a^2 + b^2)*x + (a^2 + b 
^2)*log(2*(2*b*cosh(x)*sinh(x) + a)/(cosh(x)^2 - 2*cosh(x)*sinh(x) + sinh( 
x)^2)))/(a^2*b + b^3)
 
3.11.33.6 Sympy [F]

\[ \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx=\int \frac {\sinh ^{2}{\left (x \right )}}{a + b \sinh {\left (2 x \right )}}\, dx \]

input
integrate(sinh(x)**2/(a+b*sinh(2*x)),x)
 
output
Integral(sinh(x)**2/(a + b*sinh(2*x)), x)
 
3.11.33.7 Maxima [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.63 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx=-\frac {\log \left (\frac {b e^{\left (-2 \, x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-2 \, x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{4 \, \sqrt {a^{2} + b^{2}}} - \frac {x}{2 \, b} + \frac {\log \left (b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - b\right )}{4 \, b} \]

input
integrate(sinh(x)^2/(a+b*sinh(2*x)),x, algorithm="maxima")
 
output
-1/4*log((b*e^(-2*x) - a - sqrt(a^2 + b^2))/(b*e^(-2*x) - a + sqrt(a^2 + b 
^2)))/sqrt(a^2 + b^2) - 1/2*x/b + 1/4*log(b*e^(4*x) + 2*a*e^(2*x) - b)/b
 
3.11.33.8 Giac [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.77 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx=-\frac {\log \left (\frac {{\left | 2 \, b e^{\left (2 \, x\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (2 \, x\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{4 \, \sqrt {a^{2} + b^{2}}} - \frac {x}{2 \, b} + \frac {\log \left ({\left | b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - b \right |}\right )}{4 \, b} \]

input
integrate(sinh(x)^2/(a+b*sinh(2*x)),x, algorithm="giac")
 
output
-1/4*log(abs(2*b*e^(2*x) + 2*a - 2*sqrt(a^2 + b^2))/abs(2*b*e^(2*x) + 2*a 
+ 2*sqrt(a^2 + b^2)))/sqrt(a^2 + b^2) - 1/2*x/b + 1/4*log(abs(b*e^(4*x) + 
2*a*e^(2*x) - b))/b
 
3.11.33.9 Mupad [B] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 273, normalized size of antiderivative = 5.25 \[ \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\mathrm {atan}\left (\frac {a^7}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {b^7\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {a\,b^6}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^3\,b^4}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^5\,b^2}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^2\,b^5\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^4\,b^3\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {a^6\,b\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}\right )}{2\,\sqrt {-a^2-b^2}}-\frac {x}{2\,b}+\frac {4\,b^3\,\ln \left (2\,a\,{\mathrm {e}}^{2\,x}-b+b\,{\mathrm {e}}^{4\,x}\right )}{16\,a^2\,b^2+16\,b^4}+\frac {4\,a^2\,b\,\ln \left (2\,a\,{\mathrm {e}}^{2\,x}-b+b\,{\mathrm {e}}^{4\,x}\right )}{16\,a^2\,b^2+16\,b^4} \]

input
int(sinh(x)^2/(a + b*sinh(2*x)),x)
 
output
atan(a^7/(- a^2 - b^2)^(7/2) + (b^7*exp(2*x))/(- a^2 - b^2)^(7/2) + (a*b^6 
)/(- a^2 - b^2)^(7/2) + (3*a^3*b^4)/(- a^2 - b^2)^(7/2) + (3*a^5*b^2)/(- a 
^2 - b^2)^(7/2) + (3*a^2*b^5*exp(2*x))/(- a^2 - b^2)^(7/2) + (3*a^4*b^3*ex 
p(2*x))/(- a^2 - b^2)^(7/2) + (a^6*b*exp(2*x))/(- a^2 - b^2)^(7/2))/(2*(- 
a^2 - b^2)^(1/2)) - x/(2*b) + (4*b^3*log(2*a*exp(2*x) - b + b*exp(4*x)))/( 
16*b^4 + 16*a^2*b^2) + (4*a^2*b*log(2*a*exp(2*x) - b + b*exp(4*x)))/(16*b^ 
4 + 16*a^2*b^2)