\(\int \frac {1}{(1+\cosh (c+d x))^4} \, dx\) [35]

Optimal result
Mathematica [A] (verified)
Rubi [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)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 93 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=\frac {\sinh (c+d x)}{7 d (1+\cosh (c+d x))^4}+\frac {3 \sinh (c+d x)}{35 d (1+\cosh (c+d x))^3}+\frac {2 \sinh (c+d x)}{35 d (1+\cosh (c+d x))^2}+\frac {2 \sinh (c+d x)}{35 d (1+\cosh (c+d x))} \] Output:

1/7*sinh(d*x+c)/d/(1+cosh(d*x+c))^4+3/35*sinh(d*x+c)/d/(1+cosh(d*x+c))^3+2 
/35*sinh(d*x+c)/d/(1+cosh(d*x+c))^2+2/35*sinh(d*x+c)/d/(1+cosh(d*x+c))
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.58 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=\frac {56 \sinh (c+d x)+28 \sinh (2 (c+d x))+8 \sinh (3 (c+d x))+\sinh (4 (c+d x))}{140 d (1+\cosh (c+d x))^4} \] Input:

Integrate[(1 + Cosh[c + d*x])^(-4),x]
 

Output:

(56*Sinh[c + d*x] + 28*Sinh[2*(c + d*x)] + 8*Sinh[3*(c + d*x)] + Sinh[4*(c 
 + d*x)])/(140*d*(1 + Cosh[c + d*x])^4)
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.11, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.800, Rules used = {3042, 3129, 3042, 3129, 3042, 3129, 3042, 3127}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {1}{(\cosh (c+d x)+1)^4} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\left (1+\sin \left (i c+i d x+\frac {\pi }{2}\right )\right )^4}dx\)

\(\Big \downarrow \) 3129

\(\displaystyle \frac {3}{7} \int \frac {1}{(\cosh (c+d x)+1)^3}dx+\frac {\sinh (c+d x)}{7 d (\cosh (c+d x)+1)^4}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sinh (c+d x)}{7 d (\cosh (c+d x)+1)^4}+\frac {3}{7} \int \frac {1}{\left (\sin \left (i c+i d x+\frac {\pi }{2}\right )+1\right )^3}dx\)

\(\Big \downarrow \) 3129

\(\displaystyle \frac {3}{7} \left (\frac {2}{5} \int \frac {1}{(\cosh (c+d x)+1)^2}dx+\frac {\sinh (c+d x)}{5 d (\cosh (c+d x)+1)^3}\right )+\frac {\sinh (c+d x)}{7 d (\cosh (c+d x)+1)^4}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sinh (c+d x)}{7 d (\cosh (c+d x)+1)^4}+\frac {3}{7} \left (\frac {\sinh (c+d x)}{5 d (\cosh (c+d x)+1)^3}+\frac {2}{5} \int \frac {1}{\left (\sin \left (i c+i d x+\frac {\pi }{2}\right )+1\right )^2}dx\right )\)

\(\Big \downarrow \) 3129

\(\displaystyle \frac {3}{7} \left (\frac {2}{5} \left (\frac {1}{3} \int \frac {1}{\cosh (c+d x)+1}dx+\frac {\sinh (c+d x)}{3 d (\cosh (c+d x)+1)^2}\right )+\frac {\sinh (c+d x)}{5 d (\cosh (c+d x)+1)^3}\right )+\frac {\sinh (c+d x)}{7 d (\cosh (c+d x)+1)^4}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sinh (c+d x)}{7 d (\cosh (c+d x)+1)^4}+\frac {3}{7} \left (\frac {\sinh (c+d x)}{5 d (\cosh (c+d x)+1)^3}+\frac {2}{5} \left (\frac {\sinh (c+d x)}{3 d (\cosh (c+d x)+1)^2}+\frac {1}{3} \int \frac {1}{\sin \left (i c+i d x+\frac {\pi }{2}\right )+1}dx\right )\right )\)

\(\Big \downarrow \) 3127

\(\displaystyle \frac {\sinh (c+d x)}{7 d (\cosh (c+d x)+1)^4}+\frac {3}{7} \left (\frac {\sinh (c+d x)}{5 d (\cosh (c+d x)+1)^3}+\frac {2}{5} \left (\frac {\sinh (c+d x)}{3 d (\cosh (c+d x)+1)}+\frac {\sinh (c+d x)}{3 d (\cosh (c+d x)+1)^2}\right )\right )\)

