\(\int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx\) [109]

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

Optimal result

Integrand size = 13, antiderivative size = 157 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {a \left (8 a^4-20 a^2 b^2+15 b^4\right ) \arctan (\sinh (x))}{8 b^6}-\frac {\left (a^2-b^2\right )^{5/2} \arctan \left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^6}+\frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}-\frac {a \left (4 a^2-7 b^2\right ) \text {sech}(x) \tanh (x)}{8 b^4}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2} \]

[Out]

1/8*a*(8*a^4-20*a^2*b^2+15*b^4)*arctan(sinh(x))/b^6-(a^2-b^2)^(5/2)*arctan(cosh(x)*(b+a*tanh(x))/(a^2-b^2)^(1/
2))/b^6+(a^2-b^2)^2*sech(x)/b^5-1/3*(a^2-b^2)*sech(x)^3/b^3+1/5*sech(x)^5/b-1/8*a*(4*a^2-7*b^2)*sech(x)*tanh(x
)/b^4+1/4*a*sech(x)^3*tanh(x)/b^2

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.19, number of steps used = 14, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3591, 3567, 3853, 3855, 3590, 212} \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {a \left (a^2-b^2\right )^2 \arctan (\sinh (x))}{b^6}-\frac {\left (a^2-b^2\right )^{5/2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^6}-\frac {a \left (a^2-b^2\right ) \arctan (\sinh (x))}{2 b^4}+\frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {a \left (a^2-b^2\right ) \tanh (x) \text {sech}(x)}{2 b^4}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {3 a \arctan (\sinh (x))}{8 b^2}+\frac {a \tanh (x) \text {sech}^3(x)}{4 b^2}+\frac {3 a \tanh (x) \text {sech}(x)}{8 b^2}+\frac {\text {sech}^5(x)}{5 b} \]

[In]

Int[Sech[x]^7/(a + b*Tanh[x]),x]

[Out]

