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]

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)

________________________________________________________________________________________

Rubi [A]  time = 0.16, 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 12

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

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 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]

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 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 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 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]

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.09, 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

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 251, normalized size = 4.83 \[ \frac {\sqrt {a^{2} + b^{2}} 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 (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + a\right )} \sqrt {a^{2} + b^{2}}}{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 \, {\left (a^{2} + b^{2}\right )} x + {\left (a^{2} + b^{2}\right )} \log \left (\frac {2 \, {\left (2 \, b \cosh \relax (x) \sinh \relax (x) + a\right )}}{\cosh \relax (x)^{2} - 2 \, \cosh \relax (x) \sinh \relax (x) + \sinh \relax (x)^{2}}\right )}{4 \, {\left (a^{2} b + b^{3}\right )}} \]

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)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 92, normalized size = 1.77 \[ -\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} \]

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

________________________________________________________________________________________

maple [A]  time = 0.39, size = 75, normalized size = 1.44 \[ -\frac {\ln \left (\tanh \relax (x )-1\right )}{4 b}-\frac {\ln \left (1+\tanh \relax (x )\right )}{4 b}+\frac {\ln \left (a \left (\tanh ^{2}\relax (x )\right )-2 b \tanh \relax (x )-a \right )}{4 b}-\frac {\arctanh \left (\frac {2 a \tanh \relax (x )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{2 \sqrt {a^{2}+b^{2}}} \]

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(tanh(x)-1)-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))

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 85, normalized size = 1.63 \[ -\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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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

________________________________________________________________________________________

mupad [B]  time = 0.49, size = 273, normalized size = 5.25 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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*
exp(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)))/(1
6*b^4 + 16*a^2*b^2)

________________________________________________________________________________________

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

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)

________________________________________________________________________________________