3.643 \(\int \frac {1}{(\text {sech}(x)-i \tanh (x))^5} \, dx\)

Optimal. Leaf size=40 \[ \frac {4 i}{1-i \sinh (x)}-\frac {2 i}{(1-i \sinh (x))^2}+i \log (\sinh (x)+i) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4391, 2667, 43} \[ \frac {4 i}{1-i \sinh (x)}-\frac {2 i}{(1-i \sinh (x))^2}+i \log (\sinh (x)+i) \]

Antiderivative was successfully verified.

[In]

Int[(Sech[x] - I*Tanh[x])^(-5),x]

[Out]

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

Rule 43

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 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rule 4391

Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x_)]^(n_.))^(p_), x_Symbol] :> Int[A
ctivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a*Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 45, normalized size = 1.12 \[ 2 \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+i \log (\cosh (x))+\frac {4 \sinh (x)+2 i}{\left (\cosh \left (\frac {x}{2}\right )-i \sinh \left (\frac {x}{2}\right )\right )^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sech[x] - I*Tanh[x])^(-5),x]

[Out]

2*ArcTan[Tanh[x/2]] + I*Log[Cosh[x]] + (2*I + 4*Sinh[x])/(Cosh[x/2] - I*Sinh[x/2])^4

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 92, normalized size = 2.30 \[ \frac {-i \, x e^{\left (4 \, x\right )} + 4 \, {\left (x - 2\right )} e^{\left (3 \, x\right )} + {\left (6 i \, x - 8 i\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x - 2\right )} e^{x} + {\left (2 i \, e^{\left (4 \, x\right )} - 8 \, e^{\left (3 \, x\right )} - 12 i \, e^{\left (2 \, x\right )} + 8 \, e^{x} + 2 i\right )} \log \left (e^{x} + i\right ) - i \, x}{e^{\left (4 \, x\right )} + 4 i \, e^{\left (3 \, x\right )} - 6 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)-I*tanh(x))^5,x, algorithm="fricas")

[Out]

(-I*x*e^(4*x) + 4*(x - 2)*e^(3*x) + (6*I*x - 8*I)*e^(2*x) - 4*(x - 2)*e^x + (2*I*e^(4*x) - 8*e^(3*x) - 12*I*e^
(2*x) + 8*e^x + 2*I)*log(e^x + I) - I*x)/(e^(4*x) + 4*I*e^(3*x) - 6*e^(2*x) - 4*I*e^x + 1)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 38, normalized size = 0.95 \[ -\frac {8 \, {\left (e^{\left (3 \, x\right )} + i \, e^{\left (2 \, x\right )} - e^{x}\right )}}{{\left (e^{x} + i\right )}^{4}} - i \, \log \left (-i \, e^{x}\right ) + 2 i \, \log \left (e^{x} + i\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)-I*tanh(x))^5,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.40, size = 68, normalized size = 1.70 \[ -i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {8 i}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}+2 i \ln \left (\tanh \left (\frac {x}{2}\right )+i\right )-\frac {8 i}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{4}}+\frac {16}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sech(x)-I*tanh(x))^5,x)

[Out]

-I*ln(tanh(1/2*x)-1)-I*ln(tanh(1/2*x)+1)+8*I/(tanh(1/2*x)+I)^2+2*I*ln(tanh(1/2*x)+I)-8*I/(tanh(1/2*x)+I)^4+16/
(tanh(1/2*x)+I)^3

________________________________________________________________________________________