(3*a*ArcTan[Sinh[x]])/(8*b^2) - (a*(a^2 - b^2)*ArcTan[Sinh[x]])/(2*b^4) + (a*(a^2 - b^2)^2*ArcTan[Sinh[x]])/b^
6 - ((a^2 - b^2)^(5/2)*ArcTan[(Cosh[x]*(b + a*Tanh[x]))/Sqrt[a^2 - b^2]])/b^6 + ((a^2 - b^2)^2*Sech[x])/b^5 -
((a^2 - b^2)*Sech[x]^3)/(3*b^3) + Sech[x]^5/(5*b) + (3*a*Sech[x]*Tanh[x])/(8*b^2) - (a*(a^2 - b^2)*Sech[x]*Tan
h[x])/(2*b^4) + (a*Sech[x]^3*Tanh[x])/(4*b^2)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3590

Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[-f^(-1), Subst[Int[1/(a^
2 + b^2 - x^2), x], x, (b - a*Tan[e + f*x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]

Rule 3591

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[-d^2/b^2, I
nt[(d*Sec[e + f*x])^(m - 2)*(a - b*Tan[e + f*x]), x], x] + Dist[d^2*((a^2 + b^2)/b^2), Int[(d*Sec[e + f*x])^(m
 - 2)/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 + b^2, 0] && IGtQ[m, 1]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \text {sech}^5(x) (a-b \tanh (x)) \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}^5(x)}{a+b \tanh (x)} \, dx}{b^2} \\ & = \frac {\text {sech}^5(x)}{5 b}+\frac {a \int \text {sech}^5(x) \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \text {sech}^3(x) (a-b \tanh (x)) \, dx}{b^4}+\frac {\left (a^2-b^2\right )^2 \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx}{b^4} \\ & = -\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2}+\frac {(3 a) \int \text {sech}^3(x) \, dx}{4 b^2}-\frac {\left (a \left (a^2-b^2\right )\right ) \int \text {sech}^3(x) \, dx}{b^4}+\frac {\left (a^2-b^2\right )^2 \int \text {sech}(x) (a-b \tanh (x)) \, dx}{b^6}-\frac {\left (a^2-b^2\right )^3 \int \frac {\text {sech}(x)}{a+b \tanh (x)} \, dx}{b^6} \\ & = \frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}+\frac {3 a \text {sech}(x) \tanh (x)}{8 b^2}-\frac {a \left (a^2-b^2\right ) \text {sech}(x) \tanh (x)}{2 b^4}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2}+\frac {(3 a) \int \text {sech}(x) \, dx}{8 b^2}-\frac {\left (a \left (a^2-b^2\right )\right ) \int \text {sech}(x) \, dx}{2 b^4}+\frac {\left (a \left (a^2-b^2\right )^2\right ) \int \text {sech}(x) \, dx}{b^6}-\frac {\left (i \left (a^2-b^2\right )^3\right ) \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,\cosh (x) (-i b-i a \tanh (x))\right )}{b^6} \\ & = \frac {3 a \arctan (\sinh (x))}{8 b^2}-\frac {a \left (a^2-b^2\right ) \arctan (\sinh (x))}{2 b^4}+\frac {a \left (a^2-b^2\right )^2 \arctan (\sinh (x))}{b^6}-\frac {\left (a^2-b^2\right )^{5/2} \arctan \left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^6}+\frac {\left (a^2-b^2\right )^2 \text {sech}(x)}{b^5}-\frac {\left (a^2-b^2\right ) \text {sech}^3(x)}{3 b^3}+\frac {\text {sech}^5(x)}{5 b}+\frac {3 a \text {sech}(x) \tanh (x)}{8 b^2}-\frac {a \left (a^2-b^2\right ) \text {sech}(x) \tanh (x)}{2 b^4}+\frac {a \text {sech}^3(x) \tanh (x)}{4 b^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.47 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.06 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {30 \left (a \left (8 a^4-20 a^2 b^2+15 b^4\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )-8 \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )^2 \arctan \left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )\right )+24 b^5 \text {sech}^5(x)+10 b^3 \text {sech}^3(x) \left (-4 a^2+4 b^2+3 a b \tanh (x)\right )+15 b \text {sech}(x) \left (8 \left (a^2-b^2\right )^2+\left (-4 a^3 b+7 a b^3\right ) \tanh (x)\right )}{120 b^6} \]

[In]

Integrate[Sech[x]^7/(a + b*Tanh[x]),x]

[Out]

(30*(a*(8*a^4 - 20*a^2*b^2 + 15*b^4)*ArcTan[Tanh[x/2]] - 8*Sqrt[a - b]*Sqrt[a + b]*(a^2 - b^2)^2*ArcTan[(b + a
*Tanh[x/2])/(Sqrt[a - b]*Sqrt[a + b])]) + 24*b^5*Sech[x]^5 + 10*b^3*Sech[x]^3*(-4*a^2 + 4*b^2 + 3*a*b*Tanh[x])
 + 15*b*Sech[x]*(8*(a^2 - b^2)^2 + (-4*a^3*b + 7*a*b^3)*Tanh[x]))/(120*b^6)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(322\) vs. \(2(143)=286\).

Time = 134.96 (sec) , antiderivative size = 323, normalized size of antiderivative = 2.06

