3.88 \(\int \frac{\text{sech}(x)}{i+\text{csch}(x)} \, dx\)

Optimal. Leaf size=28 \[ -\frac{1}{2} \text{sech}^2(x)-\frac{1}{2} i \tan ^{-1}(\sinh (x))+\frac{1}{2} i \tanh (x) \text{sech}(x) \]

[Out]

(-I/2)*ArcTan[Sinh[x]] - Sech[x]^2/2 + (I/2)*Sech[x]*Tanh[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0801613, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.546, Rules used = {3872, 2706, 2606, 30, 2611, 3770} \[ -\frac{1}{2} \text{sech}^2(x)-\frac{1}{2} i \tan ^{-1}(\sinh (x))+\frac{1}{2} i \tanh (x) \text{sech}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-I/2)*ArcTan[Sinh[x]] - Sech[x]^2/2 + (I/2)*Sech[x]*Tanh[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 2706

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

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

Rubi steps

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

Mathematica [A]  time = 0.0295167, size = 20, normalized size = 0.71 \[ -\frac{1}{2} i \left (\tan ^{-1}(\sinh (x))+\frac{1}{-\sinh (x)+i}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-I/2)*(ArcTan[Sinh[x]] + (I - Sinh[x])^(-1))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(x)/(I+csch(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.04381, size = 55, normalized size = 1.96 \begin{align*} -\frac{2 i \, e^{\left (-x\right )}}{4 i \, e^{\left (-x\right )} + 2 \, e^{\left (-2 \, x\right )} - 2} - \frac{1}{2} \, \log \left (e^{\left (-x\right )} + i\right ) + \frac{1}{2} \, \log \left (e^{\left (-x\right )} - i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.63444, size = 155, normalized size = 5.54 \begin{align*} \frac{{\left (e^{\left (2 \, x\right )} - 2 i \, e^{x} - 1\right )} \log \left (e^{x} + i\right ) -{\left (e^{\left (2 \, x\right )} - 2 i \, e^{x} - 1\right )} \log \left (e^{x} - i\right ) + 2 i \, e^{x}}{2 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} - 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}{\left (x \right )}}{\operatorname{csch}{\left (x \right )} + i}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.1428, size = 72, normalized size = 2.57 \begin{align*} \frac{e^{\left (-x\right )} - e^{x} - 2 i}{4 \,{\left (e^{\left (-x\right )} - e^{x} + 2 i\right )}} + \frac{1}{4} \, \log \left (-i \, e^{\left (-x\right )} + i \, e^{x} - 2\right ) - \frac{1}{4} \, \log \left (-e^{\left (-x\right )} + e^{x} - 2 i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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