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

Optimal. Leaf size=32 \[ x-\frac{5 \cosh (x)}{3 (\sinh (x)+i)}+\frac{i \cosh (x)}{3 (\sinh (x)+i)^2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0609489, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {2758, 2735, 2648} \[ x-\frac{5 \cosh (x)}{3 (\sinh (x)+i)}+\frac{i \cosh (x)}{3 (\sinh (x)+i)^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2758

Int[sin[(e_.) + (f_.)*(x_)]^2*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(b*Cos[e + f*x]*(
a + b*Sin[e + f*x])^m)/(a*f*(2*m + 1)), x] - Dist[1/(a^2*(2*m + 1)), Int[(a + b*Sin[e + f*x])^(m + 1)*(a*m - b
*(2*m + 1)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin{align*} \int \frac{\sinh ^2(x)}{(i+\sinh (x))^2} \, dx &=\frac{i \cosh (x)}{3 (i+\sinh (x))^2}+\frac{1}{3} \int \frac{-2 i+3 \sinh (x)}{i+\sinh (x)} \, dx\\ &=x+\frac{i \cosh (x)}{3 (i+\sinh (x))^2}-\frac{5}{3} i \int \frac{1}{i+\sinh (x)} \, dx\\ &=x+\frac{i \cosh (x)}{3 (i+\sinh (x))^2}-\frac{5 \cosh (x)}{3 (i+\sinh (x))}\\ \end{align*}

Mathematica [A]  time = 0.140612, size = 55, normalized size = 1.72 \[ -\frac{1}{3} i \cosh (x) \left (\frac{4-5 i \sinh (x)}{(\sinh (x)+i)^2}-\frac{6 \sin ^{-1}\left (\frac{\sqrt{1-i \sinh (x)}}{\sqrt{2}}\right )}{\sqrt{\cosh ^2(x)}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-I/3)*Cosh[x]*((-6*ArcSin[Sqrt[1 - I*Sinh[x]]/Sqrt[2]])/Sqrt[Cosh[x]^2] + (4 - (5*I)*Sinh[x])/(I + Sinh[x])^2
)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(x)^2/(I+sinh(x))^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.21758, size = 54, normalized size = 1.69 \begin{align*} x - \frac{72 \, e^{\left (-x\right )} + 48 i \, e^{\left (-2 \, x\right )} - 40 i}{4 \,{\left (9 \, e^{\left (-x\right )} + 9 i \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-3 \, x\right )} - 3 i\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 1/4*(72*e^(-x) + 48*I*e^(-2*x) - 40*I)/(9*e^(-x) + 9*I*e^(-2*x) - 3*e^(-3*x) - 3*I)

________________________________________________________________________________________

Fricas [B]  time = 2.074, size = 150, normalized size = 4.69 \begin{align*} \frac{3 \, x e^{\left (3 \, x\right )} +{\left (9 i \, x + 12 i\right )} e^{\left (2 \, x\right )} - 9 \,{\left (x + 2\right )} e^{x} - 3 i \, x - 10 i}{3 \, e^{\left (3 \, x\right )} + 9 i \, e^{\left (2 \, x\right )} - 9 \, e^{x} - 3 i} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3*x*e^(3*x) + (9*I*x + 12*I)*e^(2*x) - 9*(x + 2)*e^x - 3*I*x - 10*I)/(3*e^(3*x) + 9*I*e^(2*x) - 9*e^x - 3*I)

________________________________________________________________________________________

Sympy [A]  time = 0.303963, size = 39, normalized size = 1.22 \begin{align*} x + \frac{4 i e^{2 x} - 6 e^{x} - \frac{10 i}{3}}{e^{3 x} + 3 i e^{2 x} - 3 e^{x} - i} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + (4*I*exp(2*x) - 6*exp(x) - 10*I/3)/(exp(3*x) + 3*I*exp(2*x) - 3*exp(x) - I)

________________________________________________________________________________________

Giac [A]  time = 1.32251, size = 30, normalized size = 0.94 \begin{align*} x - \frac{-12 i \, e^{\left (2 \, x\right )} + 18 \, e^{x} + 10 i}{3 \,{\left (e^{x} + i\right )}^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 1/3*(-12*I*e^(2*x) + 18*e^x + 10*I)/(e^x + I)^3