\(\int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx\) [100]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 81 \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=-\frac {(A+B) \sinh (x)}{7 (1-\cosh (x))^4}-\frac {(3 A-4 B) \sinh (x)}{35 (1-\cosh (x))^3}-\frac {2 (3 A-4 B) \sinh (x)}{105 (1-\cosh (x))^2}-\frac {2 (3 A-4 B) \sinh (x)}{105 (1-\cosh (x))} \]

[Out]

-1/7*(A+B)*sinh(x)/(1-cosh(x))^4-1/35*(3*A-4*B)*sinh(x)/(1-cosh(x))^3-2/105*(3*A-4*B)*sinh(x)/(1-cosh(x))^2-2/
105*(3*A-4*B)*sinh(x)/(1-cosh(x))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2829, 2729, 2727} \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=-\frac {2 (3 A-4 B) \sinh (x)}{105 (1-\cosh (x))}-\frac {2 (3 A-4 B) \sinh (x)}{105 (1-\cosh (x))^2}-\frac {(3 A-4 B) \sinh (x)}{35 (1-\cosh (x))^3}-\frac {(A+B) \sinh (x)}{7 (1-\cosh (x))^4} \]

[In]

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

[Out]

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

Rule 2727

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 2729

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

Rule 2829

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*} \text {integral}& = -\frac {(A+B) \sinh (x)}{7 (1-\cosh (x))^4}+\frac {1}{7} (3 A-4 B) \int \frac {1}{(1-\cosh (x))^3} \, dx \\ & = -\frac {(A+B) \sinh (x)}{7 (1-\cosh (x))^4}-\frac {(3 A-4 B) \sinh (x)}{35 (1-\cosh (x))^3}+\frac {1}{35} (2 (3 A-4 B)) \int \frac {1}{(1-\cosh (x))^2} \, dx \\ & = -\frac {(A+B) \sinh (x)}{7 (1-\cosh (x))^4}-\frac {(3 A-4 B) \sinh (x)}{35 (1-\cosh (x))^3}-\frac {2 (3 A-4 B) \sinh (x)}{105 (1-\cosh (x))^2}+\frac {1}{105} (2 (3 A-4 B)) \int \frac {1}{1-\cosh (x)} \, dx \\ & = -\frac {(A+B) \sinh (x)}{7 (1-\cosh (x))^4}-\frac {(3 A-4 B) \sinh (x)}{35 (1-\cosh (x))^3}-\frac {2 (3 A-4 B) \sinh (x)}{105 (1-\cosh (x))^2}-\frac {2 (3 A-4 B) \sinh (x)}{105 (1-\cosh (x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.68 \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=\frac {\left (-36 A+13 B+13 (3 A-4 B) \cosh (x)-8 (3 A-4 B) \cosh ^2(x)+(6 A-8 B) \cosh ^3(x)\right ) \sinh (x)}{105 (-1+\cosh (x))^4} \]

[In]

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

[Out]

((-36*A + 13*B + 13*(3*A - 4*B)*Cosh[x] - 8*(3*A - 4*B)*Cosh[x]^2 + (6*A - 8*B)*Cosh[x]^3)*Sinh[x])/(105*(-1 +
 Cosh[x])^4)

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.69

method result size
default \(-\frac {-A +B}{8 \tanh \left (\frac {x}{2}\right )}-\frac {-3 A -B}{40 \tanh \left (\frac {x}{2}\right )^{5}}-\frac {3 A -B}{24 \tanh \left (\frac {x}{2}\right )^{3}}-\frac {A +B}{56 \tanh \left (\frac {x}{2}\right )^{7}}\) \(56\)
risch \(-\frac {4 \left (70 B \,{\mathrm e}^{4 x}+105 A \,{\mathrm e}^{3 x}-70 B \,{\mathrm e}^{3 x}-63 A \,{\mathrm e}^{2 x}+84 B \,{\mathrm e}^{2 x}+21 A \,{\mathrm e}^{x}-28 B \,{\mathrm e}^{x}-3 A +4 B \right )}{105 \left ({\mathrm e}^{x}-1\right )^{7}}\) \(61\)
parallelrisch \(\frac {\left (-168 A +224 B \right ) \sinh \left (2 x \right )+\left (48 A -64 B \right ) \sinh \left (3 x \right )+\left (-6 A +8 B \right ) \sinh \left (4 x \right )+336 \sinh \left (x \right ) \left (A -\frac {B}{2}\right )}{-105 \cosh \left (4 x \right )-2940 \cosh \left (2 x \right )-3675+840 \cosh \left (3 x \right )+5880 \cosh \left (x \right )}\) \(74\)

[In]

int((A+B*cosh(x))/(1-cosh(x))^4,x,method=_RETURNVERBOSE)

[Out]

-1/8*(-A+B)/tanh(1/2*x)-1/40*(-3*A-B)/tanh(1/2*x)^5-1/24*(3*A-B)/tanh(1/2*x)^3-1/56*(A+B)/tanh(1/2*x)^7

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 175 vs. \(2 (65) = 130\).

Time = 0.25 (sec) , antiderivative size = 175, normalized size of antiderivative = 2.16 \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=\frac {4 \, {\left ({\left (3 \, A - 74 \, B\right )} \cosh \left (x\right )^{2} + {\left (3 \, A - 74 \, B\right )} \sinh \left (x\right )^{2} - 14 \, {\left (9 \, A - 7 \, B\right )} \cosh \left (x\right ) - 6 \, {\left ({\left (A + 22 \, B\right )} \cosh \left (x\right ) + 14 \, A - 7 \, B\right )} \sinh \left (x\right ) + 63 \, A - 84 \, B\right )}}{105 \, {\left (\cosh \left (x\right )^{5} + {\left (5 \, \cosh \left (x\right ) - 7\right )} \sinh \left (x\right )^{4} + \sinh \left (x\right )^{5} - 7 \, \cosh \left (x\right )^{4} + {\left (10 \, \cosh \left (x\right )^{2} - 28 \, \cosh \left (x\right ) + 21\right )} \sinh \left (x\right )^{3} + 21 \, \cosh \left (x\right )^{3} + {\left (10 \, \cosh \left (x\right )^{3} - 42 \, \cosh \left (x\right )^{2} + 63 \, \cosh \left (x\right ) - 36\right )} \sinh \left (x\right )^{2} - 36 \, \cosh \left (x\right )^{2} + {\left (5 \, \cosh \left (x\right )^{4} - 28 \, \cosh \left (x\right )^{3} + 63 \, \cosh \left (x\right )^{2} - 68 \, \cosh \left (x\right ) + 28\right )} \sinh \left (x\right ) + 42 \, \cosh \left (x\right ) - 21\right )}} \]

[In]

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

[Out]

4/105*((3*A - 74*B)*cosh(x)^2 + (3*A - 74*B)*sinh(x)^2 - 14*(9*A - 7*B)*cosh(x) - 6*((A + 22*B)*cosh(x) + 14*A
 - 7*B)*sinh(x) + 63*A - 84*B)/(cosh(x)^5 + (5*cosh(x) - 7)*sinh(x)^4 + sinh(x)^5 - 7*cosh(x)^4 + (10*cosh(x)^
2 - 28*cosh(x) + 21)*sinh(x)^3 + 21*cosh(x)^3 + (10*cosh(x)^3 - 42*cosh(x)^2 + 63*cosh(x) - 36)*sinh(x)^2 - 36
*cosh(x)^2 + (5*cosh(x)^4 - 28*cosh(x)^3 + 63*cosh(x)^2 - 68*cosh(x) + 28)*sinh(x) + 42*cosh(x) - 21)

Sympy [A] (verification not implemented)

Time = 1.00 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.96 \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=\frac {A}{8 \tanh {\left (\frac {x}{2} \right )}} - \frac {A}{8 \tanh ^{3}{\left (\frac {x}{2} \right )}} + \frac {3 A}{40 \tanh ^{5}{\left (\frac {x}{2} \right )}} - \frac {A}{56 \tanh ^{7}{\left (\frac {x}{2} \right )}} - \frac {B}{8 \tanh {\left (\frac {x}{2} \right )}} + \frac {B}{24 \tanh ^{3}{\left (\frac {x}{2} \right )}} + \frac {B}{40 \tanh ^{5}{\left (\frac {x}{2} \right )}} - \frac {B}{56 \tanh ^{7}{\left (\frac {x}{2} \right )}} \]

