3.659 \(\int \frac {1}{\coth (x)+\text {csch}(x)} \, dx\)

Optimal. Leaf size=5 \[ \log (\cosh (x)+1) \]

[Out]

ln(1+cosh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3160, 2667, 31} \[ \log (\cosh (x)+1) \]

Antiderivative was successfully verified.

[In]

Int[(Coth[x] + Csch[x])^(-1),x]

[Out]

Log[1 + Cosh[x]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rule 3160

Int[((a_.) + csc[(d_.) + (e_.)*(x_)]*(b_.) + cot[(d_.) + (e_.)*(x_)]*(c_.))^(-1), x_Symbol] :> Int[Sin[d + e*x
]/(b + a*Sin[d + e*x] + c*Cos[d + e*x]), x] /; FreeQ[{a, b, c, d, e}, x]

Rubi steps

\begin {align*} \int \frac {1}{\coth (x)+\text {csch}(x)} \, dx &=i \int \frac {\sinh (x)}{i+i \cosh (x)} \, dx\\ &=\operatorname {Subst}\left (\int \frac {1}{i+x} \, dx,x,i \cosh (x)\right )\\ &=\log (1+\cosh (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 9, normalized size = 1.80 \[ 2 \log \left (\cosh \left (\frac {x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Coth[x] + Csch[x])^(-1),x]

[Out]

2*Log[Cosh[x/2]]

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 13, normalized size = 2.60 \[ -x + 2 \, \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(coth(x)+csch(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.13, size = 11, normalized size = 2.20 \[ -x + 2 \, \log \left (e^{x} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(coth(x)+csch(x)),x, algorithm="giac")

[Out]

-x + 2*log(e^x + 1)

________________________________________________________________________________________

maple [B]  time = 0.21, size = 20, normalized size = 4.00 \[ -\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\ln \left (\tanh \left (\frac {x}{2}\right )+1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(coth(x)+csch(x)),x)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.33, size = 11, normalized size = 2.20 \[ x + 2 \, \log \left (e^{\left (-x\right )} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(coth(x)+csch(x)),x, algorithm="maxima")

[Out]

x + 2*log(e^(-x) + 1)

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 11, normalized size = 2.20 \[ 2\,\ln \left ({\mathrm {e}}^x+1\right )-x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(coth(x) + 1/sinh(x)),x)

[Out]

2*log(exp(x) + 1) - x

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\coth {\relax (x )} + \operatorname {csch}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(coth(x)+csch(x)),x)

[Out]

Integral(1/(coth(x) + csch(x)), x)

________________________________________________________________________________________