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/5*arctanh(1/5*(cosh(x)-2*I*sinh(x))*5^(1/2))*5^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 31, normalized size of antiderivative = 1.00, 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 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])

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 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 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 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+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.05, 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]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 41, normalized size = 1.32 \[ -\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 ) \]

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)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 26, normalized size = 0.84 \[ \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 ) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.17, size = 41, normalized size = 1.32 \[ \frac {4 i \sqrt {5}\, \arctan \left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )+i\right ) \sqrt {5}}{5}\right )}{5}+\ln \left (\tanh \left (\frac {x}{2}\right )+i\right )-\ln \left (\tanh \left (\frac {x}{2}\right )-i\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 42, normalized size = 1.35 \[ \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 ) \]

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

________________________________________________________________________________________

mupad [B]  time = 0.51, size = 65, normalized size = 2.10 \[ \ln \left ({\mathrm {e}}^x\,\left (32+64{}\mathrm {i}\right )-64+32{}\mathrm {i}\right )-\ln \left ({\mathrm {e}}^x\,\left (32+64{}\mathrm {i}\right )+64-32{}\mathrm {i}\right )-\frac {2\,\sqrt {5}\,\ln \left ({\mathrm {e}}^x\,\left (-\frac {256}{5}+\frac {192}{5}{}\mathrm {i}\right )+\sqrt {5}\,\left (-\frac {128}{5}-\frac {64}{5}{}\mathrm {i}\right )\right )}{5}+\frac {2\,\sqrt {5}\,\ln \left ({\mathrm {e}}^x\,\left (-\frac {256}{5}+\frac {192}{5}{}\mathrm {i}\right )+\sqrt {5}\,\left (\frac {128}{5}+\frac {64}{5}{}\mathrm {i}\right )\right )}{5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(x)*(2*coth(x) + 1i)),x)

[Out]

log(exp(x)*(32 + 64i) - (64 - 32i)) - log(exp(x)*(32 + 64i) + (64 - 32i)) - (2*5^(1/2)*log(- exp(x)*(256/5 - 1
92i/5) - 5^(1/2)*(128/5 + 64i/5)))/5 + (2*5^(1/2)*log(5^(1/2)*(128/5 + 64i/5) - exp(x)*(256/5 - 192i/5)))/5

________________________________________________________________________________________

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

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)

________________________________________________________________________________________