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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {4401, 2648, 2667, 31} \[ -\frac {A \sinh (x)}{1-\cosh (x)}-B \log (1-\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(B*Log[1 - Cosh[x]]) - (A*Sinh[x])/(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 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 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 4401

Int[u_, x_Symbol] :> With[{v = ExpandTrig[u, x]}, Int[v, x] /; SumQ[v]] /;  !InertTrigFreeQ[u]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 19, normalized size = 0.79 \[ A \coth \left (\frac {x}{2}\right )-2 B \log \left (\sinh \left (\frac {x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

A*Coth[x/2] - 2*B*Log[Sinh[x/2]]

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 48, normalized size = 2.00 \[ \frac {B x \cosh \relax (x) + B x \sinh \relax (x) - B x - 2 \, {\left (B \cosh \relax (x) + B \sinh \relax (x) - B\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 1\right ) + 2 \, A}{\cosh \relax (x) + \sinh \relax (x) - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 22, normalized size = 0.92 \[ B x - 2 \, B \log \left ({\left | e^{x} - 1 \right |}\right ) + \frac {2 \, A}{e^{x} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 36, normalized size = 1.50 \[ 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 )}-2 B \ln \left (\tanh \left (\frac {x}{2}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 20, normalized size = 0.83 \[ -B \log \left (\cosh \relax (x) - 1\right ) - \frac {2 \, A}{e^{\left (-x\right )} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.91, size = 21, normalized size = 0.88 \[ B\,x+\frac {2\,A}{{\mathrm {e}}^x-1}-2\,B\,\ln \left ({\mathrm {e}}^x-1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.51, size = 31, normalized size = 1.29 \[ \frac {A}{\tanh {\left (\frac {x}{2} \right )}} - B x + 2 B \log {\left (\tanh {\left (\frac {x}{2} \right )} + 1 \right )} - 2 B \log {\left (\tanh {\left (\frac {x}{2} \right )} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________