\(\int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx\) [63]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 20 \[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=\frac {\cosh (x)}{a}-\frac {b \log (b+a \cosh (x))}{a^2} \]

[Out]

cosh(x)/a-b*ln(b+a*cosh(x))/a^2

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3957, 2912, 12, 45} \[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=\frac {\cosh (x)}{a}-\frac {b \log (a \cosh (x)+b)}{a^2} \]

[In]

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

[Out]

Cosh[x]/a - (b*Log[b + a*Cosh[x]])/a^2

Rule 12

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

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = -\int \frac {\cosh (x) \sinh (x)}{-b-a \cosh (x)} \, dx \\ & = -\frac {\text {Subst}\left (\int \frac {x}{a (-b+x)} \, dx,x,-a \cosh (x)\right )}{a} \\ & = -\frac {\text {Subst}\left (\int \frac {x}{-b+x} \, dx,x,-a \cosh (x)\right )}{a^2} \\ & = -\frac {\text {Subst}\left (\int \left (1-\frac {b}{b-x}\right ) \, dx,x,-a \cosh (x)\right )}{a^2} \\ & = \frac {\cosh (x)}{a}-\frac {b \log (b+a \cosh (x))}{a^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=\frac {a \cosh (x)-b \log (b+a \cosh (x))}{a^2} \]

[In]

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

[Out]

(a*Cosh[x] - b*Log[b + a*Cosh[x]])/a^2

Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.55

method result size
derivativedivides \(\frac {1}{a \,\operatorname {sech}\left (x \right )}+\frac {b \ln \left (\operatorname {sech}\left (x \right )\right )}{a^{2}}-\frac {b \ln \left (a +b \,\operatorname {sech}\left (x \right )\right )}{a^{2}}\) \(31\)
default \(\frac {1}{a \,\operatorname {sech}\left (x \right )}+\frac {b \ln \left (\operatorname {sech}\left (x \right )\right )}{a^{2}}-\frac {b \ln \left (a +b \,\operatorname {sech}\left (x \right )\right )}{a^{2}}\) \(31\)
risch \(\frac {b x}{a^{2}}+\frac {{\mathrm e}^{x}}{2 a}+\frac {{\mathrm e}^{-x}}{2 a}-\frac {b \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{a^{2}}\) \(45\)

[In]

int(sinh(x)/(a+b*sech(x)),x,method=_RETURNVERBOSE)

[Out]

1/a/sech(x)+1/a^2*b*ln(sech(x))-1/a^2*b*ln(a+b*sech(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 78 vs. \(2 (20) = 40\).

Time = 0.25 (sec) , antiderivative size = 78, normalized size of antiderivative = 3.90 \[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=\frac {2 \, b x \cosh \left (x\right ) + a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} - 2 \, {\left (b \cosh \left (x\right ) + b \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, {\left (b x + a \cosh \left (x\right )\right )} \sinh \left (x\right ) + a}{2 \, {\left (a^{2} \cosh \left (x\right ) + a^{2} \sinh \left (x\right )\right )}} \]

[In]

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

[Out]

1/2*(2*b*x*cosh(x) + a*cosh(x)^2 + a*sinh(x)^2 - 2*(b*cosh(x) + b*sinh(x))*log(2*(a*cosh(x) + b)/(cosh(x) - si
nh(x))) + 2*(b*x + a*cosh(x))*sinh(x) + a)/(a^2*cosh(x) + a^2*sinh(x))

Sympy [F]

\[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=\int \frac {\sinh {\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

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

Time = 0.19 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.30 \[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=-\frac {b x}{a^{2}} + \frac {e^{\left (-x\right )}}{2 \, a} + \frac {e^{x}}{2 \, a} - \frac {b \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a^{2}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.70 \[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=\frac {e^{\left (-x\right )} + e^{x}}{2 \, a} - \frac {b \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a^{2}} \]

[In]

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

[Out]

1/2*(e^(-x) + e^x)/a - b*log(abs(a*(e^(-x) + e^x) + 2*b))/a^2

Mupad [B] (verification not implemented)

Time = 1.97 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {\sinh (x)}{a+b \text {sech}(x)} \, dx=\frac {\mathrm {cosh}\left (x\right )}{a}-\frac {b\,\ln \left (b+a\,\mathrm {cosh}\left (x\right )\right )}{a^2} \]

[In]

int(sinh(x)/(a + b/cosh(x)),x)

[Out]

cosh(x)/a - (b*log(b + a*cosh(x)))/a^2