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.04, antiderivative size = 13, normalized size of antiderivative = 1.00, 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 8

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

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]

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.01, 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*(-1/2*x + Sinh[x]/2))/a

________________________________________________________________________________________

fricas [A]  time = 1.69, size = 11, normalized size = 0.85 \[ -\frac {x - \sinh \relax (x)}{a} \]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 17, normalized size = 1.31 \[ -\frac {2 \, x + e^{\left (-x\right )} - e^{x}}{2 \, a} \]

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

________________________________________________________________________________________

maple [B]  time = 0.07, size = 51, normalized size = 3.92 \[ -\frac {1}{a \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}-\frac {1}{a \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a} \]

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 = 0.31, size = 23, normalized size = 1.77 \[ -\frac {x}{a} - \frac {e^{\left (-x\right )}}{2 \, a} + \frac {e^{x}}{2 \, a} \]

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

________________________________________________________________________________________

mupad [B]  time = 0.91, size = 23, normalized size = 1.77 \[ \frac {{\mathrm {e}}^x}{2\,a}-\frac {x}{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) - x/a - exp(-x)/(2*a)

________________________________________________________________________________________

sympy [B]  time = 0.41, size = 46, normalized size = 3.54 \[ - \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} \]

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)

________________________________________________________________________________________