Integrand size = 11, antiderivative size = 48 \[ \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx=\frac {\log (a+b \sinh (x))}{b^3}-\frac {a^2+b^2}{2 b^3 (a+b \sinh (x))^2}+\frac {2 a}{b^3 (a+b \sinh (x))} \]
Time = 0.10 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.88 \[ \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx=-\frac {-\log (a+b \sinh (x))+\frac {-3 a^2+b^2-4 a b \sinh (x)}{2 (a+b \sinh (x))^2}}{b^3} \]
Time = 0.31 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.94, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.636, Rules used = {3042, 4891, 3042, 3147, 25, 476, 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 {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a \sec (i x)-i b \tan (i x))^3}dx\) |
\(\Big \downarrow \) 4891 |
\(\displaystyle \int \frac {\cosh ^3(x)}{(a+b \sinh (x))^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (i x)^3}{(a-i b \sin (i x))^3}dx\) |
\(\Big \downarrow \) 3147 |
\(\displaystyle -\frac {\int -\frac {\sinh ^2(x) b^2+b^2}{(a+b \sinh (x))^3}d(b \sinh (x))}{b^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\sinh ^2(x) b^2+b^2}{(a+b \sinh (x))^3}d(b \sinh (x))}{b^3}\) |
\(\Big \downarrow \) 476 |
\(\displaystyle \frac {\int \left (-\frac {2 a}{(a+b \sinh (x))^2}+\frac {1}{a+b \sinh (x)}+\frac {a^2+b^2}{(a+b \sinh (x))^3}\right )d(b \sinh (x))}{b^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {a^2+b^2}{2 (a+b \sinh (x))^2}-\frac {2 a}{a+b \sinh (x)}-\log (a+b \sinh (x))}{b^3}\) |
3.7.21.3.1 Defintions of rubi rules used
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ ExpandIntegrand[(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[p, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.), x_Symbol] :> Simp[1/(b^p*f) Subst[Int[(a + x)^m*(b^2 - x^2)^((p - 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]
Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x _)]^(n_.))^(p_), x_Symbol] :> Int[ActivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a *Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]
Time = 11.79 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.62
method | result | size |
risch | \(-\frac {x}{b^{3}}+\frac {2 \,{\mathrm e}^{x} \left (2 b \,{\mathrm e}^{2 x} a +3 a^{2} {\mathrm e}^{x}-b^{2} {\mathrm e}^{x}-2 a b \right )}{b^{3} \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}-b \right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}-1\right )}{b^{3}}\) | \(78\) |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b^{3}}+\frac {\frac {2 \left (\frac {b \left (a^{2}-b^{2}\right ) \tanh \left (\frac {x}{2}\right )^{3}}{a}-\frac {b^{2} \left (3 a^{2}-b^{2}\right ) \tanh \left (\frac {x}{2}\right )^{2}}{a^{2}}-\frac {b \left (a^{2}-b^{2}\right ) \tanh \left (\frac {x}{2}\right )}{a}\right )}{\left (\tanh \left (\frac {x}{2}\right )^{2} a -2 b \tanh \left (\frac {x}{2}\right )-a \right )^{2}}+\ln \left (\tanh \left (\frac {x}{2}\right )^{2} a -2 b \tanh \left (\frac {x}{2}\right )-a \right )}{b^{3}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b^{3}}\) | \(141\) |
-x/b^3+2/b^3*exp(x)*(2*b*exp(2*x)*a+3*a^2*exp(x)-b^2*exp(x)-2*a*b)/(b*exp( 2*x)+2*a*exp(x)-b)^2+1/b^3*ln(exp(2*x)+2*a/b*exp(x)-1)
Leaf count of result is larger than twice the leaf count of optimal. 543 vs. \(2 (46) = 92\).
Time = 0.26 (sec) , antiderivative size = 543, normalized size of antiderivative = 11.31 \[ \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx=-\frac {b^{2} x \cosh \left (x\right )^{4} + b^{2} x \sinh \left (x\right )^{4} + 4 \, {\left (a b x - a b\right )} \cosh \left (x\right )^{3} + 4 \, {\left (b^{2} x \cosh \left (x\right ) + a b x - a b\right )} \sinh \left (x\right )^{3} + b^{2} x - 2 \, {\left (3 \, a^{2} - b^{2} - {\left (2 \, a^{2} - b^{2}\right )} x\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} x \cosh \left (x\right )^{2} - 3 \, a^{2} + b^{2} + {\left (2 \, a^{2} - b^{2}\right )} x + 6 \, {\left (a b x - a b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} - 4 \, {\left (a b x - a b\right )} \cosh \left (x\right ) - {\left (b^{2} \cosh \left (x\right )^{4} + b^{2} \sinh \left (x\right )^{4} + 4 \, a b \cosh \left (x\right )^{3} + 4 \, {\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right )^{3} - 4 \, a b \cosh \left (x\right ) + 2 \, {\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + 6 \, a b \cosh \left (x\right ) + 2 \, a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + 3 \, a b \cosh \left (x\right )^{2} - a b + {\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 4 \, {\left (b^{2} x \cosh \left (x\right )^{3} - a b x + 3 \, {\left (a b x - a b\right )} \cosh \left (x\right )^{2} + a b - {\left (3 \, a^{2} - b^{2} - {\left (2 \, a^{2} - b^{2}\right )} x\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{b^{5} \cosh \left (x\right )^{4} + b^{5} \sinh \left (x\right )^{4} + 4 \, a b^{4} \cosh \left (x\right )^{3} - 4 \, a b^{4} \cosh \left (x\right ) + b^{5} + 4 \, {\left (b^{5} \cosh \left (x\right ) + a b^{4}\right )} \sinh \left (x\right )^{3} + 2 \, {\left (2 \, a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{5} \cosh \left (x\right )^{2} + 6 \, a b^{4} \cosh \left (x\right ) + 2 \, a^{2} b^{3} - b^{5}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b^{5} \cosh \left (x\right )^{3} + 3 \, a b^{4} \cosh \left (x\right )^{2} - a b^{4} + {\left (2 \, a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )} \]
-(b^2*x*cosh(x)^4 + b^2*x*sinh(x)^4 + 4*(a*b*x - a*b)*cosh(x)^3 + 4*(b^2*x *cosh(x) + a*b*x - a*b)*sinh(x)^3 + b^2*x - 2*(3*a^2 - b^2 - (2*a^2 - b^2) *x)*cosh(x)^2 + 2*(3*b^2*x*cosh(x)^2 - 3*a^2 + b^2 + (2*a^2 - b^2)*x + 6*( a*b*x - a*b)*cosh(x))*sinh(x)^2 - 4*(a*b*x - a*b)*cosh(x) - (b^2*cosh(x)^4 + b^2*sinh(x)^4 + 4*a*b*cosh(x)^3 + 4*(b^2*cosh(x) + a*b)*sinh(x)^3 - 4*a *b*cosh(x) + 2*(2*a^2 - b^2)*cosh(x)^2 + 2*(3*b^2*cosh(x)^2 + 6*a*b*cosh(x ) + 2*a^2 - b^2)*sinh(x)^2 + b^2 + 4*(b^2*cosh(x)^3 + 3*a*b*cosh(x)^2 - a* b + (2*a^2 - b^2)*cosh(x))*sinh(x))*log(2*(b*sinh(x) + a)/(cosh(x) - sinh( x))) + 4*(b^2*x*cosh(x)^3 - a*b*x + 3*(a*b*x - a*b)*cosh(x)^2 + a*b - (3*a ^2 - b^2 - (2*a^2 - b^2)*x)*cosh(x))*sinh(x))/(b^5*cosh(x)^4 + b^5*sinh(x) ^4 + 4*a*b^4*cosh(x)^3 - 4*a*b^4*cosh(x) + b^5 + 4*(b^5*cosh(x) + a*b^4)*s inh(x)^3 + 2*(2*a^2*b^3 - b^5)*cosh(x)^2 + 2*(3*b^5*cosh(x)^2 + 6*a*b^4*co sh(x) + 2*a^2*b^3 - b^5)*sinh(x)^2 + 4*(b^5*cosh(x)^3 + 3*a*b^4*cosh(x)^2 - a*b^4 + (2*a^2*b^3 - b^5)*cosh(x))*sinh(x))
Leaf count of result is larger than twice the leaf count of optimal. 651 vs. \(2 (48) = 96\).
Time = 1.30 (sec) , antiderivative size = 651, normalized size of antiderivative = 13.56 \[ \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx=\text {Too large to display} \]
Piecewise((2*a**2*x*sech(x)**2/(2*a**2*b**3*sech(x)**2 + 4*a*b**4*tanh(x)* sech(x) + 2*b**5*tanh(x)**2) + 2*a**2*log(a*sech(x)/b + tanh(x))*sech(x)** 2/(2*a**2*b**3*sech(x)**2 + 4*a*b**4*tanh(x)*sech(x) + 2*b**5*tanh(x)**2) - 2*a**2*log(tanh(x) + 1)*sech(x)**2/(2*a**2*b**3*sech(x)**2 + 4*a*b**4*ta nh(x)*sech(x) + 2*b**5*tanh(x)**2) + a**2*sech(x)**2/(2*a**2*b**3*sech(x)* *2 + 4*a*b**4*tanh(x)*sech(x) + 2*b**5*tanh(x)**2) + 4*a*b*x*tanh(x)*sech( x)/(2*a**2*b**3*sech(x)**2 + 4*a*b**4*tanh(x)*sech(x) + 2*b**5*tanh(x)**2) + 4*a*b*log(a*sech(x)/b + tanh(x))*tanh(x)*sech(x)/(2*a**2*b**3*sech(x)** 2 + 4*a*b**4*tanh(x)*sech(x) + 2*b**5*tanh(x)**2) - 4*a*b*log(tanh(x) + 1) *tanh(x)*sech(x)/(2*a**2*b**3*sech(x)**2 + 4*a*b**4*tanh(x)*sech(x) + 2*b* *5*tanh(x)**2) + 2*b**2*x*tanh(x)**2/(2*a**2*b**3*sech(x)**2 + 4*a*b**4*ta nh(x)*sech(x) + 2*b**5*tanh(x)**2) + 2*b**2*log(a*sech(x)/b + tanh(x))*tan h(x)**2/(2*a**2*b**3*sech(x)**2 + 4*a*b**4*tanh(x)*sech(x) + 2*b**5*tanh(x )**2) - 2*b**2*log(tanh(x) + 1)*tanh(x)**2/(2*a**2*b**3*sech(x)**2 + 4*a*b **4*tanh(x)*sech(x) + 2*b**5*tanh(x)**2) - b**2*tanh(x)**2/(2*a**2*b**3*se ch(x)**2 + 4*a*b**4*tanh(x)*sech(x) + 2*b**5*tanh(x)**2) - b**2/(2*a**2*b* *3*sech(x)**2 + 4*a*b**4*tanh(x)*sech(x) + 2*b**5*tanh(x)**2), Ne(b, 0)), ((-2*tanh(x)**3/(3*sech(x)**3) + tanh(x)/sech(x)**3)/a**3, True))
Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (46) = 92\).
Time = 0.20 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.44 \[ \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx=\frac {2 \, {\left (2 \, a b e^{\left (-x\right )} - 2 \, a b e^{\left (-3 \, x\right )} + {\left (3 \, a^{2} - b^{2}\right )} e^{\left (-2 \, x\right )}\right )}}{4 \, a b^{4} e^{\left (-x\right )} - 4 \, a b^{4} e^{\left (-3 \, x\right )} + b^{5} e^{\left (-4 \, x\right )} + b^{5} + 2 \, {\left (2 \, a^{2} b^{3} - b^{5}\right )} e^{\left (-2 \, x\right )}} + \frac {x}{b^{3}} + \frac {\log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{b^{3}} \]
2*(2*a*b*e^(-x) - 2*a*b*e^(-3*x) + (3*a^2 - b^2)*e^(-2*x))/(4*a*b^4*e^(-x) - 4*a*b^4*e^(-3*x) + b^5*e^(-4*x) + b^5 + 2*(2*a^2*b^3 - b^5)*e^(-2*x)) + x/b^3 + log(-2*a*e^(-x) + b*e^(-2*x) - b)/b^3
Time = 0.26 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.56 \[ \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx=\frac {\log \left ({\left | -b {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a \right |}\right )}{b^{3}} - \frac {3 \, b {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} - 4 \, a {\left (e^{\left (-x\right )} - e^{x}\right )} + 4 \, b}{2 \, {\left (b {\left (e^{\left (-x\right )} - e^{x}\right )} - 2 \, a\right )}^{2} b^{2}} \]
log(abs(-b*(e^(-x) - e^x) + 2*a))/b^3 - 1/2*(3*b*(e^(-x) - e^x)^2 - 4*a*(e ^(-x) - e^x) + 4*b)/((b*(e^(-x) - e^x) - 2*a)^2*b^2)
Timed out. \[ \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx=\int \frac {1}{{\left (b\,\mathrm {tanh}\left (x\right )+\frac {a}{\mathrm {cosh}\left (x\right )}\right )}^3} \,d x \]