3.158 \(\int \frac{\sinh ^2(x)}{a+a \cosh (x)} \, dx\)

Optimal. Leaf size=13 \[ \frac{\sinh (x)}{a}-\frac{x}{a} \]

[Out]

-(x/a) + Sinh[x]/a

________________________________________________________________________________________

Rubi [A]  time = 0.0392258, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2682, 8} \[ \frac{\sinh (x)}{a}-\frac{x}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(x/a) + Sinh[x]/a

Rule 2682

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

Rule 8

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

Rubi steps

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

Mathematica [A]  time = 0.0082304, size = 17, normalized size = 1.31 \[ \frac{2 \left (\frac{\sinh (x)}{2}-\frac{x}{2}\right )}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.017, size = 51, normalized size = 3.9 \begin{align*} -{\frac{1}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}-{\frac{1}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{1}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}+{\frac{1}{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*cosh(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.10447, size = 31, normalized size = 2.38 \begin{align*} -\frac{x}{a} - \frac{e^{\left (-x\right )}}{2 \, a} + \frac{e^{x}}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.82705, size = 24, normalized size = 1.85 \begin{align*} -\frac{x - \sinh \left (x\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x - sinh(x))/a

________________________________________________________________________________________

Sympy [B]  time = 0.554878, size = 46, normalized size = 3.54 \begin{align*} - \frac{x \tanh ^{2}{\left (\frac{x}{2} \right )}}{a \tanh ^{2}{\left (\frac{x}{2} \right )} - a} + \frac{x}{a \tanh ^{2}{\left (\frac{x}{2} \right )} - a} - \frac{2 \tanh{\left (\frac{x}{2} \right )}}{a \tanh ^{2}{\left (\frac{x}{2} \right )} - a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*tanh(x/2)**2/(a*tanh(x/2)**2 - a) + x/(a*tanh(x/2)**2 - a) - 2*tanh(x/2)/(a*tanh(x/2)**2 - a)

________________________________________________________________________________________

Giac [A]  time = 1.18697, size = 23, normalized size = 1.77 \begin{align*} -\frac{2 \, x + e^{\left (-x\right )} - e^{x}}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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