Integrand size = 13, antiderivative size = 35 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {\log (\cosh (x))}{a}+\frac {\left (1-\frac {a^2}{b^2}\right ) \log (a+b \text {sech}(x))}{a}+\frac {\text {sech}(x)}{b} \] Output:
ln(cosh(x))/a+(1-a^2/b^2)*ln(a+b*sech(x))/a+sech(x)/b
Time = 0.08 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.09 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {\log (\cosh (x))}{a}+\frac {\log (a+b \text {sech}(x))}{a}-\frac {a \log (a+b \text {sech}(x))}{b^2}+\frac {\text {sech}(x)}{b} \] Input:
Integrate[Tanh[x]^3/(a + b*Sech[x]),x]
Output:
Log[Cosh[x]]/a + Log[a + b*Sech[x]]/a - (a*Log[a + b*Sech[x]])/b^2 + Sech[ x]/b
Time = 0.46 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.23, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3042, 26, 4373, 522, 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 {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i \cot \left (\frac {\pi }{2}+i x\right )^3}{a+b \csc \left (\frac {\pi }{2}+i x\right )}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {\cot \left (i x+\frac {\pi }{2}\right )^3}{a+b \csc \left (i x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4373 |
\(\displaystyle -\frac {\int \frac {\cosh (x) \left (b^2-b^2 \text {sech}^2(x)\right )}{b (a+b \text {sech}(x))}d(b \text {sech}(x))}{b^2}\) |
\(\Big \downarrow \) 522 |
\(\displaystyle -\frac {\int \left (\frac {a^2-b^2}{a (a+b \text {sech}(x))}+\frac {b \cosh (x)}{a}-1\right )d(b \text {sech}(x))}{b^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {\left (a^2-b^2\right ) \log (a+b \text {sech}(x))}{a}+\frac {b^2 \log (b \text {sech}(x))}{a}-b \text {sech}(x)}{b^2}\) |
Input:
Int[Tanh[x]^3/(a + b*Sech[x]),x]
Output:
-(((b^2*Log[b*Sech[x]])/a + ((a^2 - b^2)*Log[a + b*Sech[x]])/a - b*Sech[x] )/b^2)
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[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1)) Subst[Int[(b^2 - x^ 2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(74\) vs. \(2(35)=70\).
Time = 0.38 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.14
method | result | size |
risch | \(-\frac {x}{a}+\frac {2 \,{\mathrm e}^{x}}{b \left ({\mathrm e}^{2 x}+1\right )}+\frac {a \ln \left ({\mathrm e}^{2 x}+1\right )}{b^{2}}-\frac {a \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{b^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{a}\) | \(75\) |
default | \(\frac {a \ln \left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )+\frac {2 b}{\tanh \left (\frac {x}{2}\right )^{2}+1}}{b^{2}}-\frac {\left (a -b \right ) \left (a +b \right ) \ln \left (a \tanh \left (\frac {x}{2}\right )^{2}-b \tanh \left (\frac {x}{2}\right )^{2}+a +b \right )}{a \,b^{2}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}\) | \(92\) |
Input:
int(tanh(x)^3/(a+b*sech(x)),x,method=_RETURNVERBOSE)
Output:
-x/a+2/b*exp(x)/(exp(2*x)+1)+a/b^2*ln(exp(2*x)+1)-a/b^2*ln(exp(2*x)+2*b/a* exp(x)+1)+1/a*ln(exp(2*x)+2*b/a*exp(x)+1)
Leaf count of result is larger than twice the leaf count of optimal. 200 vs. \(2 (35) = 70\).
Time = 0.11 (sec) , antiderivative size = 200, normalized size of antiderivative = 5.71 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=-\frac {b^{2} x \cosh \left (x\right )^{2} + b^{2} x \sinh \left (x\right )^{2} + b^{2} x - 2 \, a b \cosh \left (x\right ) + {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left (a^{2} \cosh \left (x\right )^{2} + 2 \, a^{2} \cosh \left (x\right ) \sinh \left (x\right ) + a^{2} \sinh \left (x\right )^{2} + a^{2}\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, {\left (b^{2} x \cosh \left (x\right ) - a b\right )} \sinh \left (x\right )}{a b^{2} \cosh \left (x\right )^{2} + 2 \, a b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + a b^{2} \sinh \left (x\right )^{2} + a b^{2}} \] Input:
integrate(tanh(x)^3/(a+b*sech(x)),x, algorithm="fricas")
Output:
-(b^2*x*cosh(x)^2 + b^2*x*sinh(x)^2 + b^2*x - 2*a*b*cosh(x) + ((a^2 - b^2) *cosh(x)^2 + 2*(a^2 - b^2)*cosh(x)*sinh(x) + (a^2 - b^2)*sinh(x)^2 + a^2 - b^2)*log(2*(a*cosh(x) + b)/(cosh(x) - sinh(x))) - (a^2*cosh(x)^2 + 2*a^2* cosh(x)*sinh(x) + a^2*sinh(x)^2 + a^2)*log(2*cosh(x)/(cosh(x) - sinh(x))) + 2*(b^2*x*cosh(x) - a*b)*sinh(x))/(a*b^2*cosh(x)^2 + 2*a*b^2*cosh(x)*sinh (x) + a*b^2*sinh(x)^2 + a*b^2)
\[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\int \frac {\tanh ^{3}{\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \] Input:
integrate(tanh(x)**3/(a+b*sech(x)),x)
Output:
Integral(tanh(x)**3/(a + b*sech(x)), x)
Time = 0.15 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.91 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {x}{a} + \frac {2 \, e^{\left (-x\right )}}{b e^{\left (-2 \, x\right )} + b} + \frac {a \log \left (e^{\left (-2 \, x\right )} + 1\right )}{b^{2}} - \frac {{\left (a^{2} - b^{2}\right )} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a b^{2}} \] Input:
integrate(tanh(x)^3/(a+b*sech(x)),x, algorithm="maxima")
Output:
x/a + 2*e^(-x)/(b*e^(-2*x) + b) + a*log(e^(-2*x) + 1)/b^2 - (a^2 - b^2)*lo g(2*b*e^(-x) + a*e^(-2*x) + a)/(a*b^2)
Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (35) = 70\).
Time = 0.11 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.09 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {a \log \left (e^{\left (-x\right )} + e^{x}\right )}{b^{2}} - \frac {{\left (a^{2} - b^{2}\right )} \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a b^{2}} - \frac {a {\left (e^{\left (-x\right )} + e^{x}\right )} - 2 \, b}{b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}} \] Input:
integrate(tanh(x)^3/(a+b*sech(x)),x, algorithm="giac")
Output:
a*log(e^(-x) + e^x)/b^2 - (a^2 - b^2)*log(abs(a*(e^(-x) + e^x) + 2*b))/(a* b^2) - (a*(e^(-x) + e^x) - 2*b)/(b^2*(e^(-x) + e^x))
Time = 2.47 (sec) , antiderivative size = 260, normalized size of antiderivative = 7.43 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {2\,{\mathrm {e}}^x}{b+b\,{\mathrm {e}}^{2\,x}}-\frac {x}{a}+\frac {\ln \left (16\,a^5\,{\mathrm {e}}^{2\,x}+4\,a\,b^4+16\,a^5-16\,a^3\,b^2+8\,b^5\,{\mathrm {e}}^x-16\,a^3\,b^2\,{\mathrm {e}}^{2\,x}+32\,a^4\,b\,{\mathrm {e}}^x+4\,a\,b^4\,{\mathrm {e}}^{2\,x}-32\,a^2\,b^3\,{\mathrm {e}}^x\right )}{a}-\frac {a\,\ln \left (16\,a^5\,{\mathrm {e}}^{2\,x}+4\,a\,b^4+16\,a^5-16\,a^3\,b^2+8\,b^5\,{\mathrm {e}}^x-16\,a^3\,b^2\,{\mathrm {e}}^{2\,x}+32\,a^4\,b\,{\mathrm {e}}^x+4\,a\,b^4\,{\mathrm {e}}^{2\,x}-32\,a^2\,b^3\,{\mathrm {e}}^x\right )}{b^2}+\frac {a\,\ln \left (16\,a^6\,{\mathrm {e}}^{2\,x}-4\,b^6\,{\mathrm {e}}^{2\,x}+16\,a^6-4\,b^6+20\,a^2\,b^4-32\,a^4\,b^2+20\,a^2\,b^4\,{\mathrm {e}}^{2\,x}-32\,a^4\,b^2\,{\mathrm {e}}^{2\,x}\right )}{b^2} \] Input:
int(tanh(x)^3/(a + b/cosh(x)),x)
Output:
(2*exp(x))/(b + b*exp(2*x)) - x/a + log(16*a^5*exp(2*x) + 4*a*b^4 + 16*a^5 - 16*a^3*b^2 + 8*b^5*exp(x) - 16*a^3*b^2*exp(2*x) + 32*a^4*b*exp(x) + 4*a *b^4*exp(2*x) - 32*a^2*b^3*exp(x))/a - (a*log(16*a^5*exp(2*x) + 4*a*b^4 + 16*a^5 - 16*a^3*b^2 + 8*b^5*exp(x) - 16*a^3*b^2*exp(2*x) + 32*a^4*b*exp(x) + 4*a*b^4*exp(2*x) - 32*a^2*b^3*exp(x)))/b^2 + (a*log(16*a^6*exp(2*x) - 4 *b^6*exp(2*x) + 16*a^6 - 4*b^6 + 20*a^2*b^4 - 32*a^4*b^2 + 20*a^2*b^4*exp( 2*x) - 32*a^4*b^2*exp(2*x)))/b^2
Time = 0.21 (sec) , antiderivative size = 162, normalized size of antiderivative = 4.63 \[ \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx=\frac {e^{2 x} \mathrm {log}\left (e^{2 x}+1\right ) a^{2}-e^{2 x} \mathrm {log}\left (e^{2 x} a +2 e^{x} b +a \right ) a^{2}+e^{2 x} \mathrm {log}\left (e^{2 x} a +2 e^{x} b +a \right ) b^{2}-e^{2 x} b^{2} x +2 e^{x} a b +\mathrm {log}\left (e^{2 x}+1\right ) a^{2}-\mathrm {log}\left (e^{2 x} a +2 e^{x} b +a \right ) a^{2}+\mathrm {log}\left (e^{2 x} a +2 e^{x} b +a \right ) b^{2}-b^{2} x}{a \,b^{2} \left (e^{2 x}+1\right )} \] Input:
int(tanh(x)^3/(a+b*sech(x)),x)
Output:
(e**(2*x)*log(e**(2*x) + 1)*a**2 - e**(2*x)*log(e**(2*x)*a + 2*e**x*b + a) *a**2 + e**(2*x)*log(e**(2*x)*a + 2*e**x*b + a)*b**2 - e**(2*x)*b**2*x + 2 *e**x*a*b + log(e**(2*x) + 1)*a**2 - log(e**(2*x)*a + 2*e**x*b + a)*a**2 + log(e**(2*x)*a + 2*e**x*b + a)*b**2 - b**2*x)/(a*b**2*(e**(2*x) + 1))