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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2844, 3047, 3102, 12, 2814, 2727} \begin {gather*} -2 i x+\frac {4 \cosh (x)}{3}-\frac {\sinh ^2(x) \cosh (x)}{3 (\sinh (x)+i)^2}+\frac {2 i \cosh (x)}{\sinh (x)+i} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 2814

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 2844

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

Rule 3047

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

Rule 3102

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 45, normalized size = 1.02 \begin {gather*} \frac {1}{3} \cosh (x) \left (-\frac {6 i \sinh ^{-1}(\sinh (x))}{\sqrt {\cosh ^2(x)}}+\frac {-10+14 i \sinh (x)+3 \sinh ^2(x)}{(i+\sinh (x))^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(Cosh[x]*(((-6*I)*ArcSinh[Sinh[x]])/Sqrt[Cosh[x]^2] + (-10 + (14*I)*Sinh[x] + 3*Sinh[x]^2)/(I + Sinh[x])^2))/3

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (36 ) = 72\).
time = 0.82, size = 75, normalized size = 1.70

method result size
risch \(-2 i x +\frac {{\mathrm e}^{x}}{2}+\frac {{\mathrm e}^{-x}}{2}+\frac {10 i {\mathrm e}^{x}+6 \,{\mathrm e}^{2 x}-\frac {16}{3}}{\left ({\mathrm e}^{x}+i\right )^{3}}\) \(38\)
default \(\frac {4 i}{3 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}+\frac {4 i}{\tanh \left (\frac {x}{2}\right )+i}-\frac {2}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}+2 i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\frac {1}{\tanh \left (\frac {x}{2}\right )-1}-2 i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {1}{\tanh \left (\frac {x}{2}\right )+1}\) \(75\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 59, normalized size = 1.34 \begin {gather*} -2 i \, x - \frac {41 \, e^{\left (-x\right )} + 69 i \, e^{\left (-2 \, x\right )} - 39 \, e^{\left (-3 \, x\right )} - 3 i}{2 \, {\left (3 i \, e^{\left (-x\right )} - 9 \, e^{\left (-2 \, x\right )} - 9 i \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )}\right )}} + \frac {1}{2} \, e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*I*x - 1/2*(41*e^(-x) + 69*I*e^(-2*x) - 39*e^(-3*x) - 3*I)/(3*I*e^(-x) - 9*e^(-2*x) - 9*I*e^(-3*x) + 3*e^(-4
*x)) + 1/2*e^(-x)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (32) = 64\).
time = 0.38, size = 74, normalized size = 1.68 \begin {gather*} -\frac {3 \, {\left (4 i \, x - 3 i\right )} e^{\left (4 \, x\right )} - 6 \, {\left (6 \, x + 5\right )} e^{\left (3 \, x\right )} + 6 \, {\left (-6 i \, x - 11 i\right )} e^{\left (2 \, x\right )} + {\left (12 \, x + 41\right )} e^{x} - 3 \, e^{\left (5 \, x\right )} + 3 i}{6 \, {\left (e^{\left (4 \, x\right )} + 3 i \, e^{\left (3 \, x\right )} - 3 \, e^{\left (2 \, x\right )} - i \, e^{x}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/6*(3*(4*I*x - 3*I)*e^(4*x) - 6*(6*x + 5)*e^(3*x) + 6*(-6*I*x - 11*I)*e^(2*x) + (12*x + 41)*e^x - 3*e^(5*x)
+ 3*I)/(e^(4*x) + 3*I*e^(3*x) - 3*e^(2*x) - I*e^x)

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 54, normalized size = 1.23 \begin {gather*} - 2 i x + \frac {18 e^{2 x} + 30 i e^{x} - 16}{3 e^{3 x} + 9 i e^{2 x} - 9 e^{x} - 3 i} + \frac {e^{x}}{2} + \frac {e^{- x}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*I*x + (18*exp(2*x) + 30*I*exp(x) - 16)/(3*exp(3*x) + 9*I*exp(2*x) - 9*exp(x) - 3*I) + exp(x)/2 + exp(-x)/2

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 38, normalized size = 0.86 \begin {gather*} -2 i \, x + \frac {{\left (39 \, e^{\left (3 \, x\right )} + 69 i \, e^{\left (2 \, x\right )} - 41 \, e^{x} - 3 i\right )} e^{\left (-x\right )}}{6 \, {\left (e^{x} + i\right )}^{3}} + \frac {1}{2} \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*I*x + 1/6*(39*e^(3*x) + 69*I*e^(2*x) - 41*e^x - 3*I)*e^(-x)/(e^x + I)^3 + 1/2*e^x

________________________________________________________________________________________

Mupad [B]
time = 0.58, size = 79, normalized size = 1.80 \begin {gather*} \frac {{\mathrm {e}}^{-x}}{2}-x\,2{}\mathrm {i}+\frac {{\mathrm {e}}^x}{2}+\frac {2\,{\mathrm {e}}^x+\frac {4}{3}{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}}+\frac {2\,{\mathrm {e}}^{2\,x}-2+\frac {{\mathrm {e}}^x\,8{}\mathrm {i}}{3}}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}}+\frac {2}{{\mathrm {e}}^x+1{}\mathrm {i}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________