Input:

Int[(1 + Cosh[c + d*x])^(-4),x]
 

Output:

Sinh[c + d*x]/(7*d*(1 + Cosh[c + d*x])^4) + (3*(Sinh[c + d*x]/(5*d*(1 + Co 
sh[c + d*x])^3) + (2*(Sinh[c + d*x]/(3*d*(1 + Cosh[c + d*x])^2) + Sinh[c + 
 d*x]/(3*d*(1 + Cosh[c + d*x]))))/5))/7
 

Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3127
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 3129
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] + Simp[(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]
 
Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.52

method result size
risch \(-\frac {4 \left (35 \,{\mathrm e}^{3 d x +3 c}+21 \,{\mathrm e}^{2 d x +2 c}+7 \,{\mathrm e}^{d x +c}+1\right )}{35 d \left ({\mathrm e}^{d x +c}+1\right )^{7}}\) \(48\)
parallelrisch \(-\frac {\left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-\frac {21 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{5}+7 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-7\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{56 d}\) \(54\)
derivativedivides \(\frac {-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{56}+\frac {3 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{40}-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{8}+\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}}{d}\) \(56\)
default \(\frac {-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{56}+\frac {3 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{40}-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{8}+\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}}{d}\) \(56\)

Input:

int(1/(1+cosh(d*x+c))^4,x,method=_RETURNVERBOSE)
 

Output:

-4/35*(35*exp(3*d*x+3*c)+21*exp(2*d*x+2*c)+7*exp(d*x+c)+1)/d/(exp(d*x+c)+1 
)^7
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 347 vs. \(2 (85) = 170\).

Time = 0.08 (sec) , antiderivative size = 347, normalized size of antiderivative = 3.73 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=-\frac {4 \, {\left (35 \, \cosh \left (d x + c\right )^{2} + 10 \, {\left (7 \, \cosh \left (d x + c\right ) + 2\right )} \sinh \left (d x + c\right ) + 35 \, \sinh \left (d x + c\right )^{2} + 22 \, \cosh \left (d x + c\right ) + 7\right )}}{35 \, {\left (d \cosh \left (d x + c\right )^{6} + d \sinh \left (d x + c\right )^{6} + 7 \, d \cosh \left (d x + c\right )^{5} + {\left (6 \, d \cosh \left (d x + c\right ) + 7 \, d\right )} \sinh \left (d x + c\right )^{5} + 21 \, d \cosh \left (d x + c\right )^{4} + {\left (15 \, d \cosh \left (d x + c\right )^{2} + 35 \, d \cosh \left (d x + c\right ) + 21 \, d\right )} \sinh \left (d x + c\right )^{4} + 35 \, d \cosh \left (d x + c\right )^{3} + {\left (20 \, d \cosh \left (d x + c\right )^{3} + 70 \, d \cosh \left (d x + c\right )^{2} + 84 \, d \cosh \left (d x + c\right ) + 35 \, d\right )} \sinh \left (d x + c\right )^{3} + 35 \, d \cosh \left (d x + c\right )^{2} + {\left (15 \, d \cosh \left (d x + c\right )^{4} + 70 \, d \cosh \left (d x + c\right )^{3} + 126 \, d \cosh \left (d x + c\right )^{2} + 105 \, d \cosh \left (d x + c\right ) + 35 \, d\right )} \sinh \left (d x + c\right )^{2} + 22 \, d \cosh \left (d x + c\right ) + {\left (6 \, d \cosh \left (d x + c\right )^{5} + 35 \, d \cosh \left (d x + c\right )^{4} + 84 \, d \cosh \left (d x + c\right )^{3} + 105 \, d \cosh \left (d x + c\right )^{2} + 70 \, d \cosh \left (d x + c\right ) + 20 \, d\right )} \sinh \left (d x + c\right ) + 7 \, d\right )}} \] Input:

integrate(1/(1+cosh(d*x+c))^4,x, algorithm="fricas")
 

Output:

-4/35*(35*cosh(d*x + c)^2 + 10*(7*cosh(d*x + c) + 2)*sinh(d*x + c) + 35*si 
nh(d*x + c)^2 + 22*cosh(d*x + c) + 7)/(d*cosh(d*x + c)^6 + d*sinh(d*x + c) 
^6 + 7*d*cosh(d*x + c)^5 + (6*d*cosh(d*x + c) + 7*d)*sinh(d*x + c)^5 + 21* 
d*cosh(d*x + c)^4 + (15*d*cosh(d*x + c)^2 + 35*d*cosh(d*x + c) + 21*d)*sin 
h(d*x + c)^4 + 35*d*cosh(d*x + c)^3 + (20*d*cosh(d*x + c)^3 + 70*d*cosh(d* 
x + c)^2 + 84*d*cosh(d*x + c) + 35*d)*sinh(d*x + c)^3 + 35*d*cosh(d*x + c) 
^2 + (15*d*cosh(d*x + c)^4 + 70*d*cosh(d*x + c)^3 + 126*d*cosh(d*x + c)^2 
+ 105*d*cosh(d*x + c) + 35*d)*sinh(d*x + c)^2 + 22*d*cosh(d*x + c) + (6*d* 
cosh(d*x + c)^5 + 35*d*cosh(d*x + c)^4 + 84*d*cosh(d*x + c)^3 + 105*d*cosh 
(d*x + c)^2 + 70*d*cosh(d*x + c) + 20*d)*sinh(d*x + c) + 7*d)
 

Sympy [A] (verification not implemented)

Time = 2.12 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.73 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=\begin {cases} - \frac {\tanh ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{56 d} + \frac {3 \tanh ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{40 d} - \frac {\tanh ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 d} + \frac {\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 d} & \text {for}\: d \neq 0 \\\frac {x}{\left (\cosh {\left (c \right )} + 1\right )^{4}} & \text {otherwise} \end {cases} \] Input:

integrate(1/(1+cosh(d*x+c))**4,x)
 

Output:

Piecewise((-tanh(c/2 + d*x/2)**7/(56*d) + 3*tanh(c/2 + d*x/2)**5/(40*d) - 
tanh(c/2 + d*x/2)**3/(8*d) + tanh(c/2 + d*x/2)/(8*d), Ne(d, 0)), (x/(cosh( 
c) + 1)**4, True))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 364 vs. \(2 (85) = 170\).

Time = 0.04 (sec) , antiderivative size = 364, normalized size of antiderivative = 3.91 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=\frac {4 \, e^{\left (-d x - c\right )}}{5 \, d {\left (7 \, e^{\left (-d x - c\right )} + 21 \, e^{\left (-2 \, d x - 2 \, c\right )} + 35 \, e^{\left (-3 \, d x - 3 \, c\right )} + 35 \, e^{\left (-4 \, d x - 4 \, c\right )} + 21 \, e^{\left (-5 \, d x - 5 \, c\right )} + 7 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )} + 1\right )}} + \frac {12 \, e^{\left (-2 \, d x - 2 \, c\right )}}{5 \, d {\left (7 \, e^{\left (-d x - c\right )} + 21 \, e^{\left (-2 \, d x - 2 \, c\right )} + 35 \, e^{\left (-3 \, d x - 3 \, c\right )} + 35 \, e^{\left (-4 \, d x - 4 \, c\right )} + 21 \, e^{\left (-5 \, d x - 5 \, c\right )} + 7 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )} + 1\right )}} + \frac {4 \, e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (7 \, e^{\left (-d x - c\right )} + 21 \, e^{\left (-2 \, d x - 2 \, c\right )} + 35 \, e^{\left (-3 \, d x - 3 \, c\right )} + 35 \, e^{\left (-4 \, d x - 4 \, c\right )} + 21 \, e^{\left (-5 \, d x - 5 \, c\right )} + 7 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )} + 1\right )}} + \frac {4}{35 \, d {\left (7 \, e^{\left (-d x - c\right )} + 21 \, e^{\left (-2 \, d x - 2 \, c\right )} + 35 \, e^{\left (-3 \, d x - 3 \, c\right )} + 35 \, e^{\left (-4 \, d x - 4 \, c\right )} + 21 \, e^{\left (-5 \, d x - 5 \, c\right )} + 7 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )} + 1\right )}} \] Input:

