3.97 \(\int \frac {A+B \cosh (x)}{1-\cosh (x)} \, dx\)

Optimal. Leaf size=20 \[ -\frac {(A+B) \sinh (x)}{1-\cosh (x)}-B x \]

[Out]

-B*x-(A+B)*sinh(x)/(1-cosh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2735, 2648} \[ -\frac {(A+B) \sinh (x)}{1-\cosh (x)}-B x \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Cosh[x])/(1 - Cosh[x]),x]

[Out]

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

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rubi steps

\begin {align*} \int \frac {A+B \cosh (x)}{1-\cosh (x)} \, dx &=-B x-(-A-B) \int \frac {1}{1-\cosh (x)} \, dx\\ &=-B x-\frac {(A+B) \sinh (x)}{1-\cosh (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 35, normalized size = 1.75 \[ \frac {2 \sinh \left (\frac {x}{2}\right ) \left ((A+B) \cosh \left (\frac {x}{2}\right )-B x \sinh \left (\frac {x}{2}\right )\right )}{\cosh (x)-1} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Cosh[x])/(1 - Cosh[x]),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 31, normalized size = 1.55 \[ -\frac {B x \cosh \relax (x) + B x \sinh \relax (x) - B x - 2 \, A - 2 \, B}{\cosh \relax (x) + \sinh \relax (x) - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(x))/(1-cosh(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 16, normalized size = 0.80 \[ -B x + \frac {2 \, {\left (A + B\right )}}{e^{x} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(x))/(1-cosh(x)),x, algorithm="giac")

[Out]

-B*x + 2*(A + B)/(e^x - 1)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 37, normalized size = 1.85 \[ B \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-B \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {A}{\tanh \left (\frac {x}{2}\right )}+\frac {B}{\tanh \left (\frac {x}{2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*cosh(x))/(1-cosh(x)),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 27, normalized size = 1.35 \[ -B {\left (x + \frac {2}{e^{\left (-x\right )} - 1}\right )} - \frac {2 \, A}{e^{\left (-x\right )} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(x))/(1-cosh(x)),x, algorithm="maxima")

[Out]

-B*(x + 2/(e^(-x) - 1)) - 2*A/(e^(-x) - 1)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 19, normalized size = 0.95 \[ \frac {2\,A+2\,B}{{\mathrm {e}}^x-1}-B\,x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(A + B*cosh(x))/(cosh(x) - 1),x)

[Out]

(2*A + 2*B)/(exp(x) - 1) - B*x

________________________________________________________________________________________

sympy [A]  time = 0.49, size = 15, normalized size = 0.75 \[ \frac {A}{\tanh {\left (\frac {x}{2} \right )}} - B x + \frac {B}{\tanh {\left (\frac {x}{2} \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cosh(x))/(1-cosh(x)),x)

[Out]

A/tanh(x/2) - B*x + B/tanh(x/2)

________________________________________________________________________________________