method result size
default \(\frac {2 \left (-a^{6}+3 a^{4} b^{2}-3 a^{2} b^{4}+b^{6}\right ) \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{6} \sqrt {a^{2}-b^{2}}}+\frac {\frac {2 \left (\left (\frac {1}{2} a^{3} b^{2}-\frac {9}{8} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )^{9}+\left (a^{4} b -3 a^{2} b^{3}+3 b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{8}+\left (a^{3} b^{2}-\frac {5}{4} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )^{7}+\left (4 a^{4} b -10 a^{2} b^{3}+6 b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{6}+\left (6 a^{4} b -\frac {40}{3} a^{2} b^{3}+\frac {28}{3} b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{4}+\left (-a^{3} b^{2}+\frac {5}{4} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )^{3}+\left (4 a^{4} b -\frac {26}{3} a^{2} b^{3}+\frac {14}{3} b^{5}\right ) \tanh \left (\frac {x}{2}\right )^{2}+\left (-\frac {1}{2} a^{3} b^{2}+\frac {9}{8} a \,b^{4}\right ) \tanh \left (\frac {x}{2}\right )+a^{4} b -\frac {7 a^{2} b^{3}}{3}+\frac {23 b^{5}}{15}\right )}{\left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )^{5}}+\frac {a \left (8 a^{4}-20 a^{2} b^{2}+15 b^{4}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{4}}{b^{6}}\) \(323\)
risch \(\frac {{\mathrm e}^{x} \left (120 a^{4} {\mathrm e}^{8 x}-60 a^{3} b \,{\mathrm e}^{8 x}-240 a^{2} b^{2} {\mathrm e}^{8 x}+105 a \,b^{3} {\mathrm e}^{8 x}+120 b^{4} {\mathrm e}^{8 x}+480 a^{4} {\mathrm e}^{6 x}-120 a^{3} b \,{\mathrm e}^{6 x}-1120 a^{2} b^{2} {\mathrm e}^{6 x}+330 a \,b^{3} {\mathrm e}^{6 x}+640 b^{4} {\mathrm e}^{6 x}+720 \,{\mathrm e}^{4 x} a^{4}-1760 \,{\mathrm e}^{4 x} a^{2} b^{2}+1424 b^{4} {\mathrm e}^{4 x}+480 \,{\mathrm e}^{2 x} a^{4}+120 \,{\mathrm e}^{2 x} a^{3} b -1120 \,{\mathrm e}^{2 x} a^{2} b^{2}-330 \,{\mathrm e}^{2 x} a \,b^{3}+640 b^{4} {\mathrm e}^{2 x}+120 a^{4}+60 a^{3} b -240 a^{2} b^{2}-105 a \,b^{3}+120 b^{4}\right )}{60 b^{5} \left (1+{\mathrm e}^{2 x}\right )^{5}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{4}}{b^{6}}-\frac {2 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{4}}{b^{6}}+\frac {2 \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right ) a^{2}}{b^{4}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}+\frac {i a^{5} \ln \left ({\mathrm e}^{x}+i\right )}{b^{6}}-\frac {5 i a^{3} \ln \left ({\mathrm e}^{x}+i\right )}{2 b^{4}}+\frac {15 i a \ln \left ({\mathrm e}^{x}+i\right )}{8 b^{2}}-\frac {i a^{5} \ln \left ({\mathrm e}^{x}-i\right )}{b^{6}}+\frac {5 i a^{3} \ln \left ({\mathrm e}^{x}-i\right )}{2 b^{4}}-\frac {15 i a \ln \left ({\mathrm e}^{x}-i\right )}{8 b^{2}}\) \(549\)

[In]

int(sech(x)^7/(a+b*tanh(x)),x,method=_RETURNVERBOSE)

[Out]

2*(-a^6+3*a^4*b^2-3*a^2*b^4+b^6)/b^6/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tanh(1/2*x)+2*b)/(a^2-b^2)^(1/2))+2/b^6*(
((1/2*a^3*b^2-9/8*a*b^4)*tanh(1/2*x)^9+(a^4*b-3*a^2*b^3+3*b^5)*tanh(1/2*x)^8+(a^3*b^2-5/4*a*b^4)*tanh(1/2*x)^7
+(4*a^4*b-10*a^2*b^3+6*b^5)*tanh(1/2*x)^6+(6*a^4*b-40/3*a^2*b^3+28/3*b^5)*tanh(1/2*x)^4+(-a^3*b^2+5/4*a*b^4)*t
anh(1/2*x)^3+(4*a^4*b-26/3*a^2*b^3+14/3*b^5)*tanh(1/2*x)^2+(-1/2*a^3*b^2+9/8*a*b^4)*tanh(1/2*x)+a^4*b-7/3*a^2*
b^3+23/15*b^5)/(1+tanh(1/2*x)^2)^5+1/8*a*(8*a^4-20*a^2*b^2+15*b^4)*arctan(tanh(1/2*x)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3227 vs. \(2 (143) = 286\).

Time = 0.41 (sec) , antiderivative size = 6509, normalized size of antiderivative = 41.46 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\text {Too large to display} \]

[In]

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

[Out]

Too large to include

Sympy [F]

\[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\int \frac {\operatorname {sech}^{7}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \]

[In]

integrate(sech(x)**7/(a+b*tanh(x)),x)

[Out]

Integral(sech(x)**7/(a + b*tanh(x)), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\text {Exception raised: ValueError} \]

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more de

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 326 vs. \(2 (143) = 286\).

Time = 0.27 (sec) , antiderivative size = 326, normalized size of antiderivative = 2.08 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {{\left (8 \, a^{5} - 20 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \arctan \left (e^{x}\right )}{4 \, b^{6}} - \frac {2 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} b^{6}} + \frac {120 \, a^{4} e^{\left (9 \, x\right )} - 60 \, a^{3} b e^{\left (9 \, x\right )} - 240 \, a^{2} b^{2} e^{\left (9 \, x\right )} + 105 \, a b^{3} e^{\left (9 \, x\right )} + 120 \, b^{4} e^{\left (9 \, x\right )} + 480 \, a^{4} e^{\left (7 \, x\right )} - 120 \, a^{3} b e^{\left (7 \, x\right )} - 1120 \, a^{2} b^{2} e^{\left (7 \, x\right )} + 330 \, a b^{3} e^{\left (7 \, x\right )} + 640 \, b^{4} e^{\left (7 \, x\right )} + 720 \, a^{4} e^{\left (5 \, x\right )} - 1760 \, a^{2} b^{2} e^{\left (5 \, x\right )} + 1424 \, b^{4} e^{\left (5 \, x\right )} + 480 \, a^{4} e^{\left (3 \, x\right )} + 120 \, a^{3} b e^{\left (3 \, x\right )} - 1120 \, a^{2} b^{2} e^{\left (3 \, x\right )} - 330 \, a b^{3} e^{\left (3 \, x\right )} + 640 \, b^{4} e^{\left (3 \, x\right )} + 120 \, a^{4} e^{x} + 60 \, a^{3} b e^{x} - 240 \, a^{2} b^{2} e^{x} - 105 \, a b^{3} e^{x} + 120 \, b^{4} e^{x}}{60 \, b^{5} {\left (e^{\left (2 \, x\right )} + 1\right )}^{5}} \]

[In]

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

[Out]

1/4*(8*a^5 - 20*a^3*b^2 + 15*a*b^4)*arctan(e^x)/b^6 - 2*(a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*arctan((a*e^x + b*
e^x)/sqrt(a^2 - b^2))/(sqrt(a^2 - b^2)*b^6) + 1/60*(120*a^4*e^(9*x) - 60*a^3*b*e^(9*x) - 240*a^2*b^2*e^(9*x) +
 105*a*b^3*e^(9*x) + 120*b^4*e^(9*x) + 480*a^4*e^(7*x) - 120*a^3*b*e^(7*x) - 1120*a^2*b^2*e^(7*x) + 330*a*b^3*
e^(7*x) + 640*b^4*e^(7*x) + 720*a^4*e^(5*x) - 1760*a^2*b^2*e^(5*x) + 1424*b^4*e^(5*x) + 480*a^4*e^(3*x) + 120*
a^3*b*e^(3*x) - 1120*a^2*b^2*e^(3*x) - 330*a*b^3*e^(3*x) + 640*b^4*e^(3*x) + 120*a^4*e^x + 60*a^3*b*e^x - 240*
a^2*b^2*e^x - 105*a*b^3*e^x + 120*b^4*e^x)/(b^5*(e^(2*x) + 1)^5)

Mupad [B] (verification not implemented)

Time = 7.59 (sec) , antiderivative size = 447, normalized size of antiderivative = 2.85 \[ \int \frac {\text {sech}^7(x)}{a+b \tanh (x)} \, dx=\frac {32\,{\mathrm {e}}^x}{5\,b\,\left (5\,{\mathrm {e}}^{2\,x}+10\,{\mathrm {e}}^{4\,x}+10\,{\mathrm {e}}^{6\,x}+5\,{\mathrm {e}}^{8\,x}+{\mathrm {e}}^{10\,x}+1\right )}-\frac {\ln \left (\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}+a^5\,{\mathrm {e}}^x+b^5\,{\mathrm {e}}^x+a\,b^4\,{\mathrm {e}}^x+a^4\,b\,{\mathrm {e}}^x-2\,a^2\,b^3\,{\mathrm {e}}^x-2\,a^3\,b^2\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}}{b^6}+\frac {\ln \left (a^5\,{\mathrm {e}}^x-\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}+b^5\,{\mathrm {e}}^x+a\,b^4\,{\mathrm {e}}^x+a^4\,b\,{\mathrm {e}}^x-2\,a^2\,b^3\,{\mathrm {e}}^x-2\,a^3\,b^2\,{\mathrm {e}}^x\right )\,\sqrt {-{\left (a+b\right )}^5\,{\left (a-b\right )}^5}}{b^6}-\frac {{\mathrm {e}}^x\,\left (-12\,a^3+16\,a^2\,b+9\,a\,b^2-16\,b^3\right )}{6\,b^4\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {{\mathrm {e}}^x\,\left (8\,a^4-4\,a^3\,b-16\,a^2\,b^2+7\,a\,b^3+8\,b^4\right )}{4\,b^5\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {4\,{\mathrm {e}}^x\,\left (5\,a-16\,b\right )}{5\,b^2\,\left (4\,{\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1\right )}+\frac {2\,{\mathrm {e}}^x\,\left (20\,a^2-45\,a\,b+28\,b^2\right )}{15\,b^3\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {a\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (8\,a^4-20\,a^2\,b^2+15\,b^4\right )\,1{}\mathrm {i}}{8\,b^6}+\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (8\,a^4-20\,a^2\,b^2+15\,b^4\right )\,1{}\mathrm {i}}{8\,b^6} \]

[In]

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

[Out]

(32*exp(x))/(5*b*(5*exp(2*x) + 10*exp(4*x) + 10*exp(6*x) + 5*exp(8*x) + exp(10*x) + 1)) - (log((-(a + b)^5*(a
- b)^5)^(1/2) + a^5*exp(x) + b^5*exp(x) + a*b^4*exp(x) + a^4*b*exp(x) - 2*a^2*b^3*exp(x) - 2*a^3*b^2*exp(x))*(
-(a + b)^5*(a - b)^5)^(1/2))/b^6 + (log(a^5*exp(x) - (-(a + b)^5*(a - b)^5)^(1/2) + b^5*exp(x) + a*b^4*exp(x)
+ a^4*b*exp(x) - 2*a^2*b^3*exp(x) - 2*a^3*b^2*exp(x))*(-(a + b)^5*(a - b)^5)^(1/2))/b^6 - (exp(x)*(9*a*b^2 + 1
6*a^2*b - 12*a^3 - 16*b^3))/(6*b^4*(2*exp(2*x) + exp(4*x) + 1)) + (exp(x)*(7*a*b^3 - 4*a^3*b + 8*a^4 + 8*b^4 -
 16*a^2*b^2))/(4*b^5*(exp(2*x) + 1)) - (a*log(exp(x) - 1i)*(8*a^4 + 15*b^4 - 20*a^2*b^2)*1i)/(8*b^6) + (a*log(
exp(x) + 1i)*(8*a^4 + 15*b^4 - 20*a^2*b^2)*1i)/(8*b^6) + (4*exp(x)*(5*a - 16*b))/(5*b^2*(4*exp(2*x) + 6*exp(4*
x) + 4*exp(6*x) + exp(8*x) + 1)) + (2*exp(x)*(20*a^2 - 45*a*b + 28*b^2))/(15*b^3*(3*exp(2*x) + 3*exp(4*x) + ex
p(6*x) + 1))