\(\int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx\) [109]

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

Optimal result

Integrand size = 13, antiderivative size = 168 \[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=-\frac {\left (3 a^2+9 a b+8 b^2\right ) \log (1-\tanh (x))}{16 (a+b)^3}+\frac {\left (3 a^2-9 a b+8 b^2\right ) \log (1+\tanh (x))}{16 (a-b)^3}-\frac {b^5 \log (a+b \tanh (x))}{\left (a^2-b^2\right )^3}+\frac {1}{16 (a+b) (1-\tanh (x))^2}+\frac {3 a+5 b}{16 (a+b)^2 (1-\tanh (x))}-\frac {1}{16 (a-b) (1+\tanh (x))^2}-\frac {3 a-5 b}{16 (a-b)^2 (1+\tanh (x))} \] Output:

-1/16*(3*a^2+9*a*b+8*b^2)*ln(1-tanh(x))/(a+b)^3+1/16*(3*a^2-9*a*b+8*b^2)*l 
n(1+tanh(x))/(a-b)^3-b^5*ln(a+b*tanh(x))/(a^2-b^2)^3+1/16/(a+b)/(1-tanh(x) 
)^2+1/16*(3*a+5*b)/(a+b)^2/(1-tanh(x))-1/16/(a-b)/(1+tanh(x))^2-1/16*(3*a- 
5*b)/(a-b)^2/(1+tanh(x))
 

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.23 \[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=\frac {8 b^3 \left (a^2-b^2\right ) \cosh ^2(x)-4 b \left (a^2-b^2\right )^2 \cosh ^4(x)-3 a^5 \log (1-\tanh (x))+10 a^3 b^2 \log (1-\tanh (x))-15 a b^4 \log (1-\tanh (x))+8 b^5 \log (1-\tanh (x))+3 a^5 \log (1+\tanh (x))-10 a^3 b^2 \log (1+\tanh (x))+15 a b^4 \log (1+\tanh (x))+8 b^5 \log (1+\tanh (x))-16 b^5 \log (a+b \tanh (x))+4 a \left (a^2-b^2\right )^2 \cosh ^3(x) \sinh (x)+a \left (3 a^4-10 a^2 b^2+7 b^4\right ) \sinh (2 x)}{16 (a-b)^3 (a+b)^3} \] Input:

Integrate[Cosh[x]^4/(a + b*Tanh[x]),x]
 

Output:

(8*b^3*(a^2 - b^2)*Cosh[x]^2 - 4*b*(a^2 - b^2)^2*Cosh[x]^4 - 3*a^5*Log[1 - 
 Tanh[x]] + 10*a^3*b^2*Log[1 - Tanh[x]] - 15*a*b^4*Log[1 - Tanh[x]] + 8*b^ 
5*Log[1 - Tanh[x]] + 3*a^5*Log[1 + Tanh[x]] - 10*a^3*b^2*Log[1 + Tanh[x]] 
+ 15*a*b^4*Log[1 + Tanh[x]] + 8*b^5*Log[1 + Tanh[x]] - 16*b^5*Log[a + b*Ta 
nh[x]] + 4*a*(a^2 - b^2)^2*Cosh[x]^3*Sinh[x] + a*(3*a^4 - 10*a^2*b^2 + 7*b 
^4)*Sinh[2*x])/(16*(a - b)^3*(a + b)^3)
 

Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.16, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3042, 3987, 27, 477, 2009}

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 {\cosh ^4(x)}{a+b \tanh (x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sec (i x)^4 (a-i b \tan (i x))}dx\)

\(\Big \downarrow \) 3987

\(\displaystyle \frac {\int \frac {b^6}{(a+b \tanh (x)) \left (b^2-b^2 \tanh ^2(x)\right )^3}d(b \tanh (x))}{b}\)

\(\Big \downarrow \) 27

\(\displaystyle b^5 \int \frac {1}{(a+b \tanh (x)) \left (b^2-b^2 \tanh ^2(x)\right )^3}d(b \tanh (x))\)

\(\Big \downarrow \) 477

