3.668 \(\int (-\coth (x)+\text{csch}(x)) \, dx\)

Optimal. Leaf size=11 \[ -\log (\sinh (x))-\tanh ^{-1}(\cosh (x)) \]

[Out]

-ArcTanh[Cosh[x]] - Log[Sinh[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0083718, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3475, 3770} \[ -\log (\sinh (x))-\tanh ^{-1}(\cosh (x)) \]

Antiderivative was successfully verified.

[In]

Int[-Coth[x] + Csch[x],x]

[Out]

-ArcTanh[Cosh[x]] - Log[Sinh[x]]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (-\coth (x)+\text{csch}(x)) \, dx &=-\int \coth (x) \, dx+\int \text{csch}(x) \, dx\\ &=-\tanh ^{-1}(\cosh (x))-\log (\sinh (x))\\ \end{align*}

Mathematica [A]  time = 0.0045583, size = 13, normalized size = 1.18 \[ \log \left (\tanh \left (\frac{x}{2}\right )\right )-\log (\sinh (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[-Coth[x] + Csch[x],x]

[Out]

-Log[Sinh[x]] + Log[Tanh[x/2]]

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 12, normalized size = 1.1 \begin{align*} -\ln \left ( \sinh \left ( x \right ) \right ) +\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-coth(x)+csch(x),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.15103, size = 15, normalized size = 1.36 \begin{align*} -\log \left (\sinh \left (x\right )\right ) + \log \left (\tanh \left (\frac{1}{2} \, x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(sinh(x)) + log(tanh(1/2*x))

________________________________________________________________________________________

Fricas [A]  time = 2.13488, size = 46, normalized size = 4.18 \begin{align*} x - 2 \, \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (- \coth{\left (x \right )} + \operatorname{csch}{\left (x \right )}\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-coth(x)+csch(x),x)

[Out]

Integral(-coth(x) + csch(x), x)

________________________________________________________________________________________

Giac [B]  time = 1.12717, size = 34, normalized size = 3.09 \begin{align*} x - \log \left (e^{x} + 1\right ) - \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right ) + \log \left ({\left | e^{x} - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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