3.209 \(\int \frac{\tanh ^3(x)}{i+\sinh (x)} \, dx\)

Optimal. Leaf size=36 \[ -\frac{1}{4} i \tanh ^4(x)+\frac{3}{8} \tan ^{-1}(\sinh (x))-\frac{1}{4} \tanh ^3(x) \text{sech}(x)-\frac{3}{8} \tanh (x) \text{sech}(x) \]

[Out]

(3*ArcTan[Sinh[x]])/8 - (3*Sech[x]*Tanh[x])/8 - (Sech[x]*Tanh[x]^3)/4 - (I/4)*Tanh[x]^4

________________________________________________________________________________________

Rubi [A]  time = 0.091929, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2706, 2607, 30, 2611, 3770} \[ -\frac{1}{4} i \tanh ^4(x)+\frac{3}{8} \tan ^{-1}(\sinh (x))-\frac{1}{4} \tanh ^3(x) \text{sech}(x)-\frac{3}{8} \tanh (x) \text{sech}(x) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[x]^3/(I + Sinh[x]),x]

[Out]

(3*ArcTan[Sinh[x]])/8 - (3*Sech[x]*Tanh[x])/8 - (Sech[x]*Tanh[x]^3)/4 - (I/4)*Tanh[x]^4

Rule 2706

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

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

Mathematica [A]  time = 0.0772882, size = 42, normalized size = 1.17 \[ \frac{1}{8} \left (3 \tan ^{-1}(\sinh (x))-\frac{5 \sinh ^2(x)+i \sinh (x)+2}{(\sinh (x)-i) (\sinh (x)+i)^2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[x]^3/(I + Sinh[x]),x]

[Out]

(3*ArcTan[Sinh[x]] - (2 + I*Sinh[x] + 5*Sinh[x]^2)/((-I + Sinh[x])*(I + Sinh[x])^2))/8

________________________________________________________________________________________

Maple [B]  time = 0.059, size = 79, normalized size = 2.2 \begin{align*} -{\frac{3\,i}{8}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) +{{\frac{i}{4}} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-2}}+{\frac{1}{4} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}-{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-4}}+{\frac{3\,i}{8}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) + \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}+{\frac{1}{2} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^3/(I+sinh(x)),x)

[Out]

-3/8*I*ln(tanh(1/2*x)-I)+1/4*I/(tanh(1/2*x)-I)^2+1/4/(tanh(1/2*x)-I)-1/2*I/(tanh(1/2*x)+I)^4+3/8*I*ln(tanh(1/2
*x)+I)+1/(tanh(1/2*x)+I)^3+1/2/(tanh(1/2*x)+I)

________________________________________________________________________________________

Maxima [B]  time = 1.03303, size = 128, normalized size = 3.56 \begin{align*} \frac{5 \, e^{\left (-x\right )} + 2 i \, e^{\left (-2 \, x\right )} - 2 \, e^{\left (-3 \, x\right )} - 2 i \, e^{\left (-4 \, x\right )} + 5 \, e^{\left (-5 \, x\right )}}{-8 i \, e^{\left (-x\right )} - 4 \, e^{\left (-2 \, x\right )} - 16 i \, e^{\left (-3 \, x\right )} + 4 \, e^{\left (-4 \, x\right )} - 8 i \, e^{\left (-5 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} - 4} + \frac{3}{8} i \, \log \left (i \, e^{\left (-x\right )} + 1\right ) - \frac{3}{8} i \, \log \left (i \, e^{\left (-x\right )} - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^3/(I+sinh(x)),x, algorithm="maxima")

[Out]

(5*e^(-x) + 2*I*e^(-2*x) - 2*e^(-3*x) - 2*I*e^(-4*x) + 5*e^(-5*x))/(-8*I*e^(-x) - 4*e^(-2*x) - 16*I*e^(-3*x) +
 4*e^(-4*x) - 8*I*e^(-5*x) + 4*e^(-6*x) - 4) + 3/8*I*log(I*e^(-x) + 1) - 3/8*I*log(I*e^(-x) - 1)

________________________________________________________________________________________

Fricas [B]  time = 2.08846, size = 455, normalized size = 12.64 \begin{align*} \frac{{\left (3 i \, e^{\left (6 \, x\right )} - 6 \, e^{\left (5 \, x\right )} + 3 i \, e^{\left (4 \, x\right )} - 12 \, e^{\left (3 \, x\right )} - 3 i \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 3 i\right )} \log \left (e^{x} + i\right ) +{\left (-3 i \, e^{\left (6 \, x\right )} + 6 \, e^{\left (5 \, x\right )} - 3 i \, e^{\left (4 \, x\right )} + 12 \, e^{\left (3 \, x\right )} + 3 i \, e^{\left (2 \, x\right )} + 6 \, e^{x} + 3 i\right )} \log \left (e^{x} - i\right ) - 10 \, e^{\left (5 \, x\right )} - 4 i \, e^{\left (4 \, x\right )} + 4 \, e^{\left (3 \, x\right )} + 4 i \, e^{\left (2 \, x\right )} - 10 \, e^{x}}{8 \, e^{\left (6 \, x\right )} + 16 i \, e^{\left (5 \, x\right )} + 8 \, e^{\left (4 \, x\right )} + 32 i \, e^{\left (3 \, x\right )} - 8 \, e^{\left (2 \, x\right )} + 16 i \, e^{x} - 8} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^3/(I+sinh(x)),x, algorithm="fricas")