\(\displaystyle \frac {\int \left (-\frac {b^6}{\left (a^2-b^2\right )^3 (a+b \tanh (x))}+\frac {b^3}{8 (a+b) (b-b \tanh (x))^3}+\frac {b^3}{8 (a-b) (\tanh (x) b+b)^3}+\frac {(3 a+5 b) b^2}{16 (a+b)^2 (b-b \tanh (x))^2}+\frac {(3 a-5 b) b^2}{16 (a-b)^2 (\tanh (x) b+b)^2}+\frac {\left (3 a^2+9 b a+8 b^2\right ) b}{16 (a+b)^3 (b-b \tanh (x))}+\frac {\left (3 a^2-9 b a+8 b^2\right ) b}{16 (a-b)^3 (\tanh (x) b+b)}\right )d(b \tanh (x))}{b}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {b \left (3 a^2+9 a b+8 b^2\right ) \log (b-b \tanh (x))}{16 (a+b)^3}+\frac {b \left (3 a^2-9 a b+8 b^2\right ) \log (b \tanh (x)+b)}{16 (a-b)^3}-\frac {b^6 \log (a+b \tanh (x))}{\left (a^2-b^2\right )^3}+\frac {b^3}{16 (a+b) (b-b \tanh (x))^2}-\frac {b^3}{16 (a-b) (b \tanh (x)+b)^2}+\frac {b^2 (3 a+5 b)}{16 (a+b)^2 (b-b \tanh (x))}-\frac {b^2 (3 a-5 b)}{16 (a-b)^2 (b \tanh (x)+b)}}{b}\)

Input:

Int[Cosh[x]^4/(a + b*Tanh[x]),x]
 

Output:

(-1/16*(b*(3*a^2 + 9*a*b + 8*b^2)*Log[b - b*Tanh[x]])/(a + b)^3 - (b^6*Log 
[a + b*Tanh[x]])/(a^2 - b^2)^3 + (b*(3*a^2 - 9*a*b + 8*b^2)*Log[b + b*Tanh 
[x]])/(16*(a - b)^3) + b^3/(16*(a + b)*(b - b*Tanh[x])^2) + (b^2*(3*a + 5* 
b))/(16*(a + b)^2*(b - b*Tanh[x])) - b^3/(16*(a - b)*(b + b*Tanh[x])^2) - 
((3*a - 5*b)*b^2)/(16*(a - b)^2*(b + b*Tanh[x])))/b
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 477
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
a^p   Int[ExpandIntegrand[(c + d*x)^n*(1 - Rt[-b/a, 2]*x)^p*(1 + Rt[-b/a, 2 
]*x)^p, x], x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IntegerQ[n] & 
& NiceSqrtQ[-b/a] &&  !FractionalPowerFactorQ[Rt[-b/a, 2]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 3987
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ 
), x_Symbol] :> Simp[1/(b*f)   Subst[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), 
 x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b^2, 
0] && IntegerQ[m/2]
 
Maple [A] (verified)

Time = 11.93 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.14

