\(\int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx\) [142]

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

Optimal result

Integrand size = 11, antiderivative size = 12 \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=x-\frac {2 \sinh (x)}{1+\cosh (x)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2759, 8} \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=x-\frac {2 \sinh (x)}{\cosh (x)+1} \]

[In]

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

[Out]

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

Rule 8

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

Rule 2759

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[2*g*(g
*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(2*m + p + 1))), x] + Dist[g^2*((p - 1)/(b^2*(2*m +
p + 1))), Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && Eq
Q[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] && NeQ[2*m + p + 1, 0] &&  !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*
p]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 \sinh (x)}{1+\cosh (x)}+\int 1 \, dx \\ & = x-\frac {2 \sinh (x)}{1+\cosh (x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.50 \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=2 \text {arctanh}\left (\tanh \left (\frac {x}{2}\right )\right )-2 \tanh \left (\frac {x}{2}\right ) \]

[In]

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

[Out]

2*ArcTanh[Tanh[x/2]] - 2*Tanh[x/2]

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.92

method result size
risch \(x +\frac {4}{{\mathrm e}^{x}+1}\) \(11\)
default \(-2 \tanh \left (\frac {x}{2}\right )-\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )\) \(24\)

[In]

int(sinh(x)^2/(cosh(x)+1)^2,x,method=_RETURNVERBOSE)

[Out]

x+4/(exp(x)+1)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.67 \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=\frac {x \cosh \left (x\right ) + x \sinh \left (x\right ) + x + 4}{\cosh \left (x\right ) + \sinh \left (x\right ) + 1} \]

[In]

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

[Out]

(x*cosh(x) + x*sinh(x) + x + 4)/(cosh(x) + sinh(x) + 1)

Sympy [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.58 \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=x - 2 \tanh {\left (\frac {x}{2} \right )} \]

[In]

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

[Out]

x - 2*tanh(x/2)

Maxima [A] (verification not implemented)

none

Time = 0.17 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=x - \frac {4}{e^{\left (-x\right )} + 1} \]

[In]

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

[Out]

x - 4/(e^(-x) + 1)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=x + \frac {4}{e^{x} + 1} \]

[In]

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

[Out]

x + 4/(e^x + 1)

Mupad [B] (verification not implemented)

Time = 1.65 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {\sinh ^2(x)}{(1+\cosh (x))^2} \, dx=x+\frac {4}{{\mathrm {e}}^x+1} \]

[In]

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

[Out]

x + 4/(exp(x) + 1)