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

Optimal. Leaf size=27 \[ \frac{x}{2 a}-\frac{\sinh (x)}{a}+\frac{\sinh (x) \cosh (x)}{2 a} \]

[Out]

x/(2*a) - Sinh[x]/a + (Cosh[x]*Sinh[x])/(2*a)

________________________________________________________________________________________

Rubi [A]  time = 0.100531, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {3872, 2839, 2637, 2635, 8} \[ \frac{x}{2 a}-\frac{\sinh (x)}{a}+\frac{\sinh (x) \cosh (x)}{2 a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/(2*a) - Sinh[x]/a + (Cosh[x]*Sinh[x])/(2*a)

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[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]

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\sinh ^2(x)}{a+a \text{sech}(x)} \, dx &=-\int \frac{\cosh (x) \sinh ^2(x)}{-a-a \cosh (x)} \, dx\\ &=-\frac{\int \cosh (x) \, dx}{a}+\frac{\int \cosh ^2(x) \, dx}{a}\\ &=-\frac{\sinh (x)}{a}+\frac{\cosh (x) \sinh (x)}{2 a}+\frac{\int 1 \, dx}{2 a}\\ &=\frac{x}{2 a}-\frac{\sinh (x)}{a}+\frac{\cosh (x) \sinh (x)}{2 a}\\ \end{align*}

Mathematica [A]  time = 0.059689, size = 16, normalized size = 0.59 \[ \frac{x+\sinh (x) (\cosh (x)-2)}{2 a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(x + (-2 + Cosh[x])*Sinh[x])/(2*a)

________________________________________________________________________________________

Maple [B]  time = 0.023, size = 78, normalized size = 2.9 \begin{align*} -{\frac{1}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+{\frac{3}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}+{\frac{1}{2\,a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{1}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}+{\frac{3}{2\,a} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}-{\frac{1}{2\,a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2/a/(tanh(1/2*x)+1)^2+3/2/a/(tanh(1/2*x)+1)+1/2/a*ln(tanh(1/2*x)+1)+1/2/a/(tanh(1/2*x)-1)^2+3/2/a/(tanh(1/2
*x)-1)-1/2/a*ln(tanh(1/2*x)-1)

________________________________________________________________________________________

Maxima [A]  time = 1.08288, size = 57, normalized size = 2.11 \begin{align*} -\frac{{\left (4 \, e^{\left (-x\right )} - 1\right )} e^{\left (2 \, x\right )}}{8 \, a} + \frac{x}{2 \, a} + \frac{4 \, e^{\left (-x\right )} - e^{\left (-2 \, x\right )}}{8 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*(4*e^(-x) - 1)*e^(2*x)/a + 1/2*x/a + 1/8*(4*e^(-x) - e^(-2*x))/a

________________________________________________________________________________________

Fricas [A]  time = 2.48415, size = 47, normalized size = 1.74 \begin{align*} \frac{{\left (\cosh \left (x\right ) - 2\right )} \sinh \left (x\right ) + x}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((cosh(x) - 2)*sinh(x) + x)/a

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.15785, size = 38, normalized size = 1.41 \begin{align*} \frac{{\left (4 \, e^{x} - 1\right )} e^{\left (-2 \, x\right )} + 4 \, x + e^{\left (2 \, x\right )} - 4 \, e^{x}}{8 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*((4*e^x - 1)*e^(-2*x) + 4*x + e^(2*x) - 4*e^x)/a