[In]

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

[Out]

A/(8*tanh(x/2)) - A/(8*tanh(x/2)**3) + 3*A/(40*tanh(x/2)**5) - A/(56*tanh(x/2)**7) - B/(8*tanh(x/2)) + B/(24*t
anh(x/2)**3) + B/(40*tanh(x/2)**5) - B/(56*tanh(x/2)**7)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 451 vs. \(2 (65) = 130\).

Time = 0.19 (sec) , antiderivative size = 451, normalized size of antiderivative = 5.57 \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=-\frac {8}{105} \, B {\left (\frac {14 \, e^{\left (-x\right )}}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1} - \frac {42 \, e^{\left (-2 \, x\right )}}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1} + \frac {35 \, e^{\left (-3 \, x\right )}}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1} - \frac {35 \, e^{\left (-4 \, x\right )}}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1} - \frac {2}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1}\right )} + \frac {4}{35} \, A {\left (\frac {7 \, e^{\left (-x\right )}}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1} - \frac {21 \, e^{\left (-2 \, x\right )}}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1} + \frac {35 \, e^{\left (-3 \, x\right )}}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1} - \frac {1}{7 \, e^{\left (-x\right )} - 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} - 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} - 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} - 1}\right )} \]

[In]

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

[Out]

-8/105*B*(14*e^(-x)/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x)
- 1) - 42*e^(-2*x)/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) -
 1) + 35*e^(-3*x)/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) -
