3.1033 \(\int \frac{\sinh ^2(x)}{a+b \sinh (2 x)} \, dx\)

Optimal. Leaf size=52 \[ \frac{\tanh ^{-1}\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} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.162048, antiderivative size = 68, normalized size of antiderivative = 1.31, number of steps used = 9, number of rules used = 7, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.467, Rules used = {1075, 12, 634, 618, 206, 628, 260} \[ \frac{\tanh ^{-1}\left (\frac{b-a \tanh (x)}{\sqrt{a^2+b^2}}\right )}{2 \sqrt{a^2+b^2}}+\frac{\log \left (-a \tanh ^2(x)+a+2 b \tanh (x)\right )}{4 b}+\frac{\log (\cosh (x))}{2 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTanh[(b - a*Tanh[x])/Sqrt[a^2 + b^2]]/(2*Sqrt[a^2 + b^2]) + Log[Cosh[x]]/(2*b) + Log[a + 2*b*Tanh[x] - a*Ta
nh[x]^2]/(4*b)

Rule 1075

Int[((A_.) + (C_.)*(x_)^2)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_) + (f_.)*(x_)^2)), x_Symbol] :> With[{q =
c^2*d^2 + b^2*d*f - 2*a*c*d*f + a^2*f^2}, Dist[1/q, Int[(A*c^2*d - a*c*C*d + A*b^2*f - a*A*c*f + a^2*C*f + c*(
-(b*C*d) + A*b*f)*x)/(a + b*x + c*x^2), x], x] + Dist[1/q, Int[(c*C*d^2 - A*c*d*f - a*C*d*f + a*A*f^2 - f*(-(b
*C*d) + A*b*f)*x)/(d + f*x^2), x], x] /; NeQ[q, 0]] /; FreeQ[{a, b, c, d, f, A, C}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

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

Rule 206

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

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(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 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{\sinh ^2(x)}{a+b \sinh (2 x)} \, dx &=-\operatorname{Subst}\left (\int \frac{x^2}{\left (-1+x^2\right ) \left (a+2 b x-a x^2\right )} \, dx,x,\tanh (x)\right )\\ &=\frac{\operatorname{Subst}\left (\int -\frac{2 b x}{-1+x^2} \, dx,x,\tanh (x)\right )}{4 b^2}+\frac{\operatorname{Subst}\left (\int -\frac{2 a b x}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )}{4 b^2}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{x}{-1+x^2} \, dx,x,\tanh (x)\right )}{2 b}-\frac{a \operatorname{Subst}\left (\int \frac{x}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )}{2 b}\\ &=\frac{\log (\cosh (x))}{2 b}-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )+\frac{\operatorname{Subst}\left (\int \frac{2 b-2 a x}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )}{4 b}\\ &=\frac{\log (\cosh (x))}{2 b}+\frac{\log \left (a+2 b \tanh (x)-a \tanh ^2(x)\right )}{4 b}+\operatorname{Subst}\left (\int \frac{1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh (x)\right )\\ &=\frac{\tanh ^{-1}\left (\frac{2 b-2 a \tanh (x)}{2 \sqrt{a^2+b^2}}\right )}{2 \sqrt{a^2+b^2}}+\frac{\log (\cosh (x))}{2 b}+\frac{\log \left (a+2 b \tanh (x)-a \tanh ^2(x)\right )}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.0837305, size = 59, normalized size = 1.13 \[ \frac{1}{4} \left (\frac{\log (a+b \sinh (2 x))}{b}-\frac{2 \tan ^{-1}\left (\frac{b-a \tanh (x)}{\sqrt{-a^2-b^2}}\right )}{\sqrt{-a^2-b^2}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.053, size = 75, normalized size = 1.4 \begin{align*} -{\frac{\ln \left ( 1+\tanh \left ( x \right ) \right ) }{4\,b}}+{\frac{\ln \left ( a \left ( \tanh \left ( x \right ) \right ) ^{2}-2\,b\tanh \left ( x \right ) -a \right ) }{4\,b}}-{\frac{1}{2}{\it Artanh} \left ({\frac{2\,a\tanh \left ( x \right ) -2\,b}{2}{\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}}} \right ){\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}}}-{\frac{\ln \left ( \tanh \left ( x \right ) -1 \right ) }{4\,b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4/b*ln(1+tanh(x))+1/4/b*ln(a*tanh(x)^2-2*b*tanh(x)-a)-1/2/(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(tanh(x)-1)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)^2/(a+b*sinh(2*x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.89932, size = 730, normalized size = 14.04 \begin{align*} \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 )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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*c
osh(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*co
sh(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)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sinh ^{2}{\left (x \right )}}{a + b \sinh{\left (2 x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sinh(x)**2/(a + b*sinh(2*x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.21357, size = 124, normalized size = 2.38 \begin{align*} -\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} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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