[Out]

((3*I*e^(6*x) - 6*e^(5*x) + 3*I*e^(4*x) - 12*e^(3*x) - 3*I*e^(2*x) - 6*e^x - 3*I)*log(e^x + I) + (-3*I*e^(6*x)
 + 6*e^(5*x) - 3*I*e^(4*x) + 12*e^(3*x) + 3*I*e^(2*x) + 6*e^x + 3*I)*log(e^x - I) - 10*e^(5*x) - 4*I*e^(4*x) +
 4*e^(3*x) + 4*I*e^(2*x) - 10*e^x)/(8*e^(6*x) + 16*I*e^(5*x) + 8*e^(4*x) + 32*I*e^(3*x) - 8*e^(2*x) + 16*I*e^x
 - 8)

________________________________________________________________________________________

Sympy [B]  time = 0.806312, size = 97, normalized size = 2.69 \begin{align*} \frac{- \frac{5 e^{5 x}}{4} - \frac{i e^{4 x}}{2} + \frac{e^{3 x}}{2} + \frac{i e^{2 x}}{2} - \frac{5 e^{x}}{4}}{e^{6 x} + 2 i e^{5 x} + e^{4 x} + 4 i e^{3 x} - e^{2 x} + 2 i e^{x} - 1} + \operatorname{RootSum}{\left (64 z^{2} + 9, \left ( i \mapsto i \log{\left (\frac{8 i}{3} + e^{x} \right )} \right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)**3/(I+sinh(x)),x)

[Out]

(-5*exp(5*x)/4 - I*exp(4*x)/2 + exp(3*x)/2 + I*exp(2*x)/2 - 5*exp(x)/4)/(exp(6*x) + 2*I*exp(5*x) + exp(4*x) +
4*I*exp(3*x) - exp(2*x) + 2*I*exp(x) - 1) + RootSum(64*_z**2 + 9, Lambda(_i, _i*log(8*_i/3 + exp(x))))

________________________________________________________________________________________

Giac [B]  time = 1.13761, size = 124, normalized size = 3.44 \begin{align*} \frac{3 i \, e^{\left (-x\right )} - 3 i \, e^{x} - 2}{16 \,{\left (e^{\left (-x\right )} - e^{x} + 2 i\right )}} - \frac{9 i \,{\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4 \, e^{\left (-x\right )} - 4 \, e^{x} + 12 i}{32 \,{\left (e^{\left (-x\right )} - e^{x} - 2 i\right )}^{2}} + \frac{3}{16} i \, \log \left (-e^{\left (-x\right )} + e^{x} + 2 i\right ) - \frac{3}{16} i \, \log \left (-e^{\left (-x\right )} + e^{x} - 2 i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^3/(I+sinh(x)),x, algorithm="giac")

[Out]

1/16*(3*I*e^(-x) - 3*I*e^x - 2)/(e^(-x) - e^x + 2*I) - 1/32*(9*I*(e^(-x) - e^x)^2 + 4*e^(-x) - 4*e^x + 12*I)/(
e^(-x) - e^x - 2*I)^2 + 3/16*I*log(-e^(-x) + e^x + 2*I) - 3/16*I*log(-e^(-x) + e^x - 2*I)