### 3.234 $$\int \cosh (x) \coth (2 x) \, dx$$

Optimal. Leaf size=10 $\cosh (x)-\frac{1}{2} \tanh ^{-1}(\cosh (x))$

[Out]

-ArcTanh[Cosh[x]]/2 + Cosh[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0264988, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 7, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.429, Rules used = {12, 388, 206} $\cosh (x)-\frac{1}{2} \tanh ^{-1}(\cosh (x))$

Antiderivative was successfully veriﬁed.

[In]

Int[Cosh[x]*Coth[2*x],x]

[Out]

-ArcTanh[Cosh[x]]/2 + Cosh[x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \cosh (x) \coth (2 x) \, dx &=-\operatorname{Subst}\left (\int \frac{-1+2 x^2}{2 \left (1-x^2\right )} \, dx,x,\cosh (x)\right )\\ &=-\left (\frac{1}{2} \operatorname{Subst}\left (\int \frac{-1+2 x^2}{1-x^2} \, dx,x,\cosh (x)\right )\right )\\ &=\cosh (x)-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cosh (x)\right )\\ &=-\frac{1}{2} \tanh ^{-1}(\cosh (x))+\cosh (x)\\ \end{align*}

Mathematica [A]  time = 0.0144016, size = 14, normalized size = 1.4 $\cosh (x)+\frac{1}{2} \log \left (\tanh \left (\frac{x}{2}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Cosh[x]*Coth[2*x],x]

[Out]

Cosh[x] + Log[Tanh[x/2]]/2

________________________________________________________________________________________

Maple [A]  time = 0.023, size = 9, normalized size = 0.9 \begin{align*} \cosh \left ( x \right ) -{\it Artanh} \left ({{\rm e}^{x}} \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)*coth(2*x),x)

[Out]

cosh(x)-arctanh(exp(x))

________________________________________________________________________________________

Maxima [B]  time = 1.11396, size = 39, normalized size = 3.9 \begin{align*} \frac{1}{2} \, e^{\left (-x\right )} + \frac{1}{2} \, e^{x} - \frac{1}{2} \, \log \left (e^{\left (-x\right )} + 1\right ) + \frac{1}{2} \, \log \left (e^{\left (-x\right )} - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*coth(2*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.20459, size = 231, normalized size = 23.1 \begin{align*} \frac{\cosh \left (x\right )^{2} -{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) +{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1}{2 \,{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*coth(2*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*coth(2*x),x)

[Out]

Integral(cosh(x)*coth(2*x), x)

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)*coth(2*x),x, algorithm="giac")

[Out]

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