\(\int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx\) [180]

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

Optimal result

Integrand size = 13, antiderivative size = 57 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {\left (a^2-b^2\right ) \log (\cosh (x))}{a^3}-\frac {\left (a^2-b^2\right ) \log (a+b \cosh (x))}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}^2(x)}{2 a} \]

[Out]

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

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2800, 908} \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=-\frac {b \text {sech}(x)}{a^2}+\frac {\left (a^2-b^2\right ) \log (\cosh (x))}{a^3}-\frac {\left (a^2-b^2\right ) \log (a+b \cosh (x))}{a^3}+\frac {\text {sech}^2(x)}{2 a} \]

[In]

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

[Out]

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

Rule 908

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 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(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] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {b^2-x^2}{x^3 (a+x)} \, dx,x,b \cosh (x)\right ) \\ & = -\text {Subst}\left (\int \left (\frac {b^2}{a x^3}-\frac {b^2}{a^2 x^2}+\frac {-a^2+b^2}{a^3 x}+\frac {a^2-b^2}{a^3 (a+x)}\right ) \, dx,x,b \cosh (x)\right ) \\ & = \frac {\left (a^2-b^2\right ) \log (\cosh (x))}{a^3}-\frac {\left (a^2-b^2\right ) \log (a+b \cosh (x))}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}^2(x)}{2 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.81 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {2 \left (a^2-b^2\right ) (\log (\cosh (x))-\log (a+b \cosh (x)))-2 a b \text {sech}(x)+a^2 \text {sech}^2(x)}{2 a^3} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.34 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.67

method result size
default \(\frac {\frac {2 a^{2}}{\left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )^{2}}+\left (a^{2}-b^{2}\right ) \ln \left (1+\tanh \left (\frac {x}{2}\right )^{2}\right )-\frac {2 a \left (a +b \right )}{1+\tanh \left (\frac {x}{2}\right )^{2}}}{a^{3}}-\frac {\left (a -b \right ) \left (a +b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )^{2} a -\tanh \left (\frac {x}{2}\right )^{2} b -a -b \right )}{a^{3}}\) \(95\)
risch \(\frac {2 \,{\mathrm e}^{x} \left (-b \,{\mathrm e}^{2 x}+a \,{\mathrm e}^{x}-b \right )}{\left (1+{\mathrm e}^{2 x}\right )^{2} a^{2}}+\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{a}-\frac {\ln \left (1+{\mathrm e}^{2 x}\right ) b^{2}}{a^{3}}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}+1\right )}{a}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}+1\right ) b^{2}}{a^{3}}\) \(100\)

[In]

