3.229 \(\int \frac{\tanh ^3(x)}{a+b \sinh (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.175015, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {2721, 1647, 801, 635, 203, 260} \[ -\frac{a^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}+\frac{b \left (3 a^2+b^2\right ) \tan ^{-1}(\sinh (x))}{2 \left (a^2+b^2\right )^2}+\frac{a^3 \log (\cosh (x))}{\left (a^2+b^2\right )^2}+\frac{\text{sech}^2(x) (a-b \sinh (x))}{2 \left (a^2+b^2\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2721

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]

Rule 1647

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[(d +
 e*x)^m*Pq, a + c*x^2, x], f = Coeff[PolynomialRemainder[(d + e*x)^m*Pq, a + c*x^2, x], x, 0], g = Coeff[Polyn
omialRemainder[(d + e*x)^m*Pq, a + c*x^2, x], x, 1]}, Simp[((a*g - c*f*x)*(a + c*x^2)^(p + 1))/(2*a*c*(p + 1))
, x] + Dist[1/(2*a*c*(p + 1)), Int[(d + e*x)^m*(a + c*x^2)^(p + 1)*ExpandToSum[(2*a*c*(p + 1)*Q)/(d + e*x)^m +
 (c*f*(2*p + 3))/(d + e*x)^m, x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] &
& LtQ[p, -1] && ILtQ[m, 0]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{\tanh ^3(x)}{a+b \sinh (x)} \, dx &=\operatorname{Subst}\left (\int \frac{x^3}{(a+x) \left (-b^2-x^2\right )^2} \, dx,x,b \sinh (x)\right )\\ &=\frac{\text{sech}^2(x) (a-b \sinh (x))}{2 \left (a^2+b^2\right )}-\frac{\operatorname{Subst}\left (\int \frac{\frac{a b^4}{a^2+b^2}+\frac{b^2 \left (2 a^2+b^2\right ) x}{a^2+b^2}}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (x)\right )}{2 b^2}\\ &=\frac{\text{sech}^2(x) (a-b \sinh (x))}{2 \left (a^2+b^2\right )}-\frac{\operatorname{Subst}\left (\int \left (\frac{2 a^3 b^2}{\left (a^2+b^2\right )^2 (a+x)}-\frac{b^2 \left (3 a^2 b^2+b^4+2 a^3 x\right )}{\left (a^2+b^2\right )^2 \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (x)\right )}{2 b^2}\\ &=-\frac{a^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}+\frac{\text{sech}^2(x) (a-b \sinh (x))}{2 \left (a^2+b^2\right )}+\frac{\operatorname{Subst}\left (\int \frac{3 a^2 b^2+b^4+2 a^3 x}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{2 \left (a^2+b^2\right )^2}\\ &=-\frac{a^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}+\frac{\text{sech}^2(x) (a-b \sinh (x))}{2 \left (a^2+b^2\right )}+\frac{a^3 \operatorname{Subst}\left (\int \frac{x}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{\left (a^2+b^2\right )^2}+\frac{\left (b^2 \left (3 a^2+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{b^2+x^2} \, dx,x,b \sinh (x)\right )}{2 \left (a^2+b^2\right )^2}\\ &=\frac{b \left (3 a^2+b^2\right ) \tan ^{-1}(\sinh (x))}{2 \left (a^2+b^2\right )^2}+\frac{a^3 \log (\cosh (x))}{\left (a^2+b^2\right )^2}-\frac{a^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}+\frac{\text{sech}^2(x) (a-b \sinh (x))}{2 \left (a^2+b^2\right )}\\ \end{align*}

Mathematica [C]  time = 0.175322, size = 153, normalized size = 1.74 \[ \frac{a \text{sech}^2(x)}{2 \left (a^2+b^2\right )}-\frac{a^3 \log (a+b \sinh (x))}{\left (a^2+b^2\right )^2}+\frac{\left (a^3-i \left (2 a^2 b+b^3\right )\right ) \log (-\sinh (x)+i)}{2 \left (a^2+b^2\right )^2}+\frac{\left (a^3+i \left (2 a^2 b+b^3\right )\right ) \log (\sinh (x)+i)}{2 \left (a^2+b^2\right )^2}-\frac{b \tan ^{-1}(\sinh (x))}{2 \left (a^2+b^2\right )}-\frac{b \tanh (x) \text{sech}(x)}{2 \left (a^2+b^2\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(b*ArcTan[Sinh[x]])/(2*(a^2 + b^2)) + ((a^3 - I*(2*a^2*b + b^3))*Log[I - Sinh[x]])/(2*(a^2 + b^2)^2) + ((a^3
+ I*(2*a^2*b + b^3))*Log[I + Sinh[x]])/(2*(a^2 + b^2)^2) - (a^3*Log[a + b*Sinh[x]])/(a^2 + b^2)^2 + (a*Sech[x]
^2)/(2*(a^2 + b^2)) - (b*Sech[x]*Tanh[x])/(2*(a^2 + b^2))

________________________________________________________________________________________

Maple [B]  time = 0.036, size = 357, normalized size = 4.1 \begin{align*}{\frac{{a}^{2}b}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{3} \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-2}}+{\frac{{b}^{3}}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{3} \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-2}}-2\,{\frac{ \left ( \tanh \left ( x/2 \right ) \right ) ^{2}{a}^{3}}{ \left ({a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4} \right ) \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{2}}}-2\,{\frac{a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}{b}^{2}}{ \left ({a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4} \right ) \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{2}}}-{\frac{{a}^{2}b}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}}\tanh \left ({\frac{x}{2}} \right ) \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-2}}-{\frac{{b}^{3}}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}}\tanh \left ({\frac{x}{2}} \right ) \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-2}}+{\frac{{a}^{3}}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}}\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) }+3\,{\frac{\arctan \left ( \tanh \left ( x/2 \right ) \right ){a}^{2}b}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}}}+{\frac{{b}^{3}}{{a}^{4}+2\,{a}^{2}{b}^{2}+{b}^{4}}\arctan \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }-8\,{\frac{{a}^{3}\ln \left ( a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-2\,\tanh \left ( x/2 \right ) b-a \right ) }{8\,{a}^{4}+16\,{a}^{2}{b}^{2}+8\,{b}^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/(a^4+2*a^2*b^2+b^4)/(tanh(1/2*x)^2+1)^2*tanh(1/2*x)^3*a^2*b+1/(a^4+2*a^2*b^2+b^4)/(tanh(1/2*x)^2+1)^2*tanh(1
/2*x)^3*b^3-2/(a^4+2*a^2*b^2+b^4)/(tanh(1/2*x)^2+1)^2*tanh(1/2*x)^2*a^3-2/(a^4+2*a^2*b^2+b^4)/(tanh(1/2*x)^2+1
)^2*tanh(1/2*x)^2*a*b^2-1/(a^4+2*a^2*b^2+b^4)/(tanh(1/2*x)^2+1)^2*tanh(1/2*x)*a^2*b-1/(a^4+2*a^2*b^2+b^4)/(tan
h(1/2*x)^2+1)^2*tanh(1/2*x)*b^3+1/(a^4+2*a^2*b^2+b^4)*a^3*ln(tanh(1/2*x)^2+1)+3/(a^4+2*a^2*b^2+b^4)*arctan(tan
h(1/2*x))*a^2*b+1/(a^4+2*a^2*b^2+b^4)*arctan(tanh(1/2*x))*b^3-8*a^3/(8*a^4+16*a^2*b^2+8*b^4)*ln(a*tanh(1/2*x)^
2-2*tanh(1/2*x)*b-a)

________________________________________________________________________________________

Maxima [A]  time = 1.57276, size = 216, normalized size = 2.45 \begin{align*} -\frac{a^{3} \log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac{a^{3} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac{{\left (3 \, a^{2} b + b^{3}\right )} \arctan \left (e^{\left (-x\right )}\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac{b e^{\left (-x\right )} - 2 \, a e^{\left (-2 \, x\right )} - b e^{\left (-3 \, x\right )}}{a^{2} + b^{2} + 2 \,{\left (a^{2} + b^{2}\right )} e^{\left (-2 \, x\right )} +{\left (a^{2} + b^{2}\right )} e^{\left (-4 \, x\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.26805, size = 1725, normalized size = 19.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-((a^2*b + b^3)*cosh(x)^3 + (a^2*b + b^3)*sinh(x)^3 - 2*(a^3 + a*b^2)*cosh(x)^2 - (2*a^3 + 2*a*b^2 - 3*(a^2*b
+ b^3)*cosh(x))*sinh(x)^2 - ((3*a^2*b + b^3)*cosh(x)^4 + 4*(3*a^2*b + b^3)*cosh(x)*sinh(x)^3 + (3*a^2*b + b^3)
*sinh(x)^4 + 3*a^2*b + b^3 + 2*(3*a^2*b + b^3)*cosh(x)^2 + 2*(3*a^2*b + b^3 + 3*(3*a^2*b + b^3)*cosh(x)^2)*sin
h(x)^2 + 4*((3*a^2*b + b^3)*cosh(x)^3 + (3*a^2*b + b^3)*cosh(x))*sinh(x))*arctan(cosh(x) + sinh(x)) - (a^2*b +
 b^3)*cosh(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*co
sh(x)^2 + a^3)*sinh(x)^2 + 4*(a^3*cosh(x)^3 + a^3*cosh(x))*sinh(x))*log(2*(b*sinh(x) + a)/(cosh(x) - 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))*log(2*cosh(x)/(cosh(x) - sinh(x))) - (a^2*b + b^3 - 3*(
a^2*b + b^3)*cosh(x)^2 + 4*(a^3 + a*b^2)*cosh(x))*sinh(x))/((a^4 + 2*a^2*b^2 + b^4)*cosh(x)^4 + 4*(a^4 + 2*a^2
*b^2 + b^4)*cosh(x)*sinh(x)^3 + (a^4 + 2*a^2*b^2 + b^4)*sinh(x)^4 + a^4 + 2*a^2*b^2 + b^4 + 2*(a^4 + 2*a^2*b^2
 + b^4)*cosh(x)^2 + 2*(a^4 + 2*a^2*b^2 + b^4 + 3*(a^4 + 2*a^2*b^2 + b^4)*cosh(x)^2)*sinh(x)^2 + 4*((a^4 + 2*a^
2*b^2 + b^4)*cosh(x)^3 + (a^4 + 2*a^2*b^2 + b^4)*cosh(x))*sinh(x))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tanh ^{3}{\left (x \right )}}{a + b \sinh{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.1375, size = 285, normalized size = 3.24 \begin{align*} -\frac{a^{3} b \log \left ({\left | -b{\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a \right |}\right )}{a^{4} b + 2 \, a^{2} b^{3} + b^{5}} + \frac{a^{3} \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}{2 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}} + \frac{{\left (\pi + 2 \, \arctan \left (\frac{1}{2} \,{\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )}{\left (3 \, a^{2} b + b^{3}\right )}}{4 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}} - \frac{a^{3}{\left (e^{\left (-x\right )} - e^{x}\right )}^{2} - 2 \, a^{2} b{\left (e^{\left (-x\right )} - e^{x}\right )} - 2 \, b^{3}{\left (e^{\left (-x\right )} - e^{x}\right )} - 4 \, a b^{2}}{2 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}{\left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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