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

Optimal. Leaf size=22 \[ -i x+\cosh (x)+\frac {i \cosh (x)}{\sinh (x)+i} \]

[Out]

-I*x+cosh(x)+I*cosh(x)/(I+sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 22, normalized size of antiderivative = 1.00, 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 = {2746, 2735, 2648} \[ -i x+\cosh (x)+\frac {i \cosh (x)}{\sinh (x)+i} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-I)*x + Cosh[x] + (I*Cosh[x])/(I + Sinh[x])

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]

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 2746

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.11, size = 79, normalized size = 3.59 \[ \frac {\cosh (x) \left (\sinh (x)+\frac {2 \sinh (x) \sin ^{-1}\left (\frac {\sqrt {1-i \sinh (x)}}{\sqrt {2}}\right )}{\sqrt {\cosh ^2(x)}}+\frac {2 i \sin ^{-1}\left (\frac {\sqrt {1-i \sinh (x)}}{\sqrt {2}}\right )}{\sqrt {\cosh ^2(x)}}+2 i\right )}{\sinh (x)+i} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Cosh[x]*(2*I + ((2*I)*ArcSin[Sqrt[1 - I*Sinh[x]]/Sqrt[2]])/Sqrt[Cosh[x]^2] + Sinh[x] + (2*ArcSin[Sqrt[1 - I*S
inh[x]]/Sqrt[2]]*Sinh[x])/Sqrt[Cosh[x]^2]))/(I + Sinh[x])

________________________________________________________________________________________

fricas [B]  time = 0.42, size = 38, normalized size = 1.73 \[ \frac {{\left (-2 i \, x + i\right )} e^{\left (2 \, x\right )} + {\left (2 \, x + 5\right )} e^{x} + e^{\left (3 \, x\right )} + i}{2 \, e^{\left (2 \, x\right )} + 2 i \, e^{x}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 26, normalized size = 1.18 \[ -i \, x + \frac {{\left (5 \, e^{x} + i\right )} e^{\left (-x\right )}}{2 \, {\left (e^{x} + i\right )}} + \frac {1}{2} \, e^{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-I*x + 1/2*(5*e^x + I)*e^(-x)/(e^x + I) + 1/2*e^x

________________________________________________________________________________________

maple [B]  time = 0.05, size = 52, normalized size = 2.36 \[ i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\frac {1}{\tanh \left (\frac {x}{2}\right )-1}-i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {1}{\tanh \left (\frac {x}{2}\right )+1}+\frac {2 i}{\tanh \left (\frac {x}{2}\right )+i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.53, size = 33, normalized size = 1.50 \[ -i \, x + \frac {10 \, e^{\left (-x\right )} - 2 i}{4 \, {\left (-i \, e^{\left (-x\right )} + e^{\left (-2 \, x\right )}\right )}} + \frac {1}{2} \, e^{\left (-x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.43, size = 24, normalized size = 1.09 \[ \frac {{\mathrm {e}}^{-x}}{2}-x\,1{}\mathrm {i}+\frac {{\mathrm {e}}^x}{2}+\frac {2}{{\mathrm {e}}^x+1{}\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 20, normalized size = 0.91 \[ - i x + \frac {e^{x}}{2} + \frac {e^{- x}}{2} + \frac {2}{e^{x} + i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________