int(tanh(x)^3/(a+b*cosh(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 450 vs. \(2 (55) = 110\).

Time = 0.27 (sec) , antiderivative size = 450, normalized size of antiderivative = 7.89 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=-\frac {2 \, a b \cosh \left (x\right )^{3} + 2 \, a b \sinh \left (x\right )^{3} - 2 \, a^{2} \cosh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + 2 \, {\left (3 \, a b \cosh \left (x\right ) - a^{2}\right )} \sinh \left (x\right )^{2} + {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \sinh \left (x\right )^{4} + 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - b^{2} + 4 \, {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \sinh \left (x\right )^{4} + 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - b^{2} + 4 \, {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, {\left (3 \, a b \cosh \left (x\right )^{2} - 2 \, a^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right )}{a^{3} \cosh \left (x\right )^{4} + 4 \, a^{3} \cosh \left (x\right ) \sinh \left (x\right )^{3} + a^{3} \sinh \left (x\right )^{4} + 2 \, a^{3} \cosh \left (x\right )^{2} + a^{3} + 2 \, {\left (3 \, a^{3} \cosh \left (x\right )^{2} + a^{3}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (a^{3} \cosh \left (x\right )^{3} + a^{3} \cosh \left (x\right )\right )} \sinh \left (x\right )} \]

[In]

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

[Out]

-(2*a*b*cosh(x)^3 + 2*a*b*sinh(x)^3 - 2*a^2*cosh(x)^2 + 2*a*b*cosh(x) + 2*(3*a*b*cosh(x) - a^2)*sinh(x)^2 + ((
a^2 - b^2)*cosh(x)^4 + 4*(a^2 - b^2)*cosh(x)*sinh(x)^3 + (a^2 - b^2)*sinh(x)^4 + 2*(a^2 - b^2)*cosh(x)^2 + 2*(
3*(a^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^2 + a^2 - b^2 + 4*((a^2 - b^2)*cosh(x)^3 + (a^2 - b^2)*cosh(x))*s
inh(x))*log(2*(b*cosh(x) + a)/(cosh(x) - sinh(x))) - ((a^2 - b^2)*cosh(x)^4 + 4*(a^2 - b^2)*cosh(x)*sinh(x)^3
+ (a^2 - b^2)*sinh(x)^4 + 2*(a^2 - b^2)*cosh(x)^2 + 2*(3*(a^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^2 + a^2 -
b^2 + 4*((a^2 - b^2)*cosh(x)^3 + (a^2 - b^2)*cosh(x))*sinh(x))*log(2*cosh(x)/(cosh(x) - sinh(x))) + 2*(3*a*b*c
osh(x)^2 - 2*a^2*cosh(x) + 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))

Sympy [F]

\[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\int \frac {\tanh ^{3}{\left (x \right )}}{a + b \cosh {\left (x \right )}}\, dx \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.68 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=-\frac {2 \, {\left (b e^{\left (-x\right )} - a e^{\left (-2 \, x\right )} + b e^{\left (-3 \, x\right )}\right )}}{2 \, a^{2} e^{\left (-2 \, x\right )} + a^{2} e^{\left (-4 \, x\right )} + a^{2}} - \frac {{\left (a^{2} - b^{2}\right )} \log \left (2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} + b\right )}{a^{3}} + \frac {{\left (a^{2} - b^{2}\right )} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{3}} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (55) = 110\).

Time = 0.27 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.02 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {{\left (a^{2} - b^{2}\right )} \log \left (e^{\left (-x\right )} + e^{x}\right )}{a^{3}} - \frac {{\left (a^{2} b - b^{3}\right )} \log \left ({\left | b {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, a \right |}\right )}{a^{3} b} - \frac {3 \, a^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 3 \, b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 4 \, a b {\left (e^{\left (-x\right )} + e^{x}\right )} - 4 \, a^{2}}{2 \, a^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 2.42 (sec) , antiderivative size = 1221, normalized size of antiderivative = 21.42 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {\frac {2}{a}-\frac {2\,b\,{\mathrm {e}}^x}{a^2}}{{\mathrm {e}}^{2\,x}+1}-\frac {2}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {\left (2\,\mathrm {atan}\left (\left (4\,a^4\,b^3\,{\left (a^2-b^2\right )}^2\,\sqrt {-a^6}-4\,a^6\,b\,{\left (a^2-b^2\right )}^2\,\sqrt {-a^6}\right )\,\left ({\mathrm {e}}^x\,\left (\frac {1}{16\,a^4\,b^2\,{\left (a^2-b^2\right )}^3\,\sqrt {{\left (a^2-b^2\right )}^2}}-\frac {{\left (a^2-2\,b^2\right )}^2}{16\,a^8\,b^2\,{\left (a^2-b^2\right )}^3\,\sqrt {{\left (a^2-b^2\right )}^2}}\right )+\frac {1}{8\,a^5\,b\,{\left (a^2-b^2\right )}^3\,\sqrt {{\left (a^2-b^2\right )}^2}}+\frac {a^2-2\,b^2}{8\,a^7\,b\,{\left (a^2-b^2\right )}^3\,\sqrt {{\left (a^2-b^2\right )}^2}}\right )\right )+2\,\mathrm {atan}\left (\frac {a^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}-2\,b^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{2\,a^3\,{\left (a^2-b^2\right )}^2}+\frac {\left (a^7-a^5\,b^2\right )\,\sqrt {-a^6}}{2\,a^6\,\left (a^2-b^2\right )\,\sqrt {{\left (a^2-b^2\right )}^2}}+\frac {a^6\,b^2\,{\mathrm {e}}^{3\,x}\,\left (\frac {2\,\left (a^7-a^5\,b^2\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^{11}\,b^3\,\left (a^2-b^2\right )\,\sqrt {{\left (a^2-b^2\right )}^2}}-\frac {2\,\left (a^2-2\,b^2\right )\,\left (a^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}-2\,b^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^{10}\,b^3\,{\left (a^2-b^2\right )}^2\,\sqrt {-a^6}}\right )\,\sqrt {-a^6}}{8\,\sqrt {a^4-2\,a^2\,b^2+b^4}}-\frac {a^6\,b^2\,{\mathrm {e}}^x\,\sqrt {-a^6}\,\left (\frac {8\,\left (a^4-2\,a^2\,b^2+b^4\right )}{a^8\,b\,{\left (a^2-b^2\right )}^2}-\frac {4\,\left (2\,a^6\,b-2\,a^4\,b^3\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^{12}\,b^2\,\left (a^2-b^2\right )\,\sqrt {{\left (a^2-b^2\right )}^2}}-\frac {2\,\left (a^7-a^5\,b^2\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^{11}\,b^3\,\left (a^2-b^2\right )\,\sqrt {{\left (a^2-b^2\right )}^2}}+\frac {2\,\left (a^2-2\,b^2\right )\,\left (a^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}-2\,b^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^{10}\,b^3\,{\left (a^2-b^2\right )}^2\,\sqrt {-a^6}}\right )}{8\,\sqrt {a^4-2\,a^2\,b^2+b^4}}+\frac {a^6\,b^2\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^6}\,\left (\frac {4\,\left (a^2-2\,b^2\right )\,\left (a^4-2\,a^2\,b^2+b^4\right )}{a^9\,b^2\,{\left (a^2-b^2\right )}^2}+\frac {4\,\left (a^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}-2\,b^2\,\sqrt {-a^6}\,\sqrt {a^4-2\,a^2\,b^2+b^4}\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^9\,b^2\,{\left (a^2-b^2\right )}^2\,\sqrt {-a^6}}+\frac {2\,\left (2\,a^6\,b-2\,a^4\,b^3\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^{11}\,b^3\,\left (a^2-b^2\right )\,\sqrt {{\left (a^2-b^2\right )}^2}}+\frac {4\,\left (a^7-a^5\,b^2\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{a^{12}\,b^2\,\left (a^2-b^2\right )\,\sqrt {{\left (a^2-b^2\right )}^2}}\right )}{8\,\sqrt {a^4-2\,a^2\,b^2+b^4}}\right )\right )\,\sqrt {a^4-2\,a^2\,b^2+b^4}}{\sqrt {-a^6}} \]

[In]

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

[Out]

(2/a - (2*b*exp(x))/a^2)/(exp(2*x) + 1) - 2/(a*(2*exp(2*x) + exp(4*x) + 1)) + ((2*atan((4*a^4*b^3*(a^2 - b^2)^
2*(-a^6)^(1/2) - 4*a^6*b*(a^2 - b^2)^2*(-a^6)^(1/2))*(exp(x)*(1/(16*a^4*b^2*(a^2 - b^2)^3*((a^2 - b^2)^2)^(1/2
)) - (a^2 - 2*b^2)^2/(16*a^8*b^2*(a^2 - b^2)^3*((a^2 - b^2)^2)^(1/2))) + 1/(8*a^5*b*(a^2 - b^2)^3*((a^2 - b^2)
^2)^(1/2)) + (a^2 - 2*b^2)/(8*a^7*b*(a^2 - b^2)^3*((a^2 - b^2)^2)^(1/2)))) + 2*atan((a^2*(-a^6)^(1/2)*(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