3.122 \(\int \frac{\text{sech}(x)}{i+2 \coth (x)} \, dx\)

Optimal. Leaf size=31 \[ -i \tan ^{-1}(\sinh (x))-\frac{2 \tanh ^{-1}\left (\frac{\cosh (x)-2 i \sinh (x)}{\sqrt{5}}\right )}{\sqrt{5}} \]

[Out]

(-I)*ArcTan[Sinh[x]] - (2*ArcTanh[(Cosh[x] - (2*I)*Sinh[x])/Sqrt[5]])/Sqrt[5]

________________________________________________________________________________________

Rubi [A]  time = 0.103316, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {3518, 3110, 3770, 3074, 206} \[ -i \tan ^{-1}(\sinh (x))-\frac{2 \tanh ^{-1}\left (\frac{\cosh (x)-2 i \sinh (x)}{\sqrt{5}}\right )}{\sqrt{5}} \]

Antiderivative was successfully verified.

[In]

Int[Sech[x]/(I + 2*Coth[x]),x]

[Out]

(-I)*ArcTan[Sinh[x]] - (2*ArcTanh[(Cosh[x] - (2*I)*Sinh[x])/Sqrt[5]])/Sqrt[5]

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rule 3110

Int[(cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.))/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(
c_.) + (d_.)*(x_)]), x_Symbol] :> Int[ExpandTrig[(cos[c + d*x]^m*sin[c + d*x]^n)/(a*cos[c + d*x] + b*sin[c + d
*x]), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IntegersQ[m, n]

Rule 3770

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

Rule 3074

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Dist[d^(-1), Subst[Int
[1/(a^2 + b^2 - x^2), x], x, b*Cos[c + d*x] - a*Sin[c + d*x]], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2,
0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

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

Mathematica [A]  time = 0.0514349, size = 38, normalized size = 1.23 \[ -\frac{4 \tanh ^{-1}\left (\frac{1-2 i \tanh \left (\frac{x}{2}\right )}{\sqrt{5}}\right )}{\sqrt{5}}-2 i \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[x]/(I + 2*Coth[x]),x]

[Out]

(-2*I)*ArcTan[Tanh[x/2]] - (4*ArcTanh[(1 - (2*I)*Tanh[x/2])/Sqrt[5]])/Sqrt[5]

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 41, normalized size = 1.3 \begin{align*} -\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) +{\frac{4\,i}{5}}\sqrt{5}\arctan \left ({\frac{\sqrt{5}}{5} \left ( 2\,\tanh \left ( x/2 \right ) +i \right ) } \right ) +\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+2*coth(x)),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.70802, size = 57, normalized size = 1.84 \begin{align*} \frac{2}{5} \, \sqrt{5} \log \left (-\frac{2 \, \sqrt{5} - \left (4 i + 2\right ) \, e^{\left (-x\right )}}{2 \, \sqrt{5} + \left (4 i + 2\right ) \, e^{\left (-x\right )}}\right ) + 2 i \, \arctan \left (e^{\left (-x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)/(I+2*coth(x)),x, algorithm="maxima")

[Out]

2/5*sqrt(5)*log(-(2*sqrt(5) - (4*I + 2)*e^(-x))/(2*sqrt(5) + (4*I + 2)*e^(-x))) + 2*I*arctan(e^(-x))

________________________________________________________________________________________

Fricas [A]  time = 2.79643, size = 169, normalized size = 5.45 \begin{align*} -\frac{2}{5} \, \sqrt{5} \log \left (\left (\frac{2}{5} i + \frac{1}{5}\right ) \, \sqrt{5} + e^{x}\right ) + \frac{2}{5} \, \sqrt{5} \log \left (-\left (\frac{2}{5} i + \frac{1}{5}\right ) \, \sqrt{5} + e^{x}\right ) + \log \left (e^{x} + i\right ) - \log \left (e^{x} - i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)/(I+2*coth(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)/(I+2*coth(x)),x)

[Out]

Integral(sech(x)/(2*coth(x) + I), x)

________________________________________________________________________________________

Giac [A]  time = 1.13408, size = 35, normalized size = 1.13 \begin{align*} \frac{4}{5} i \, \sqrt{5} \arctan \left (\left (\frac{1}{5} i + \frac{2}{5}\right ) \, \sqrt{5} e^{x}\right ) + \log \left (e^{x} + i\right ) - \log \left (e^{x} - i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)/(I+2*coth(x)),x, algorithm="giac")

[Out]

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