3.220 \(\int \frac{\tanh ^2(x)}{(i+\sinh (x))^2} \, dx\)

Optimal. Leaf size=37 \[ \frac{2 \tanh ^5(x)}{5}-\frac{\tanh ^3(x)}{3}-\frac{2}{5} i \text{sech}^5(x)+\frac{2}{3} i \text{sech}^3(x) \]

[Out]

((2*I)/3)*Sech[x]^3 - ((2*I)/5)*Sech[x]^5 - Tanh[x]^3/3 + (2*Tanh[x]^5)/5

________________________________________________________________________________________

Rubi [A]  time = 0.118239, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2711, 2607, 14, 2606, 30} \[ \frac{2 \tanh ^5(x)}{5}-\frac{\tanh ^3(x)}{3}-\frac{2}{5} i \text{sech}^5(x)+\frac{2}{3} i \text{sech}^3(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

((2*I)/3)*Sech[x]^3 - ((2*I)/5)*Sech[x]^5 - Tanh[x]^3/3 + (2*Tanh[x]^5)/5

Rule 2711

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

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 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2606

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

Rule 30

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

Rubi steps

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

Mathematica [B]  time = 0.0923001, size = 84, normalized size = 2.27 \[ \frac{140 \sinh (x)-44 \sinh (2 x)-4 \sinh (3 x)-55 i \cosh (x)-16 i \cosh (2 x)+11 i \cosh (3 x)+80 i}{240 \left (\cosh \left (\frac{x}{2}\right )-i \sinh \left (\frac{x}{2}\right )\right )^5 \left (\cosh \left (\frac{x}{2}\right )+i \sinh \left (\frac{x}{2}\right )\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(80*I - (55*I)*Cosh[x] - (16*I)*Cosh[2*x] + (11*I)*Cosh[3*x] + 140*Sinh[x] - 44*Sinh[2*x] - 4*Sinh[3*x])/(240*
(Cosh[x/2] - I*Sinh[x/2])^5*(Cosh[x/2] + I*Sinh[x/2]))

________________________________________________________________________________________

Maple [B]  time = 0.059, size = 70, normalized size = 1.9 \begin{align*}{\frac{1}{4} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}+{2\,i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-4}}-{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}+{\frac{4}{5} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-5}}-{\frac{5}{3} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}-{\frac{1}{4} \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)^2/(I+sinh(x))^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.08837, size = 266, normalized size = 7.19 \begin{align*} \frac{8 i \, e^{\left (-x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} - \frac{40 \, e^{\left (-2 \, x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} - \frac{40 i \, e^{\left (-3 \, x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} + \frac{30 \, e^{\left (-4 \, x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} + \frac{2}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

8*I*e^(-x)/(60*I*e^(-x) - 75*e^(-2*x) - 75*e^(-4*x) - 60*I*e^(-5*x) + 15*e^(-6*x) + 15) - 40*e^(-2*x)/(60*I*e^
(-x) - 75*e^(-2*x) - 75*e^(-4*x) - 60*I*e^(-5*x) + 15*e^(-6*x) + 15) - 40*I*e^(-3*x)/(60*I*e^(-x) - 75*e^(-2*x
) - 75*e^(-4*x) - 60*I*e^(-5*x) + 15*e^(-6*x) + 15) + 30*e^(-4*x)/(60*I*e^(-x) - 75*e^(-2*x) - 75*e^(-4*x) - 6
0*I*e^(-5*x) + 15*e^(-6*x) + 15) + 2/(60*I*e^(-x) - 75*e^(-2*x) - 75*e^(-4*x) - 60*I*e^(-5*x) + 15*e^(-6*x) +
15)

________________________________________________________________________________________

Fricas [B]  time = 2.01259, size = 171, normalized size = 4.62 \begin{align*} -\frac{30 \, e^{\left (4 \, x\right )} + 40 i \, e^{\left (3 \, x\right )} - 40 \, e^{\left (2 \, x\right )} - 8 i \, e^{x} + 2}{15 \, e^{\left (6 \, x\right )} + 60 i \, e^{\left (5 \, x\right )} - 75 \, e^{\left (4 \, x\right )} - 75 \, e^{\left (2 \, x\right )} - 60 i \, e^{x} + 15} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(30*e^(4*x) + 40*I*e^(3*x) - 40*e^(2*x) - 8*I*e^x + 2)/(15*e^(6*x) + 60*I*e^(5*x) - 75*e^(4*x) - 75*e^(2*x) -
 60*I*e^x + 15)

________________________________________________________________________________________

Sympy [B]  time = 0.823135, size = 71, normalized size = 1.92 \begin{align*} \frac{- 2 e^{4 x} - \frac{8 i e^{3 x}}{3} + \frac{8 e^{2 x}}{3} + \frac{8 i e^{x}}{15} - \frac{2}{15}}{e^{6 x} + 4 i e^{5 x} - 5 e^{4 x} - 5 e^{2 x} - 4 i e^{x} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-2*exp(4*x) - 8*I*exp(3*x)/3 + 8*exp(2*x)/3 + 8*I*exp(x)/15 - 2/15)/(exp(6*x) + 4*I*exp(5*x) - 5*exp(4*x) - 5
*exp(2*x) - 4*I*exp(x) + 1)

________________________________________________________________________________________

Giac [A]  time = 1.13342, size = 55, normalized size = 1.49 \begin{align*} \frac{i}{4 \,{\left (e^{x} - i\right )}} - \frac{15 i \, e^{\left (4 \, x\right )} + 30 \, e^{\left (3 \, x\right )} + 40 i \, e^{\left (2 \, x\right )} - 50 \, e^{x} - 7 i}{60 \,{\left (e^{x} + i\right )}^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*I/(e^x - I) - 1/60*(15*I*e^(4*x) + 30*e^(3*x) + 40*I*e^(2*x) - 50*e^x - 7*I)/(e^x + I)^5