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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 27, normalized size of antiderivative = 1.00, 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 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, 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 2637

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

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

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.07, 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)

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 14, normalized size = 0.52 \[ \frac {{\left (\cosh \relax (x) - 2\right )} \sinh \relax (x) + x}{2 \, a} \]

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

________________________________________________________________________________________

giac [A]  time = 0.11, size = 28, normalized size = 1.04 \[ \frac {{\left (4 \, e^{x} - 1\right )} e^{\left (-2 \, x\right )} + 4 \, x + e^{\left (2 \, x\right )} - 4 \, e^{x}}{8 \, a} \]

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

________________________________________________________________________________________

maple [B]  time = 0.11, size = 78, normalized size = 2.89 \[ \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 )}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 a}-\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 )}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 a} \]

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 = 0.31, size = 42, normalized size = 1.56 \[ -\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} \]

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

________________________________________________________________________________________

mupad [B]  time = 1.34, size = 41, normalized size = 1.52 \[ \frac {{\mathrm {e}}^{-x}}{2\,a}-\frac {{\mathrm {e}}^{-2\,x}}{8\,a}+\frac {{\mathrm {e}}^{2\,x}}{8\,a}+\frac {x}{2\,a}-\frac {{\mathrm {e}}^x}{2\,a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(-x)/(2*a) - exp(-2*x)/(8*a) + exp(2*x)/(8*a) + x/(2*a) - exp(x)/(2*a)

________________________________________________________________________________________

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

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

________________________________________________________________________________________