3.117 \(\int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx\)

Optimal. Leaf size=35 \[ \frac {\left (1-\frac {a^2}{b^2}\right ) \log (a+b \text {sech}(x))}{a}+\frac {\log (\cosh (x))}{a}+\frac {\text {sech}(x)}{b} \]

[Out]

ln(cosh(x))/a+(1-a^2/b^2)*ln(a+b*sech(x))/a+sech(x)/b

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3885, 894} \[ \frac {\left (1-\frac {a^2}{b^2}\right ) \log (a+b \text {sech}(x))}{a}+\frac {\log (\cosh (x))}{a}+\frac {\text {sech}(x)}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Cosh[x]]/a + ((1 - a^2/b^2)*Log[a + b*Sech[x]])/a + Sech[x]/b

Rule 894

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 3885

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> -Dist[(-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]

Rubi steps

\begin {align*} \int \frac {\tanh ^3(x)}{a+b \text {sech}(x)} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {b^2-x^2}{x (a+x)} \, dx,x,b \text {sech}(x)\right )}{b^2}\\ &=-\frac {\operatorname {Subst}\left (\int \left (-1+\frac {b^2}{a x}+\frac {a^2-b^2}{a (a+x)}\right ) \, dx,x,b \text {sech}(x)\right )}{b^2}\\ &=\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}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 37, normalized size = 1.06 \[ \frac {\left (b^2-a^2\right ) \log (a \cosh (x)+b)+a^2 \log (\cosh (x))+a b \text {sech}(x)}{a b^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a^2*Log[Cosh[x]] + (-a^2 + b^2)*Log[b + a*Cosh[x]] + a*b*Sech[x])/(a*b^2)

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 200, normalized size = 5.71 \[ -\frac {b^{2} x \cosh \relax (x)^{2} + b^{2} x \sinh \relax (x)^{2} + b^{2} x - 2 \, a b \cosh \relax (x) + {\left ({\left (a^{2} - b^{2}\right )} \cosh \relax (x)^{2} + 2 \, {\left (a^{2} - b^{2}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a^{2} - b^{2}\right )} \sinh \relax (x)^{2} + a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (a \cosh \relax (x) + b\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - {\left (a^{2} \cosh \relax (x)^{2} + 2 \, a^{2} \cosh \relax (x) \sinh \relax (x) + a^{2} \sinh \relax (x)^{2} + a^{2}\right )} \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) + 2 \, {\left (b^{2} x \cosh \relax (x) - a b\right )} \sinh \relax (x)}{a b^{2} \cosh \relax (x)^{2} + 2 \, a b^{2} \cosh \relax (x) \sinh \relax (x) + a b^{2} \sinh \relax (x)^{2} + a b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(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)*s
inh(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)

________________________________________________________________________________________

giac [B]  time = 0.12, size = 73, normalized size = 2.09 \[ \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 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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))

________________________________________________________________________________________

maple [B]  time = 0.13, size = 107, normalized size = 3.06 \[ -\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}-\frac {a \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +a +b \right )}{b^{2}}+\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +a +b \right )}{a}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}+\frac {2}{b \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}+\frac {\ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right ) a}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^3/(a+b*sech(x)),x)

[Out]

-1/a*ln(tanh(1/2*x)-1)-a/b^2*ln(a*tanh(1/2*x)^2-tanh(1/2*x)^2*b+a+b)+1/a*ln(a*tanh(1/2*x)^2-tanh(1/2*x)^2*b+a+
b)-1/a*ln(tanh(1/2*x)+1)+2/b/(tanh(1/2*x)^2+1)+1/b^2*ln(tanh(1/2*x)^2+1)*a

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 67, normalized size = 1.91 \[ \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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/a + 2*e^(-x)/(b*e^(-2*x) + b) + a*log(e^(-2*x) + 1)/b^2 - (a^2 - b^2)*log(2*b*e^(-x) + a*e^(-2*x) + a)/(a*b^
2)

________________________________________________________________________________________

mupad [B]  time = 1.60, size = 260, normalized size = 7.43 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(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*e
xp(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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tanh ^{3}{\relax (x )}}{a + b \operatorname {sech}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________