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

Optimal. Leaf size=93 \[ -\frac{6 a b^2 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (\left (a^2-2 b^2\right ) \sinh (x)+3 a b\right )}{\left (a^2+b^2\right )^2} \]

[Out]

(-6*a*b^2*ArcTanh[(b - a*Tanh[x/2])/Sqrt[a^2 + b^2]])/(a^2 + b^2)^(5/2) - (b*Sech[x])/((a^2 + b^2)*(a + b*Sinh
[x])) + (Sech[x]*(3*a*b + (a^2 - 2*b^2)*Sinh[x]))/(a^2 + b^2)^2

________________________________________________________________________________________

Rubi [A]  time = 0.170352, antiderivative size = 93, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {2694, 2866, 12, 2660, 618, 206} \[ -\frac{6 a b^2 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (\left (a^2-2 b^2\right ) \sinh (x)+3 a b\right )}{\left (a^2+b^2\right )^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-6*a*b^2*ArcTanh[(b - a*Tanh[x/2])/Sqrt[a^2 + b^2]])/(a^2 + b^2)^(5/2) - (b*Sech[x])/((a^2 + b^2)*(a + b*Sinh
[x])) + (Sech[x]*(3*a*b + (a^2 - 2*b^2)*Sinh[x]))/(a^2 + b^2)^2

Rule 2694

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[(b*(g
*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m + 1))/(f*g*(a^2 - b^2)*(m + 1)), x] + Dist[1/((a^2 - b^2)*(m +
1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1)*(a*(m + 1) - b*(m + p + 2)*Sin[e + f*x]), x], x] /; F
reeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegersQ[2*m, 2*p]

Rule 2866

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)]), x_Symbol] :> Simp[((g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m + 1)*(b*c - a*d - (a*c -
b*d)*Sin[e + f*x]))/(f*g*(a^2 - b^2)*(p + 1)), x] + Dist[1/(g^2*(a^2 - b^2)*(p + 1)), Int[(g*Cos[e + f*x])^(p
+ 2)*(a + b*Sin[e + f*x])^m*Simp[c*(a^2*(p + 2) - b^2*(m + p + 2)) + a*b*d*m + b*(a*c - b*d)*(m + p + 3)*Sin[e
 + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && NeQ[a^2 - b^2, 0] && LtQ[p, -1] && IntegerQ[2*m]

Rule 12

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

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

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

Rubi steps

\begin{align*} \int \frac{\text{sech}^2(x)}{(a+b \sinh (x))^2} \, dx &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac{\int \frac{\text{sech}^2(x) (-a+2 b \sinh (x))}{a+b \sinh (x)} \, dx}{a^2+b^2}\\ &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac{\int \frac{3 a b^2}{a+b \sinh (x)} \, dx}{\left (a^2+b^2\right )^2}\\ &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac{\left (3 a b^2\right ) \int \frac{1}{a+b \sinh (x)} \, dx}{\left (a^2+b^2\right )^2}\\ &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac{\left (6 a b^2\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{\left (a^2+b^2\right )^2}\\ &=-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}-\frac{\left (12 a b^2\right ) \operatorname{Subst}\left (\int \frac{1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh \left (\frac{x}{2}\right )\right )}{\left (a^2+b^2\right )^2}\\ &=-\frac{6 a b^2 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac{b \text{sech}(x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac{\text{sech}(x) \left (3 a b+\left (a^2-2 b^2\right ) \sinh (x)\right )}{\left (a^2+b^2\right )^2}\\ \end{align*}

Mathematica [A]  time = 0.241977, size = 94, normalized size = 1.01 \[ \frac{\frac{6 a b^2 \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2-b^2}}\right )}{\sqrt{-a^2-b^2}}+a^2 \tanh (x)-\frac{b^3 \cosh (x)}{a+b \sinh (x)}+2 a b \text{sech}(x)-b^2 \tanh (x)}{\left (a^2+b^2\right )^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

((6*a*b^2*ArcTan[(b - a*Tanh[x/2])/Sqrt[-a^2 - b^2]])/Sqrt[-a^2 - b^2] + 2*a*b*Sech[x] - (b^3*Cosh[x])/(a + b*
Sinh[x]) + a^2*Tanh[x] - b^2*Tanh[x])/(a^2 + b^2)^2

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 138, normalized size = 1.5 \begin{align*} -2\,{\frac{ \left ( -{a}^{2}+{b}^{2} \right ) \tanh \left ( x/2 \right ) -2\,ab}{ \left ({a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4} \right ) \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }}-2\,{\frac{{b}^{2}}{ \left ({a}^{2}+{b}^{2} \right ) ^{2}} \left ({\frac{1}{a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-2\,\tanh \left ( x/2 \right ) b-a} \left ( -{\frac{{b}^{2}\tanh \left ( x/2 \right ) }{a}}-b \right ) }-3\,{\frac{a}{\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( x/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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(sech(x)^2/(a+b*sinh(x))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.15832, size = 1916, normalized size = 20.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*a^4*b - 2*a^2*b^3 - 4*b^5 + 6*(a^3*b^2 + a*b^4)*cosh(x)^3 + 6*(a^3*b^2 + a*b^4)*sinh(x)^3 + 6*(a^4*b + a^2
*b^3)*cosh(x)^2 + 6*(a^4*b + a^2*b^3 + 3*(a^3*b^2 + a*b^4)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3*a^3*b^4 + a*b^6 + 2*(a^6*b + 3*a
^4*b^3 + 3*a^2*b^5 + b^7)*cosh(x)^3 + 3*(a^7 + 3*a^5*b^2 + 3*a^3*b^4 + a*b^6)*cosh(x)^2)*sinh(x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.15158, size = 225, normalized size = 2.42 \begin{align*} \frac{3 \, a b^{2} \log \left (\frac{{\left | 2 \, b e^{x} + 2 \, a - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} + 2 \, a + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt{a^{2} + b^{2}}} + \frac{2 \,{\left (3 \, a b^{2} e^{\left (3 \, x\right )} + 3 \, a^{2} b e^{\left (2 \, x\right )} - 2 \, a^{3} e^{x} + a b^{2} e^{x} + a^{2} b - 2 \, b^{3}\right )}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}{\left (b e^{\left (4 \, x\right )} + 2 \, a e^{\left (3 \, x\right )} + 2 \, a e^{x} - b\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*a*b^2*log(abs(2*b*e^x + 2*a - 2*sqrt(a^2 + b^2))/abs(2*b*e^x + 2*a + 2*sqrt(a^2 + b^2)))/((a^4 + 2*a^2*b^2 +
 b^4)*sqrt(a^2 + b^2)) + 2*(3*a*b^2*e^(3*x) + 3*a^2*b*e^(2*x) - 2*a^3*e^x + a*b^2*e^x + a^2*b - 2*b^3)/((a^4 +
 2*a^2*b^2 + b^4)*(b*e^(4*x) + 2*a*e^(3*x) + 2*a*e^x - b))