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

Optimal. Leaf size=52 \[ \frac {x}{2 b}-\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (x)}{\sqrt {a+b}}\right )}{2 b \sqrt {a-b}} \]

[Out]

1/2*x/b-1/2*arctanh((a-b)^(1/2)*tanh(x)/(a+b)^(1/2))*(a+b)^(1/2)/b/(a-b)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {1130, 208} \[ \frac {x}{2 b}-\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (x)}{\sqrt {a+b}}\right )}{2 b \sqrt {a-b}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/(2*b) - (Sqrt[a + b]*ArcTanh[(Sqrt[a - b]*Tanh[x])/Sqrt[a + b]])/(2*Sqrt[a - b]*b)

Rule 208

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

Rule 1130

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2*(b/q + 1))/2, Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2*(b/q - 1))/2, Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 48, normalized size = 0.92 \[ \frac {\frac {(a+b) \tan ^{-1}\left (\frac {(a-b) \tanh (x)}{\sqrt {b^2-a^2}}\right )}{\sqrt {b^2-a^2}}+x}{2 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 303, normalized size = 5.83 \[ \left [\frac {\sqrt {\frac {a + b}{a - b}} \log \left (\frac {b^{2} \cosh \relax (x)^{4} + 4 \, b^{2} \cosh \relax (x) \sinh \relax (x)^{3} + b^{2} \sinh \relax (x)^{4} + 2 \, a b \cosh \relax (x)^{2} + 2 \, {\left (3 \, b^{2} \cosh \relax (x)^{2} + a b\right )} \sinh \relax (x)^{2} + 2 \, a^{2} - b^{2} + 4 \, {\left (b^{2} \cosh \relax (x)^{3} + a b \cosh \relax (x)\right )} \sinh \relax (x) + 2 \, {\left ({\left (a b - b^{2}\right )} \cosh \relax (x)^{2} + 2 \, {\left (a b - b^{2}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a b - b^{2}\right )} \sinh \relax (x)^{2} + a^{2} - a b\right )} \sqrt {\frac {a + b}{a - b}}}{b \cosh \relax (x)^{4} + 4 \, b \cosh \relax (x) \sinh \relax (x)^{3} + b \sinh \relax (x)^{4} + 2 \, a \cosh \relax (x)^{2} + 2 \, {\left (3 \, b \cosh \relax (x)^{2} + a\right )} \sinh \relax (x)^{2} + 4 \, {\left (b \cosh \relax (x)^{3} + a \cosh \relax (x)\right )} \sinh \relax (x) + b}\right ) + 2 \, x}{4 \, b}, -\frac {\sqrt {-\frac {a + b}{a - b}} \arctan \left (\frac {{\left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + a\right )} \sqrt {-\frac {a + b}{a - b}}}{a + b}\right ) - x}{2 \, b}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[1/4*(sqrt((a + b)/(a - 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*((a*b - b^2)*co
sh(x)^2 + 2*(a*b - b^2)*cosh(x)*sinh(x) + (a*b - b^2)*sinh(x)^2 + a^2 - a*b)*sqrt((a + b)/(a - b)))/(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*x)/b, -1/2*(sqrt(-(a + b)/(a - b))*arctan((b*cosh(x)^2 + 2*b*cosh(x)*sinh(x) + b*
sinh(x)^2 + a)*sqrt(-(a + b)/(a - b))/(a + b)) - x)/b]

________________________________________________________________________________________

giac [A]  time = 0.14, size = 47, normalized size = 0.90 \[ -\frac {{\left (a + b\right )} \arctan \left (\frac {b e^{\left (2 \, x\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{2 \, \sqrt {-a^{2} + b^{2}} b} + \frac {x}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.28, size = 92, normalized size = 1.77 \[ -\frac {\ln \left (\tanh \relax (x )-1\right )}{4 b}+\frac {\ln \left (1+\tanh \relax (x )\right )}{4 b}-\frac {\arctanh \left (\frac {\left (a -b \right ) \tanh \relax (x )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right ) a}{2 b \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {\arctanh \left (\frac {\left (a -b \right ) \tanh \relax (x )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \sqrt {\left (a +b \right ) \left (a -b \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4/b*ln(tanh(x)-1)+1/4/b*ln(1+tanh(x))-1/2/b/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh(x)/((a+b)*(a-b))^(1/2))*
a-1/2/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh(x)/((a+b)*(a-b))^(1/2))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.15, size = 153, normalized size = 2.94 \[ \frac {x}{2\,b}-\frac {\ln \left (a\,b+2\,a^2\,{\mathrm {e}}^{2\,x}-b^2\,{\mathrm {e}}^{2\,x}+b\,\sqrt {a+b}\,\sqrt {a-b}+2\,a\,{\mathrm {e}}^{2\,x}\,\sqrt {a+b}\,\sqrt {a-b}\right )\,\sqrt {a+b}}{4\,b\,\sqrt {a-b}}+\frac {\ln \left (b^2\,{\mathrm {e}}^{2\,x}-2\,a^2\,{\mathrm {e}}^{2\,x}-a\,b+b\,\sqrt {a+b}\,\sqrt {a-b}+2\,a\,{\mathrm {e}}^{2\,x}\,\sqrt {a+b}\,\sqrt {a-b}\right )\,\sqrt {a+b}}{4\,b\,\sqrt {a-b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/(2*b) - (log(a*b + 2*a^2*exp(2*x) - b^2*exp(2*x) + b*(a + b)^(1/2)*(a - b)^(1/2) + 2*a*exp(2*x)*(a + b)^(1/2
)*(a - b)^(1/2))*(a + b)^(1/2))/(4*b*(a - b)^(1/2)) + (log(b^2*exp(2*x) - 2*a^2*exp(2*x) - a*b + b*(a + b)^(1/
2)*(a - b)^(1/2) + 2*a*exp(2*x)*(a + b)^(1/2)*(a - b)^(1/2))*(a + b)^(1/2))/(4*b*(a - b)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sinh ^{2}{\relax (x )}}{a + b \cosh {\left (2 x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________