Integrand size = 13, antiderivative size = 83 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {\arctan (\sinh (x))}{2 a}-\frac {b^2 \arctan (\sinh (x))}{a^3}+\frac {b \sqrt {a^2-b^2} \text {arctanh}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}(x) \tanh (x)}{2 a} \] Output:
1/2*arctan(sinh(x))/a-b^2*arctan(sinh(x))/a^3+b*(a^2-b^2)^(1/2)*arctanh((a *cosh(x)+b*sinh(x))/(a^2-b^2)^(1/2))/a^3-b*sech(x)/a^2+1/2*sech(x)*tanh(x) /a
Time = 0.46 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.02 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {2 \left (a^2-2 b^2\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )+4 b \sqrt {-a+b} \sqrt {a+b} \arctan \left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a+b} \sqrt {a+b}}\right )+a \text {sech}(x) (-2 b+a \tanh (x))}{2 a^3} \] Input:
Integrate[Sech[x]^3/(a + b*Coth[x]),x]
Output:
(2*(a^2 - 2*b^2)*ArcTan[Tanh[x/2]] + 4*b*Sqrt[-a + b]*Sqrt[a + b]*ArcTan[( a + b*Tanh[x/2])/(Sqrt[-a + b]*Sqrt[a + b])] + a*Sech[x]*(-2*b + a*Tanh[x] ))/(2*a^3)
Result contains complex when optimal does not.
Time = 0.72 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.18, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.615, Rules used = {3042, 4001, 26, 26, 3042, 26, 3589, 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 {\text {sech}^3(x)}{a+b \coth (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin \left (\frac {\pi }{2}+i x\right )^3 \left (a-i b \tan \left (\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 4001 |
\(\displaystyle \int -\frac {i \tanh (x) \text {sech}^2(x)}{-i a \sinh (x)-i b \cosh (x)}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {i \text {sech}^2(x) \tanh (x)}{b \cosh (x)+a \sinh (x)}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \int \frac {\tanh (x) \text {sech}^2(x)}{a \sinh (x)+b \cosh (x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i \sin (i x)}{\cos (i x)^3 (b \cos (i x)-i a \sin (i x))}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {\sin (i x)}{\cos (i x)^3 (b \cos (i x)-i a \sin (i x))}dx\) |
\(\Big \downarrow \) 3589 |
\(\displaystyle -i \int \left (\frac {i \text {sech}^3(x)}{a}+\frac {b \text {sech}^2(x)}{a (i b \cosh (x)+i a \sinh (x))}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -i \left (-\frac {i b^2 \arctan (\sinh (x))}{a^3}-\frac {i b \text {sech}(x)}{a^2}+\frac {i b \sqrt {a^2-b^2} \text {arctanh}\left (\frac {a \cosh (x)+b \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a^3}+\frac {i \arctan (\sinh (x))}{2 a}+\frac {i \tanh (x) \text {sech}(x)}{2 a}\right )\) |
Input:
Int[Sech[x]^3/(a + b*Coth[x]),x]
Output:
(-I)*(((I/2)*ArcTan[Sinh[x]])/a - (I*b^2*ArcTan[Sinh[x]])/a^3 + (I*b*Sqrt[ a^2 - b^2]*ArcTanh[(a*Cosh[x] + b*Sinh[x])/Sqrt[a^2 - b^2]])/a^3 - (I*b*Se ch[x])/a^2 + ((I/2)*Sech[x]*Tanh[x])/a)
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[(cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.))/(cos[(c_. ) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[Ex pandTrig[cos[c + d*x]^m*(sin[c + d*x]^n/(a*cos[c + d*x] + b*sin[c + d*x])), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IntegersQ[m, n]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _.), x_Symbol] :> Int[Sin[e + f*x]^m*((a*Cos[e + f*x] + b*Sin[e + f*x])^n/C os[e + f*x]^n), x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && ILtQ [n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))
Time = 4.12 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.46
method | result | size |
default | \(-\frac {2 b \left (a^{2}-b^{2}\right ) \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{a^{3} \sqrt {-a^{2}+b^{2}}}+\frac {\frac {2 \left (-\frac {\tanh \left (\frac {x}{2}\right )^{3} a^{2}}{2}-\tanh \left (\frac {x}{2}\right )^{2} a b +\frac {\tanh \left (\frac {x}{2}\right ) a^{2}}{2}-a b \right )}{\left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )^{2}}+\left (a^{2}-2 b^{2}\right ) \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a^{3}}\) | \(121\) |
risch | \(\frac {{\mathrm e}^{x} \left ({\mathrm e}^{2 x} a -2 \,{\mathrm e}^{2 x} b -a -2 b \right )}{\left ({\mathrm e}^{2 x}+1\right )^{2} a^{2}}+\frac {i \ln \left ({\mathrm e}^{x}+i\right )}{2 a}-\frac {i \ln \left ({\mathrm e}^{x}+i\right ) b^{2}}{a^{3}}-\frac {i \ln \left ({\mathrm e}^{x}-i\right )}{2 a}+\frac {i \ln \left ({\mathrm e}^{x}-i\right ) b^{2}}{a^{3}}+\frac {\sqrt {a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{x}+\frac {\sqrt {a^{2}-b^{2}}}{a +b}\right )}{a^{3}}-\frac {\sqrt {a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{x}-\frac {\sqrt {a^{2}-b^{2}}}{a +b}\right )}{a^{3}}\) | \(166\) |
Input:
int(sech(x)^3/(a+b*coth(x)),x,method=_RETURNVERBOSE)
Output:
-2*b*(a^2-b^2)/a^3/(-a^2+b^2)^(1/2)*arctan(1/2*(2*tanh(1/2*x)*b+2*a)/(-a^2 +b^2)^(1/2))+2/a^3*((-1/2*tanh(1/2*x)^3*a^2-tanh(1/2*x)^2*a*b+1/2*tanh(1/2 *x)*a^2-a*b)/(tanh(1/2*x)^2+1)^2+1/2*(a^2-2*b^2)*arctan(tanh(1/2*x)))
Leaf count of result is larger than twice the leaf count of optimal. 401 vs. \(2 (75) = 150\).
Time = 0.13 (sec) , antiderivative size = 856, normalized size of antiderivative = 10.31 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\text {Too large to display} \] Input:
integrate(sech(x)^3/(a+b*coth(x)),x, algorithm="fricas")
Output:
[((a^2 - 2*a*b)*cosh(x)^3 + 3*(a^2 - 2*a*b)*cosh(x)*sinh(x)^2 + (a^2 - 2*a *b)*sinh(x)^3 + (b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 + 2*b*c osh(x)^2 + 2*(3*b*cosh(x)^2 + b)*sinh(x)^2 + 4*(b*cosh(x)^3 + b*cosh(x))*s inh(x) + b)*sqrt(a^2 - b^2)*log(((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sin h(x) + (a + b)*sinh(x)^2 + 2*sqrt(a^2 - b^2)*(cosh(x) + sinh(x)) + a - b)/ ((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 - a + b )) + ((a^2 - 2*b^2)*cosh(x)^4 + 4*(a^2 - 2*b^2)*cosh(x)*sinh(x)^3 + (a^2 - 2*b^2)*sinh(x)^4 + 2*(a^2 - 2*b^2)*cosh(x)^2 + 2*(3*(a^2 - 2*b^2)*cosh(x) ^2 + a^2 - 2*b^2)*sinh(x)^2 + a^2 - 2*b^2 + 4*((a^2 - 2*b^2)*cosh(x)^3 + ( a^2 - 2*b^2)*cosh(x))*sinh(x))*arctan(cosh(x) + sinh(x)) - (a^2 + 2*a*b)*c osh(x) + (3*(a^2 - 2*a*b)*cosh(x)^2 - a^2 - 2*a*b)*sinh(x))/(a^3*cosh(x)^4 + 4*a^3*cosh(x)*sinh(x)^3 + a^3*sinh(x)^4 + 2*a^3*cosh(x)^2 + a^3 + 2*(3* a^3*cosh(x)^2 + a^3)*sinh(x)^2 + 4*(a^3*cosh(x)^3 + a^3*cosh(x))*sinh(x)), ((a^2 - 2*a*b)*cosh(x)^3 + 3*(a^2 - 2*a*b)*cosh(x)*sinh(x)^2 + (a^2 - 2*a *b)*sinh(x)^3 - 2*(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 + 2*b *cosh(x)^2 + 2*(3*b*cosh(x)^2 + b)*sinh(x)^2 + 4*(b*cosh(x)^3 + b*cosh(x)) *sinh(x) + b)*sqrt(-a^2 + b^2)*arctan(sqrt(-a^2 + b^2)/((a + b)*cosh(x) + (a + b)*sinh(x))) + ((a^2 - 2*b^2)*cosh(x)^4 + 4*(a^2 - 2*b^2)*cosh(x)*sin h(x)^3 + (a^2 - 2*b^2)*sinh(x)^4 + 2*(a^2 - 2*b^2)*cosh(x)^2 + 2*(3*(a^2 - 2*b^2)*cosh(x)^2 + a^2 - 2*b^2)*sinh(x)^2 + a^2 - 2*b^2 + 4*((a^2 - 2*...
\[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\int \frac {\operatorname {sech}^{3}{\left (x \right )}}{a + b \coth {\left (x \right )}}\, dx \] Input:
integrate(sech(x)**3/(a+b*coth(x)),x)
Output:
Integral(sech(x)**3/(a + b*coth(x)), x)
Exception generated. \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(sech(x)^3/(a+b*coth(x)),x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.13 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.23 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {{\left (a^{2} - 2 \, b^{2}\right )} \arctan \left (e^{x}\right )}{a^{3}} - \frac {2 \, {\left (a^{2} b - b^{3}\right )} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} a^{3}} + \frac {a e^{\left (3 \, x\right )} - 2 \, b e^{\left (3 \, x\right )} - a e^{x} - 2 \, b e^{x}}{a^{2} {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} \] Input:
integrate(sech(x)^3/(a+b*coth(x)),x, algorithm="giac")
Output:
(a^2 - 2*b^2)*arctan(e^x)/a^3 - 2*(a^2*b - b^3)*arctan((a*e^x + b*e^x)/sqr t(-a^2 + b^2))/(sqrt(-a^2 + b^2)*a^3) + (a*e^(3*x) - 2*b*e^(3*x) - a*e^x - 2*b*e^x)/(a^2*(e^(2*x) + 1)^2)
Time = 5.21 (sec) , antiderivative size = 166, normalized size of antiderivative = 2.00 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {{\mathrm {e}}^x\,\left (a-2\,b\right )}{a^2\,\left ({\mathrm {e}}^{2\,x}+1\right )}+\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,\left (a^2\,1{}\mathrm {i}-b^2\,2{}\mathrm {i}\right )}{2\,a^3}-\frac {2\,{\mathrm {e}}^x}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}-\frac {\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left (a^2\,1{}\mathrm {i}-b^2\,2{}\mathrm {i}\right )}{2\,a^3}+\frac {b\,\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x+\sqrt {a^2-b^2}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{a^3}-\frac {b\,\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x-\sqrt {a^2-b^2}\right )\,\sqrt {\left (a+b\right )\,\left (a-b\right )}}{a^3} \] Input:
int(1/(cosh(x)^3*(a + b*coth(x))),x)
Output:
(log(exp(x) + 1i)*(a^2*1i - b^2*2i))/(2*a^3) - (log(exp(x) - 1i)*(a^2*1i - b^2*2i))/(2*a^3) - (2*exp(x))/(a*(2*exp(2*x) + exp(4*x) + 1)) + (exp(x)*( a - 2*b))/(a^2*(exp(2*x) + 1)) + (b*log(a*exp(x) + b*exp(x) + (a^2 - b^2)^ (1/2))*((a + b)*(a - b))^(1/2))/a^3 - (b*log(a*exp(x) + b*exp(x) - (a^2 - b^2)^(1/2))*((a + b)*(a - b))^(1/2))/a^3
Time = 0.25 (sec) , antiderivative size = 250, normalized size of antiderivative = 3.01 \[ \int \frac {\text {sech}^3(x)}{a+b \coth (x)} \, dx=\frac {e^{4 x} \mathit {atan} \left (e^{x}\right ) a^{2}-2 e^{4 x} \mathit {atan} \left (e^{x}\right ) b^{2}+2 e^{2 x} \mathit {atan} \left (e^{x}\right ) a^{2}-4 e^{2 x} \mathit {atan} \left (e^{x}\right ) b^{2}+\mathit {atan} \left (e^{x}\right ) a^{2}-2 \mathit {atan} \left (e^{x}\right ) b^{2}+2 e^{4 x} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {-a^{2}+b^{2}}}\right ) b +4 e^{2 x} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {-a^{2}+b^{2}}}\right ) b +2 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} a +e^{x} b}{\sqrt {-a^{2}+b^{2}}}\right ) b +e^{3 x} a^{2}-2 e^{3 x} a b -e^{x} a^{2}-2 e^{x} a b}{a^{3} \left (e^{4 x}+2 e^{2 x}+1\right )} \] Input:
int(sech(x)^3/(a+b*coth(x)),x)
Output:
(e**(4*x)*atan(e**x)*a**2 - 2*e**(4*x)*atan(e**x)*b**2 + 2*e**(2*x)*atan(e **x)*a**2 - 4*e**(2*x)*atan(e**x)*b**2 + atan(e**x)*a**2 - 2*atan(e**x)*b* *2 + 2*e**(4*x)*sqrt( - a**2 + b**2)*atan((e**x*a + e**x*b)/sqrt( - a**2 + b**2))*b + 4*e**(2*x)*sqrt( - a**2 + b**2)*atan((e**x*a + e**x*b)/sqrt( - a**2 + b**2))*b + 2*sqrt( - a**2 + b**2)*atan((e**x*a + e**x*b)/sqrt( - a **2 + b**2))*b + e**(3*x)*a**2 - 2*e**(3*x)*a*b - e**x*a**2 - 2*e**x*a*b)/ (a**3*(e**(4*x) + 2*e**(2*x) + 1))