integrate(1/(1+cosh(d*x+c))^4,x, algorithm="maxima")
 

Output:

4/5*e^(-d*x - c)/(d*(7*e^(-d*x - c) + 21*e^(-2*d*x - 2*c) + 35*e^(-3*d*x - 
 3*c) + 35*e^(-4*d*x - 4*c) + 21*e^(-5*d*x - 5*c) + 7*e^(-6*d*x - 6*c) + e 
^(-7*d*x - 7*c) + 1)) + 12/5*e^(-2*d*x - 2*c)/(d*(7*e^(-d*x - c) + 21*e^(- 
2*d*x - 2*c) + 35*e^(-3*d*x - 3*c) + 35*e^(-4*d*x - 4*c) + 21*e^(-5*d*x - 
5*c) + 7*e^(-6*d*x - 6*c) + e^(-7*d*x - 7*c) + 1)) + 4*e^(-3*d*x - 3*c)/(d 
*(7*e^(-d*x - c) + 21*e^(-2*d*x - 2*c) + 35*e^(-3*d*x - 3*c) + 35*e^(-4*d* 
x - 4*c) + 21*e^(-5*d*x - 5*c) + 7*e^(-6*d*x - 6*c) + e^(-7*d*x - 7*c) + 1 
)) + 4/35/(d*(7*e^(-d*x - c) + 21*e^(-2*d*x - 2*c) + 35*e^(-3*d*x - 3*c) + 
 35*e^(-4*d*x - 4*c) + 21*e^(-5*d*x - 5*c) + 7*e^(-6*d*x - 6*c) + e^(-7*d* 
x - 7*c) + 1))
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.51 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=-\frac {4 \, {\left (35 \, e^{\left (3 \, d x + 3 \, c\right )} + 21 \, e^{\left (2 \, d x + 2 \, c\right )} + 7 \, e^{\left (d x + c\right )} + 1\right )}}{35 \, d {\left (e^{\left (d x + c\right )} + 1\right )}^{7}} \] Input:

