3.5.8 \(\int \cosh (a+b x) \coth (a+b x) \, dx\) [408]

Optimal. Leaf size=23 \[ -\frac {\tanh ^{-1}(\cosh (a+b x))}{b}+\frac {\cosh (a+b x)}{b} \]

[Out]

-arctanh(cosh(b*x+a))/b+cosh(b*x+a)/b

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2672, 327, 212} \begin {gather*} \frac {\cosh (a+b x)}{b}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cosh[a + b*x]*Coth[a + b*x],x]

[Out]

-(ArcTanh[Cosh[a + b*x]]/b) + Cosh[a + b*x]/b

Rule 212

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

Rule 327

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

Rule 2672

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 26, normalized size = 1.13 \begin {gather*} \frac {\cosh (a+b x)}{b}+\frac {\log \left (\tanh \left (\frac {1}{2} (a+b x)\right )\right )}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cosh[a + b*x]*Coth[a + b*x],x]

[Out]

Cosh[a + b*x]/b + Log[Tanh[(a + b*x)/2]]/b

________________________________________________________________________________________

Maple [A]
time = 0.67, size = 21, normalized size = 0.91

method result size
derivativedivides \(\frac {\cosh \left (b x +a \right )-2 \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}\) \(21\)
default \(\frac {\cosh \left (b x +a \right )-2 \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}\) \(21\)
risch \(\frac {{\mathrm e}^{b x +a}}{2 b}+\frac {{\mathrm e}^{-b x -a}}{2 b}+\frac {\ln \left ({\mathrm e}^{b x +a}-1\right )}{b}-\frac {\ln \left ({\mathrm e}^{b x +a}+1\right )}{b}\) \(54\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(b*x+a)^2*csch(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/b*(cosh(b*x+a)-2*arctanh(exp(b*x+a)))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 59 vs. \(2 (23) = 46\).
time = 0.26, size = 59, normalized size = 2.57 \begin {gather*} \frac {e^{\left (b x + a\right )}}{2 \, b} + \frac {e^{\left (-b x - a\right )}}{2 \, b} - \frac {\log \left (e^{\left (-b x - a\right )} + 1\right )}{b} + \frac {\log \left (e^{\left (-b x - a\right )} - 1\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x+a)^2*csch(b*x+a),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 113 vs. \(2 (23) = 46\).
time = 0.37, size = 113, normalized size = 4.91 \begin {gather*} \frac {\cosh \left (b x + a\right )^{2} - 2 \, {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + 1\right ) + 2 \, {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - 1\right ) + 2 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right )^{2} + 1}{2 \, {\left (b \cosh \left (b x + a\right ) + b \sinh \left (b x + a\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x+a)^2*csch(b*x+a),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \cosh ^{2}{\left (a + b x \right )} \operatorname {csch}{\left (a + b x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x+a)**2*csch(b*x+a),x)

[Out]

Integral(cosh(a + b*x)**2*csch(a + b*x), x)

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 44, normalized size = 1.91 \begin {gather*} \frac {e^{\left (b x + a\right )} + e^{\left (-b x - a\right )} - 2 \, \log \left (e^{\left (b x + a\right )} + 1\right ) + 2 \, \log \left ({\left | e^{\left (b x + a\right )} - 1 \right |}\right )}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x+a)^2*csch(b*x+a),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 53, normalized size = 2.30 \begin {gather*} \frac {{\mathrm {e}}^{a+b\,x}}{2\,b}-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{b\,x}\,{\mathrm {e}}^a\,\sqrt {-b^2}}{b}\right )}{\sqrt {-b^2}}+\frac {{\mathrm {e}}^{-a-b\,x}}{2\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(a + b*x)^2/sinh(a + b*x),x)

[Out]

exp(a + b*x)/(2*b) - (2*atan((exp(b*x)*exp(a)*(-b^2)^(1/2))/b))/(-b^2)^(1/2) + exp(- a - b*x)/(2*b)

________________________________________________________________________________________