\(\int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx\) [51]

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

Optimal result

Integrand size = 11, antiderivative size = 31 \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=-\frac {\cosh (x)}{3 (i+\sinh (x))^2}-\frac {2 i \cosh (x)}{3 (i+\sinh (x))} \]

[Out]

-1/3*cosh(x)/(I+sinh(x))^2-2/3*I*cosh(x)/(I+sinh(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2829, 2727} \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=-\frac {2 i \cosh (x)}{3 (\sinh (x)+i)}-\frac {\cosh (x)}{3 (\sinh (x)+i)^2} \]

[In]

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

[Out]

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

Rule 2727

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]

Rule 2829

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

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.71 \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=\frac {\cosh (x) (1-2 i \sinh (x))}{3 (i+\sinh (x))^2} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.40 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.74

method result size
risch \(-\frac {2 \left (3 i {\mathrm e}^{x}+3 \,{\mathrm e}^{2 x}-2\right )}{3 \left ({\mathrm e}^{x}+i\right )^{3}}\) \(23\)
default \(\frac {2}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}-\frac {4 i}{3 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}\) \(25\)
parallelrisch \(\frac {2 i+6 \tanh \left (\frac {x}{2}\right )}{3 \tanh \left (\frac {x}{2}\right )^{3}+9 i \tanh \left (\frac {x}{2}\right )^{2}-9 \tanh \left (\frac {x}{2}\right )-3 i}\) \(39\)

[In]

int(sinh(x)/(I+sinh(x))^2,x,method=_RETURNVERBOSE)

[Out]

-2/3*(3*I*exp(x)+3*exp(2*x)-2)/(exp(x)+I)^3

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.03 \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=-\frac {2 \, {\left (3 \, e^{\left (2 \, x\right )} + 3 i \, e^{x} - 2\right )}}{3 \, {\left (e^{\left (3 \, x\right )} + 3 i \, e^{\left (2 \, x\right )} - 3 \, e^{x} - i\right )}} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.19 \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=\frac {- 6 e^{2 x} - 6 i e^{x} + 4}{3 e^{3 x} + 9 i e^{2 x} - 9 e^{x} - 3 i} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 81 vs. \(2 (21) = 42\).

Time = 0.18 (sec) , antiderivative size = 81, normalized size of antiderivative = 2.61 \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=-\frac {2 i \, e^{\left (-x\right )}}{3 \, e^{\left (-x\right )} + 3 i \, e^{\left (-2 \, x\right )} - e^{\left (-3 \, x\right )} - i} + \frac {2 \, e^{\left (-2 \, x\right )}}{3 \, e^{\left (-x\right )} + 3 i \, e^{\left (-2 \, x\right )} - e^{\left (-3 \, x\right )} - i} - \frac {4}{3 \, {\left (3 \, e^{\left (-x\right )} + 3 i \, e^{\left (-2 \, x\right )} - e^{\left (-3 \, x\right )} - i\right )}} \]

[In]

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

[Out]

-2*I*e^(-x)/(3*e^(-x) + 3*I*e^(-2*x) - e^(-3*x) - I) + 2*e^(-2*x)/(3*e^(-x) + 3*I*e^(-2*x) - e^(-3*x) - I) - 4
/3/(3*e^(-x) + 3*I*e^(-2*x) - e^(-3*x) - I)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.65 \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=-\frac {2 \, {\left (3 \, e^{\left (2 \, x\right )} + 3 i \, e^{x} - 2\right )}}{3 \, {\left (e^{x} + i\right )}^{3}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.30 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.81 \[ \int \frac {\sinh (x)}{(i+\sinh (x))^2} \, dx=-\frac {2\,\left (3\,{\mathrm {e}}^x-{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+2{}\mathrm {i}\right )}{3\,{\left (-1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )}^3} \]

[In]

int(sinh(x)/(sinh(x) + 1i)^2,x)

[Out]

-(2*(3*exp(x) - exp(2*x)*3i + 2i))/(3*(exp(x)*1i - 1)^3)