3.86 \(\int \frac{\cosh ^2(x)}{i+\text{csch}(x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0923256, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {3872, 2839, 2638, 2635, 8} \[ \frac{i x}{2}+\cosh (x)-\frac{1}{2} i \sinh (x) \cosh (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2839

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

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

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

Rubi steps

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

Mathematica [A]  time = 0.0294516, size = 20, normalized size = 1. \[ \frac{i x}{2}-\frac{1}{4} i \sinh (2 x)+\cosh (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.033, size = 84, normalized size = 4.2 \begin{align*}{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+{\frac{i}{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) + \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}-{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}-{\frac{i}{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) -{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}- \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}-{{\frac{i}{2}} \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+csch(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.04373, size = 41, normalized size = 2.05 \begin{align*} \frac{1}{8} \,{\left (4 \, e^{\left (-x\right )} - i\right )} e^{\left (2 \, x\right )} + \frac{1}{2} i \, x + \frac{1}{2} \, e^{\left (-x\right )} + \frac{1}{8} i \, e^{\left (-2 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.89306, size = 89, normalized size = 4.45 \begin{align*} \frac{1}{8} \,{\left (4 i \, x e^{\left (2 \, x\right )} - i \, e^{\left (4 \, x\right )} + 4 \, e^{\left (3 \, x\right )} + 4 \, e^{x} + i\right )} e^{\left (-2 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.24136, size = 35, normalized size = 1.75 \begin{align*} \frac{1}{8} \,{\left (4 \, e^{x} + i\right )} e^{\left (-2 \, x\right )} + \frac{1}{2} i \, x - \frac{1}{8} i \, e^{\left (2 \, 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+csch(x)),x, algorithm="giac")

[Out]

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