integrate(1/(1+cosh(d*x+c))^4,x, algorithm="giac")
 

Output:

-4/35*(35*e^(3*d*x + 3*c) + 21*e^(2*d*x + 2*c) + 7*e^(d*x + c) + 1)/(d*(e^ 
(d*x + c) + 1)^7)
 

Mupad [B] (verification not implemented)

Time = 1.98 (sec) , antiderivative size = 283, normalized size of antiderivative = 3.04 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=-\frac {4}{35\,d\,\left (4\,{\mathrm {e}}^{c+d\,x}+6\,{\mathrm {e}}^{2\,c+2\,d\,x}+4\,{\mathrm {e}}^{3\,c+3\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-\frac {16\,{\mathrm {e}}^{c+d\,x}}{35\,d\,\left (5\,{\mathrm {e}}^{c+d\,x}+10\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{3\,c+3\,d\,x}+5\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{5\,c+5\,d\,x}+1\right )}-\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}}{7\,d\,\left (6\,{\mathrm {e}}^{c+d\,x}+15\,{\mathrm {e}}^{2\,c+2\,d\,x}+20\,{\mathrm {e}}^{3\,c+3\,d\,x}+15\,{\mathrm {e}}^{4\,c+4\,d\,x}+6\,{\mathrm {e}}^{5\,c+5\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}-\frac {16\,{\mathrm {e}}^{3\,c+3\,d\,x}}{7\,d\,\left (7\,{\mathrm {e}}^{c+d\,x}+21\,{\mathrm {e}}^{2\,c+2\,d\,x}+35\,{\mathrm {e}}^{3\,c+3\,d\,x}+35\,{\mathrm {e}}^{4\,c+4\,d\,x}+21\,{\mathrm {e}}^{5\,c+5\,d\,x}+7\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{7\,c+7\,d\,x}+1\right )} \] Input:

int(1/(cosh(c + d*x) + 1)^4,x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.32 \[ \int \frac {1}{(1+\cosh (c+d x))^4} \, dx=\frac {-4 e^{3 d x +3 c}-\frac {12 e^{2 d x +2 c}}{5}-\frac {4 e^{d x +c}}{5}-\frac {4}{35}}{d \left (e^{7 d x +7 c}+7 e^{6 d x +6 c}+21 e^{5 d x +5 c}+35 e^{4 d x +4 c}+35 e^{3 d x +3 c}+21 e^{2 d x +2 c}+7 e^{d x +c}+1\right )} \] Input:

int(1/(1+cosh(d*x+c))^4,x)
 

Output:

(4*( - 35*e**(3*c + 3*d*x) - 21*e**(2*c + 2*d*x) - 7*e**(c + d*x) - 1))/(3 
5*d*(e**(7*c + 7*d*x) + 7*e**(6*c + 6*d*x) + 21*e**(5*c + 5*d*x) + 35*e**( 
4*c + 4*d*x) + 35*e**(3*c + 3*d*x) + 21*e**(2*c + 2*d*x) + 7*e**(c + d*x) 
+ 1))