maxima [B]  time = 0.37, size = 60, normalized size = 1.50 \[ i \, x - \frac {8 \, e^{\left (-x\right )} + 8 i \, e^{\left (-2 \, x\right )} - 8 \, e^{\left (-3 \, x\right )}}{4 i \, e^{\left (-x\right )} - 6 \, e^{\left (-2 \, x\right )} - 4 i \, e^{\left (-3 \, x\right )} + e^{\left (-4 \, x\right )} + 1} + 2 i \, \log \left (e^{\left (-x\right )} - i\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)-I*tanh(x))^5,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.69, size = 90, normalized size = 2.25 \[ -x\,1{}\mathrm {i}+\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,2{}\mathrm {i}+\frac {16{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}}-\frac {8{}\mathrm {i}}{{\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1+{\mathrm {e}}^{3\,x}\,4{}\mathrm {i}-{\mathrm {e}}^x\,4{}\mathrm {i}}-\frac {8}{{\mathrm {e}}^x+1{}\mathrm {i}}+\frac {16}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(tanh(x)*1i - 1/cosh(x))^5,x)

[Out]

log(exp(x) + 1i)*2i - x*1i + 16i/(exp(2*x) + exp(x)*2i - 1) - 8i/(exp(3*x)*4i - 6*exp(2*x) + exp(4*x) - exp(x)
*4i + 1) - 8/(exp(x) + 1i) + 16/(exp(2*x)*3i + exp(3*x) - 3*exp(x) - 1i)

________________________________________________________________________________________

sympy [B]  time = 8.39, size = 1445, normalized size = 36.12 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)-I*tanh(x))**5,x)

[Out]

36*I*x*tanh(x)**4/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x
)**3 + 36*sech(x)**4) - 144*x*tanh(x)**3*sech(x)/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*se
ch(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) - 216*I*x*tanh(x)**2*sech(x)**2/(36*tanh(x)**4 + 144*I*ta
nh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) + 144*x*tanh(x)*sech(
x)**3/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*se
ch(x)**4) + 36*I*x*sech(x)**4/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*ta
nh(x)*sech(x)**3 + 36*sech(x)**4) + 36*I*log(-I*tanh(x) + sech(x))*tanh(x)**4/(36*tanh(x)**4 + 144*I*tanh(x)**
3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) - 144*log(-I*tanh(x) + sech(
x))*tanh(x)**3*sech(x)/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*s
ech(x)**3 + 36*sech(x)**4) - 216*I*log(-I*tanh(x) + sech(x))*tanh(x)**2*sech(x)**2/(36*tanh(x)**4 + 144*I*tanh
(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) + 144*log(-I*tanh(x) +
sech(x))*tanh(x)*sech(x)**3/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh
(x)*sech(x)**3 + 36*sech(x)**4) + 36*I*log(-I*tanh(x) + sech(x))*sech(x)**4/(36*tanh(x)**4 + 144*I*tanh(x)**3*
sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) - 36*I*log(tanh(x) + 1)*tanh(x
)**4/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sec
h(x)**4) + 144*log(tanh(x) + 1)*tanh(x)**3*sech(x)/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*
sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) + 216*I*log(tanh(x) + 1)*tanh(x)**2*sech(x)**2/(36*tanh
(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) - 14
4*log(tanh(x) + 1)*tanh(x)*sech(x)**3/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 -
144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) - 36*I*log(tanh(x) + 1)*sech(x)**4/(36*tanh(x)**4 + 144*I*tanh(x)**3
*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) - 28*I*tanh(x)**4/(36*tanh(x)
**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) + 52*ta
nh(x)**3*sech(x)/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)
**3 + 36*sech(x)**4) - 18*I*tanh(x)**2/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 -
 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) + 44*tanh(x)*sech(x)**3/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) -
 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) + 24*tanh(x)*sech(x)/(36*tanh(x)**4 + 1
44*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech(x)**4) + 20*I*sech(x)
**4/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)*sech(x)**3 + 36*sech
(x)**4) + 6*I*sech(x)**2/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144*I*tanh(x)
*sech(x)**3 + 36*sech(x)**4) - 9*I/(36*tanh(x)**4 + 144*I*tanh(x)**3*sech(x) - 216*tanh(x)**2*sech(x)**2 - 144
*I*tanh(x)*sech(x)**3 + 36*sech(x)**4)

________________________________________________________________________________________