\(\int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx\) [87]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 16 \[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=\log (i-\sinh (x))-i \sinh (x) \]

[Out]

ln(I-sinh(x))-I*sinh(x)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3957, 2912, 45} \[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=\log (-\sinh (x)+i)-i \sinh (x) \]

[In]

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

[Out]

Log[I - Sinh[x]] - I*Sinh[x]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[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*} \text {integral}& = i \int \frac {\cosh (x) \sinh (x)}{i-\sinh (x)} \, dx \\ & = i \text {Subst}\left (\int \frac {x}{i+x} \, dx,x,-\sinh (x)\right ) \\ & = i \text {Subst}\left (\int \left (1-\frac {i}{i+x}\right ) \, dx,x,-\sinh (x)\right ) \\ & = \log (i-\sinh (x))-i \sinh (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=\log (i-\sinh (x))-i \sinh (x) \]

[In]

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

[Out]

Log[I - Sinh[x]] - I*Sinh[x]

Maple [A] (verified)

Time = 2.26 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.56

method result size
risch \(-x -\frac {i {\mathrm e}^{x}}{2}+\frac {i {\mathrm e}^{-x}}{2}+2 \ln \left ({\mathrm e}^{x}-i\right )\) \(25\)
derivativedivides \(-\ln \left (\operatorname {csch}\left (x \right )\right )-\frac {i}{\operatorname {csch}\left (x \right )}+\frac {\ln \left (1+\operatorname {csch}\left (x \right )^{2}\right )}{2}-i \arctan \left (\operatorname {csch}\left (x \right )\right )\) \(29\)
default \(-\ln \left (\operatorname {csch}\left (x \right )\right )-\frac {i}{\operatorname {csch}\left (x \right )}+\frac {\ln \left (1+\operatorname {csch}\left (x \right )^{2}\right )}{2}-i \arctan \left (\operatorname {csch}\left (x \right )\right )\) \(29\)

[In]

int(cosh(x)/(I+csch(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 28 vs. \(2 (12) = 24\).

Time = 0.25 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.75 \[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=-\frac {1}{2} \, {\left (2 \, x e^{x} - 4 \, e^{x} \log \left (e^{x} - i\right ) + i \, e^{\left (2 \, x\right )} - i\right )} e^{\left (-x\right )} \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=\int \frac {\cosh {\left (x \right )}}{\operatorname {csch}{\left (x \right )} + i}\, dx \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.17 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31 \[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=x + \frac {1}{2} i \, e^{\left (-x\right )} - \frac {1}{2} i \, e^{x} + 2 \, \log \left (e^{\left (-x\right )} + i\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31 \[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=-x + \frac {1}{2} i \, e^{\left (-x\right )} - \frac {1}{2} i \, e^{x} + 2 \, \log \left (e^{x} - i\right ) \]

[In]

integrate(cosh(x)/(I+csch(x)),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {\cosh (x)}{i+\text {csch}(x)} \, dx=\ln \left (\mathrm {sinh}\left (x\right )-\mathrm {i}\right )-\mathrm {sinh}\left (x\right )\,1{}\mathrm {i} \]

[In]

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

[Out]

log(sinh(x) - 1i) - sinh(x)*1i