method result size
risch \(\frac {3 a^{2} x}{8 \left (a +b \right )^{3}}+\frac {9 a x b}{8 \left (a +b \right )^{3}}+\frac {x \,b^{2}}{\left (a +b \right )^{3}}+\frac {{\mathrm e}^{4 x}}{64 a +64 b}+\frac {{\mathrm e}^{2 x} a}{8 \left (a +b \right )^{2}}+\frac {3 \,{\mathrm e}^{2 x} b}{16 \left (a +b \right )^{2}}-\frac {{\mathrm e}^{-2 x} a}{8 \left (a -b \right )^{2}}+\frac {3 \,{\mathrm e}^{-2 x} b}{16 \left (a -b \right )^{2}}-\frac {{\mathrm e}^{-4 x}}{64 \left (a -b \right )}+\frac {2 b^{5} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}-\frac {b^{5} \ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right )}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}\) \(191\)
default \(-\frac {b^{5} \ln \left (\tanh \left (\frac {x}{2}\right )^{2} a +2 b \tanh \left (\frac {x}{2}\right )+a \right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {1}{2 \left (2 b +2 a \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{4}}+\frac {2}{\left (4 a +4 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {-7 a -9 b}{8 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {-5 a -7 b}{8 \left (a +b \right )^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (-3 a^{2}-9 a b -8 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{8 \left (a +b \right )^{3}}-\frac {1}{2 \left (2 a -2 b \right ) \left (1+\tanh \left (\frac {x}{2}\right )\right )^{4}}+\frac {2}{\left (4 a -4 b \right ) \left (1+\tanh \left (\frac {x}{2}\right )\right )^{3}}-\frac {-5 a +7 b}{8 \left (a -b \right )^{2} \left (1+\tanh \left (\frac {x}{2}\right )\right )}-\frac {7 a -9 b}{8 \left (a -b \right )^{2} \left (1+\tanh \left (\frac {x}{2}\right )\right )^{2}}+\frac {\left (3 a^{2}-9 a b +8 b^{2}\right ) \ln \left (1+\tanh \left (\frac {x}{2}\right )\right )}{8 \left (a -b \right )^{3}}\) \(265\)

Input:

int(cosh(x)^4/(a+b*tanh(x)),x,method=_RETURNVERBOSE)
 

Output:

3/8*a^2*x/(a+b)^3+9/8*a*x/(a+b)^3*b+x/(a+b)^3*b^2+1/64/(a+b)*exp(4*x)+1/8/ 
(a+b)^2*exp(2*x)*a+3/16/(a+b)^2*exp(2*x)*b-1/8/(a-b)^2*exp(-2*x)*a+3/16/(a 
-b)^2*exp(-2*x)*b-1/64/(a-b)*exp(-4*x)+2*b^5/(a^6-3*a^4*b^2+3*a^2*b^4-b^6) 
*x-b^5/(a^6-3*a^4*b^2+3*a^2*b^4-b^6)*ln(exp(2*x)+(a-b)/(a+b))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1281 vs. \(2 (152) = 304\).

Time = 0.11 (sec) , antiderivative size = 1281, normalized size of antiderivative = 7.62 \[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=\text {Too large to display} \] Input:

integrate(cosh(x)^4/(a+b*tanh(x)),x, algorithm="fricas")
 

Output:

1/64*((a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*cosh(x)^8 + 8*(a 
^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*cosh(x)*sinh(x)^7 + (a^5 
 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*sinh(x)^8 + 4*(2*a^5 - a^4 
*b - 6*a^3*b^2 + 4*a^2*b^3 + 4*a*b^4 - 3*b^5)*cosh(x)^6 + 4*(2*a^5 - a^4*b 
 - 6*a^3*b^2 + 4*a^2*b^3 + 4*a*b^4 - 3*b^5 + 7*(a^5 - a^4*b - 2*a^3*b^2 + 
2*a^2*b^3 + a*b^4 - b^5)*cosh(x)^2)*sinh(x)^6 + 8*(3*a^5 - 10*a^3*b^2 + 15 
*a*b^4 + 8*b^5)*x*cosh(x)^4 + 8*(7*(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + 
a*b^4 - b^5)*cosh(x)^3 + 3*(2*a^5 - a^4*b - 6*a^3*b^2 + 4*a^2*b^3 + 4*a*b^ 
4 - 3*b^5)*cosh(x))*sinh(x)^5 - a^5 - a^4*b + 2*a^3*b^2 + 2*a^2*b^3 - a*b^ 
4 - b^5 + 2*(35*(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*cosh(x 
)^4 + 30*(2*a^5 - a^4*b - 6*a^3*b^2 + 4*a^2*b^3 + 4*a*b^4 - 3*b^5)*cosh(x) 
^2 + 4*(3*a^5 - 10*a^3*b^2 + 15*a*b^4 + 8*b^5)*x)*sinh(x)^4 + 8*(7*(a^5 - 
a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*cosh(x)^5 + 10*(2*a^5 - a^4*b 
 - 6*a^3*b^2 + 4*a^2*b^3 + 4*a*b^4 - 3*b^5)*cosh(x)^3 + 4*(3*a^5 - 10*a^3* 
b^2 + 15*a*b^4 + 8*b^5)*x*cosh(x))*sinh(x)^3 - 4*(2*a^5 + a^4*b - 6*a^3*b^ 
2 - 4*a^2*b^3 + 4*a*b^4 + 3*b^5)*cosh(x)^2 + 4*(7*(a^5 - a^4*b - 2*a^3*b^2 
 + 2*a^2*b^3 + a*b^4 - b^5)*cosh(x)^6 - 2*a^5 - a^4*b + 6*a^3*b^2 + 4*a^2* 
b^3 - 4*a*b^4 - 3*b^5 + 15*(2*a^5 - a^4*b - 6*a^3*b^2 + 4*a^2*b^3 + 4*a*b^ 
4 - 3*b^5)*cosh(x)^4 + 12*(3*a^5 - 10*a^3*b^2 + 15*a*b^4 + 8*b^5)*x*cosh(x 
)^2)*sinh(x)^2 - 64*(b^5*cosh(x)^4 + 4*b^5*cosh(x)^3*sinh(x) + 6*b^5*co...
 

Sympy [F]

\[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=\int \frac {\cosh ^{4}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \] Input:

integrate(cosh(x)**4/(a+b*tanh(x)),x)
 

Output:

Integral(cosh(x)**4/(a + b*tanh(x)), x)
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.98 \[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=-\frac {b^{5} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {{\left (3 \, a^{2} + 9 \, a b + 8 \, b^{2}\right )} x}{8 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )}} + \frac {{\left (4 \, {\left (2 \, a + 3 \, b\right )} e^{\left (-2 \, x\right )} + a + b\right )} e^{\left (4 \, x\right )}}{64 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} - \frac {4 \, {\left (2 \, a - 3 \, b\right )} e^{\left (-2 \, x\right )} + {\left (a - b\right )} e^{\left (-4 \, x\right )}}{64 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} \] Input:

integrate(cosh(x)^4/(a+b*tanh(x)),x, algorithm="maxima")
 

Output:

-b^5*log(-(a - b)*e^(-2*x) - a - b)/(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6) + 
1/8*(3*a^2 + 9*a*b + 8*b^2)*x/(a^3 + 3*a^2*b + 3*a*b^2 + b^3) + 1/64*(4*(2 
*a + 3*b)*e^(-2*x) + a + b)*e^(4*x)/(a^2 + 2*a*b + b^2) - 1/64*(4*(2*a - 3 
*b)*e^(-2*x) + (a - b)*e^(-4*x))/(a^2 - 2*a*b + b^2)
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.35 \[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=-\frac {b^{5} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {{\left (3 \, a^{2} - 9 \, a b + 8 \, b^{2}\right )} x}{8 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )}} - \frac {{\left (18 \, a^{2} e^{\left (4 \, x\right )} - 54 \, a b e^{\left (4 \, x\right )} + 48 \, b^{2} e^{\left (4 \, x\right )} + 8 \, a^{2} e^{\left (2 \, x\right )} - 20 \, a b e^{\left (2 \, x\right )} + 12 \, b^{2} e^{\left (2 \, x\right )} + a^{2} - 2 \, a b + b^{2}\right )} e^{\left (-4 \, x\right )}}{64 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )}} + \frac {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 8 \, a e^{\left (2 \, x\right )} + 12 \, b e^{\left (2 \, x\right )}}{64 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} \] Input:

integrate(cosh(x)^4/(a+b*tanh(x)),x, algorithm="giac")
 

Output:

-b^5*log(abs(a*e^(2*x) + b*e^(2*x) + a - b))/(a^6 - 3*a^4*b^2 + 3*a^2*b^4 
- b^6) + 1/8*(3*a^2 - 9*a*b + 8*b^2)*x/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) - 1 
/64*(18*a^2*e^(4*x) - 54*a*b*e^(4*x) + 48*b^2*e^(4*x) + 8*a^2*e^(2*x) - 20 
*a*b*e^(2*x) + 12*b^2*e^(2*x) + a^2 - 2*a*b + b^2)*e^(-4*x)/(a^3 - 3*a^2*b 
 + 3*a*b^2 - b^3) + 1/64*(a*e^(4*x) + b*e^(4*x) + 8*a*e^(2*x) + 12*b*e^(2* 
x))/(a^2 + 2*a*b + b^2)
 

Mupad [B] (verification not implemented)

Time = 2.62 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.85 \[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=\frac {{\mathrm {e}}^{4\,x}}{64\,a+64\,b}-\frac {{\mathrm {e}}^{-4\,x}}{64\,a-64\,b}-\frac {{\mathrm {e}}^{-2\,x}\,\left (2\,a-3\,b\right )}{16\,{\left (a-b\right )}^2}-\frac {b^5\,\ln \left (a-b+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}+\frac {x\,\left (3\,a^2-9\,a\,b+8\,b^2\right )}{8\,{\left (a-b\right )}^3}+\frac {{\mathrm {e}}^{2\,x}\,\left (2\,a+3\,b\right )}{16\,{\left (a+b\right )}^2} \] Input:

int(cosh(x)^4/(a + b*tanh(x)),x)
 

Output:

exp(4*x)/(64*a + 64*b) - exp(-4*x)/(64*a - 64*b) - (exp(-2*x)*(2*a - 3*b)) 
/(16*(a - b)^2) - (b^5*log(a - b + a*exp(2*x) + b*exp(2*x)))/(a^6 - b^6 + 
3*a^2*b^4 - 3*a^4*b^2) + (x*(3*a^2 - 9*a*b + 8*b^2))/(8*(a - b)^3) + (exp( 
2*x)*(2*a + 3*b))/(16*(a + b)^2)
 

Reduce [B] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 355, normalized size of antiderivative = 2.11 \[ \int \frac {\cosh ^4(x)}{a+b \tanh (x)} \, dx=\frac {2 e^{8 x} a^{2} b^{3}-64 e^{4 x} \mathrm {log}\left (e^{2 x} a +e^{2 x} b +a -b \right ) b^{5}-e^{8 x} b^{5}-4 e^{2 x} a^{4} b +16 e^{2 x} a^{2} b^{3}-e^{8 x} a^{4} b -80 e^{4 x} a^{3} b^{2} x +120 e^{4 x} a \,b^{4} x +16 e^{6 x} a^{2} b^{3}+e^{8 x} a^{5}-a^{5}+2 a^{3} b^{2}+e^{8 x} a \,b^{4}-24 e^{6 x} a^{3} b^{2}+16 e^{6 x} a \,b^{4}+24 e^{2 x} a^{3} b^{2}-16 e^{2 x} a \,b^{4}-b^{5}-12 e^{6 x} b^{5}+2 a^{2} b^{3}-12 e^{2 x} b^{5}+8 e^{6 x} a^{5}-a^{4} b -2 e^{8 x} a^{3} b^{2}-4 e^{6 x} a^{4} b +24 e^{4 x} a^{5} x -8 e^{2 x} a^{5}-a \,b^{4}+64 e^{4 x} b^{5} x}{64 e^{4 x} \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )} \] Input:

int(cosh(x)^4/(a+b*tanh(x)),x)
 

Output:

(e**(8*x)*a**5 - e**(8*x)*a**4*b - 2*e**(8*x)*a**3*b**2 + 2*e**(8*x)*a**2* 
b**3 + e**(8*x)*a*b**4 - e**(8*x)*b**5 + 8*e**(6*x)*a**5 - 4*e**(6*x)*a**4 
*b - 24*e**(6*x)*a**3*b**2 + 16*e**(6*x)*a**2*b**3 + 16*e**(6*x)*a*b**4 - 
12*e**(6*x)*b**5 - 64*e**(4*x)*log(e**(2*x)*a + e**(2*x)*b + a - b)*b**5 + 
 24*e**(4*x)*a**5*x - 80*e**(4*x)*a**3*b**2*x + 120*e**(4*x)*a*b**4*x + 64 
*e**(4*x)*b**5*x - 8*e**(2*x)*a**5 - 4*e**(2*x)*a**4*b + 24*e**(2*x)*a**3* 
b**2 + 16*e**(2*x)*a**2*b**3 - 16*e**(2*x)*a*b**4 - 12*e**(2*x)*b**5 - a** 
5 - a**4*b + 2*a**3*b**2 + 2*a**2*b**3 - a*b**4 - b**5)/(64*e**(4*x)*(a**6 
 - 3*a**4*b**2 + 3*a**2*b**4 - b**6))