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

Optimal. Leaf size=8 \[ \cosh (x)-i x \]

[Out]

(-I)*x + Cosh[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0312799, antiderivative size = 8, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2682, 8} \[ \cosh (x)-i x \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-I)*x + Cosh[x]

Rule 2682

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(g*(g*Cos[e
 + f*x])^(p - 1))/(b*f*(p - 1)), x] + Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g
}, x] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

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

Mathematica [B]  time = 0.0463424, size = 34, normalized size = 4.25 \[ \cosh (x)+2 \sqrt{\cosh ^2(x)} \text{sech}(x) \sin ^{-1}\left (\frac{\sqrt{1-i \sinh (x)}}{\sqrt{2}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Cosh[x] + 2*ArcSin[Sqrt[1 - I*Sinh[x]]/Sqrt[2]]*Sqrt[Cosh[x]^2]*Sech[x]

________________________________________________________________________________________

Maple [B]  time = 0.028, size = 40, normalized size = 5. \begin{align*} -i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) + \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}+i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) - \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(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)

________________________________________________________________________________________

Maxima [B]  time = 1.25592, size = 19, normalized size = 2.38 \begin{align*} -i \, x + \frac{1}{2} \, e^{\left (-x\right )} + \frac{1}{2} \, e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.69833, size = 53, normalized size = 6.62 \begin{align*} \frac{1}{2} \,{\left (-2 i \, x e^{x} + e^{\left (2 \, x\right )} + 1\right )} e^{\left (-x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.144915, size = 14, normalized size = 1.75 \begin{align*} - i x + \frac{e^{x}}{2} + \frac{e^{- x}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.23315, size = 19, normalized size = 2.38 \begin{align*} -i \, x + \frac{1}{2} \, e^{\left (-x\right )} + \frac{1}{2} \, e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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