1) - 35*e^(-4*x)/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) - 1
) - 2/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) - 1)) + 4/35*A
*(7*e^(-x)/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) - 1) - 21
*e^(-2*x)/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) - 1) + 35*
e^(-3*x)/(7*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) - 1) - 1/(7
*e^(-x) - 21*e^(-2*x) + 35*e^(-3*x) - 35*e^(-4*x) + 21*e^(-5*x) - 7*e^(-6*x) + e^(-7*x) - 1))

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.74 \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=-\frac {4 \, {\left (70 \, B e^{\left (4 \, x\right )} + 105 \, A e^{\left (3 \, x\right )} - 70 \, B e^{\left (3 \, x\right )} - 63 \, A e^{\left (2 \, x\right )} + 84 \, B e^{\left (2 \, x\right )} + 21 \, A e^{x} - 28 \, B e^{x} - 3 \, A + 4 \, B\right )}}{105 \, {\left (e^{x} - 1\right )}^{7}} \]

[In]

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

[Out]

-4/105*(70*B*e^(4*x) + 105*A*e^(3*x) - 70*B*e^(3*x) - 63*A*e^(2*x) + 84*B*e^(2*x) + 21*A*e^x - 28*B*e^x - 3*A
+ 4*B)/(e^x - 1)^7

Mupad [B] (verification not implemented)

Time = 1.69 (sec) , antiderivative size = 233, normalized size of antiderivative = 2.88 \[ \int \frac {A+B \cosh (x)}{(1-\cosh (x))^4} \, dx=\frac {\frac {8\,B}{105}+\frac {16\,A\,{\mathrm {e}}^x}{35}+\frac {16\,B\,{\mathrm {e}}^{2\,x}}{35}}{10\,{\mathrm {e}}^{2\,x}-10\,{\mathrm {e}}^{3\,x}+5\,{\mathrm {e}}^{4\,x}-{\mathrm {e}}^{5\,x}-5\,{\mathrm {e}}^x+1}-\frac {\frac {4\,A}{35}+\frac {8\,B\,{\mathrm {e}}^x}{35}}{6\,{\mathrm {e}}^{2\,x}-4\,{\mathrm {e}}^{3\,x}+{\mathrm {e}}^{4\,x}-4\,{\mathrm {e}}^x+1}-\frac {\frac {8\,B\,{\mathrm {e}}^x}{21}+\frac {8\,A\,{\mathrm {e}}^{2\,x}}{7}+\frac {16\,B\,{\mathrm {e}}^{3\,x}}{21}}{15\,{\mathrm {e}}^{2\,x}-20\,{\mathrm {e}}^{3\,x}+15\,{\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{5\,x}+{\mathrm {e}}^{6\,x}-6\,{\mathrm {e}}^x+1}+\frac {8\,B}{105\,\left (3\,{\mathrm {e}}^{2\,x}-{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x+1\right )}+\frac {\frac {16\,A\,{\mathrm {e}}^{3\,x}}{7}+\frac {8\,B\,{\mathrm {e}}^{2\,x}}{7}+\frac {8\,B\,{\mathrm {e}}^{4\,x}}{7}}{21\,{\mathrm {e}}^{2\,x}-35\,{\mathrm {e}}^{3\,x}+35\,{\mathrm {e}}^{4\,x}-21\,{\mathrm {e}}^{5\,x}+7\,{\mathrm {e}}^{6\,x}-{\mathrm {e}}^{7\,x}-7\,{\mathrm {e}}^x+1} \]

[In]

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

[Out]

((8*B)/105 + (16*A*exp(x))/35 + (16*B*exp(2*x))/35)/(10*exp(2*x) - 10*exp(3*x) + 5*exp(4*x) - exp(5*x) - 5*exp
(x) + 1) - ((4*A)/35 + (8*B*exp(x))/35)/(6*exp(2*x) - 4*exp(3*x) + exp(4*x) - 4*exp(x) + 1) - ((8*B*exp(x))/21
 + (8*A*exp(2*x))/7 + (16*B*exp(3*x))/21)/(15*exp(2*x) - 20*exp(3*x) + 15*exp(4*x) - 6*exp(5*x) + exp(6*x) - 6
*exp(x) + 1) + (8*B)/(105*(3*exp(2*x) - exp(3*x) - 3*exp(x) + 1)) + ((16*A*exp(3*x))/7 + (8*B*exp(2*x))/7 + (8
*B*exp(4*x))/7)/(21*exp(2*x) - 35*exp(3*x) + 35*exp(4*x) - 21*exp(5*x) + 7*exp(6*x) - exp(7*x) - 7*exp(x) + 1)