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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 37, 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 = {2750, 2648} \[ -\frac {(A-2 B) \sinh (x)}{3 (1-\cosh (x))}-\frac {(A+B) \sinh (x)}{3 (1-\cosh (x))^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-((A + B)*Sinh[x])/(3*(1 - Cosh[x])^2) - ((A - 2*B)*Sinh[x])/(3*(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 2750

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 25, normalized size = 0.68 \[ \frac {\sinh (x) ((A-2 B) \cosh (x)-2 A+B)}{3 (\cosh (x)-1)^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.20, size = 48, normalized size = 1.30 \[ \frac {2 \, {\left ({\left (A - 5 \, B\right )} \cosh \relax (x) - {\left (A + B\right )} \sinh \relax (x) - 3 \, A + 3 \, B\right )}}{3 \, {\left (\cosh \relax (x)^{2} + 2 \, {\left (\cosh \relax (x) - 1\right )} \sinh \relax (x) + \sinh \relax (x)^{2} - 4 \, \cosh \relax (x) + 3\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/3*((A - 5*B)*cosh(x) - (A + B)*sinh(x) - 3*A + 3*B)/(cosh(x)^2 + 2*(cosh(x) - 1)*sinh(x) + sinh(x)^2 - 4*cos
h(x) + 3)

________________________________________________________________________________________

giac [A]  time = 0.11, size = 32, normalized size = 0.86 \[ -\frac {2 \, {\left (3 \, B e^{\left (2 \, x\right )} + 3 \, A e^{x} - 3 \, B e^{x} - A + 2 \, B\right )}}{3 \, {\left (e^{x} - 1\right )}^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 26, normalized size = 0.70 \[ -\frac {A +B}{6 \tanh \left (\frac {x}{2}\right )^{3}}-\frac {-A +B}{2 \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))^2,x)

[Out]

-1/6*(A+B)/tanh(1/2*x)^3-1/2*(-A+B)/tanh(1/2*x)

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 131, normalized size = 3.54 \[ -\frac {2}{3} \, B {\left (\frac {3 \, e^{\left (-x\right )}}{3 \, e^{\left (-x\right )} - 3 \, e^{\left (-2 \, x\right )} + e^{\left (-3 \, x\right )} - 1} - \frac {3 \, e^{\left (-2 \, x\right )}}{3 \, e^{\left (-x\right )} - 3 \, e^{\left (-2 \, x\right )} + e^{\left (-3 \, x\right )} - 1} - \frac {2}{3 \, e^{\left (-x\right )} - 3 \, e^{\left (-2 \, x\right )} + e^{\left (-3 \, x\right )} - 1}\right )} + \frac {2}{3} \, A {\left (\frac {3 \, e^{\left (-x\right )}}{3 \, e^{\left (-x\right )} - 3 \, e^{\left (-2 \, x\right )} + e^{\left (-3 \, x\right )} - 1} - \frac {1}{3 \, e^{\left (-x\right )} - 3 \, e^{\left (-2 \, x\right )} + e^{\left (-3 \, x\right )} - 1}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.93, size = 32, normalized size = 0.86 \[ -\frac {2\,\left (2\,B-A+3\,A\,{\mathrm {e}}^x-3\,B\,{\mathrm {e}}^x+3\,B\,{\mathrm {e}}^{2\,x}\right )}{3\,{\left ({\mathrm {e}}^x-1\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.84, size = 36, normalized size = 0.97 \[ \frac {A}{2 \tanh {\left (\frac {x}{2} \right )}} - \frac {A}{6 \tanh ^{3}{\left (\frac {x}{2} \right )}} - \frac {B}{2 \tanh {\left (\frac {x}{2} \right )}} - \frac {B}{6 \tanh ^{3}{\left (\frac {x}{2} \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

A/(2*tanh(x/2)) - A/(6*tanh(x/2)**3) - B/(2*tanh(x/2)) - B/(6*tanh(x/2)**3)

________________________________________________________________________________________