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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 20, normalized size of antiderivative = 1.00, 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 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, 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 2638

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

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 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]

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.03, size = 20, normalized size = 1.00 \[ \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]

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 31, normalized size = 1.55 \[ \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 )} \]

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)

________________________________________________________________________________________

giac [B]  time = 0.14, size = 26, normalized size = 1.30 \[ \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} \]

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

________________________________________________________________________________________

maple [B]  time = 0.12, size = 84, normalized size = 4.20 \[ -\frac {i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}-\frac {i}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {1}{\tanh \left (\frac {x}{2}\right )-1}-\frac {i}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {i}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2}+\frac {1}{\tanh \left (\frac {x}{2}\right )+1}-\frac {i}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)^2/(I+csch(x)),x)

[Out]

-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)+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)

________________________________________________________________________________________

maxima [B]  time = 0.30, size = 30, normalized size = 1.50 \[ \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 )} \]

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)

________________________________________________________________________________________

mupad [B]  time = 1.46, size = 29, normalized size = 1.45 \[ \frac {{\mathrm {e}}^{-x}}{2}+\frac {{\mathrm {e}}^x}{2}+\frac {x\,1{}\mathrm {i}}{2}+\frac {{\mathrm {e}}^{-2\,x}\,1{}\mathrm {i}}{8}-\frac {{\mathrm {e}}^{2\,x}\,1{}\mathrm {i}}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cosh ^{2}{\relax (x )}}{\operatorname {csch}{\relax (x )} + i}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________