### 3.641 $$\int \frac{1}{(\text{sech}(x)-i \tanh (x))^3} \, dx$$

Optimal. Leaf size=26 $-\frac{2 i}{1-i \sinh (x)}-i \log (\sinh (x)+i)$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0517354, antiderivative size = 26, normalized size of antiderivative = 1., 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{2 i}{1-i \sinh (x)}-i \log (\sinh (x)+i)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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]

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

Rubi steps

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

Mathematica [A]  time = 0.036104, size = 27, normalized size = 1.04 $\frac{2}{\sinh (x)+i}-2 \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )-i \log (\cosh (x))$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.078, size = 56, normalized size = 2.2 \begin{align*} i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) +i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) +{4\,i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}-2\,i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) -4\, \left ( \tanh \left ( x/2 \right ) +i \right ) ^{-1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.0343, size = 45, normalized size = 1.73 \begin{align*} -i \, x - \frac{4 \, e^{\left (-x\right )}}{-2 i \, e^{\left (-x\right )} + e^{\left (-2 \, x\right )} - 1} - 2 i \, \log \left (e^{\left (-x\right )} - i\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 29.5032, size = 513, normalized size = 19.73 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-6*I*x*tanh(x)**2/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) + 12*x*tanh(x)*sech(x)/(6*tanh(x)**2 +
12*I*tanh(x)*sech(x) - 6*sech(x)**2) + 6*I*x*sech(x)**2/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) +
6*I*log(tanh(x) + 1)*tanh(x)**2/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) - 12*log(tanh(x) + 1)*ta
nh(x)*sech(x)/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) - 6*I*log(tanh(x) + 1)*sech(x)**2/(6*tanh(x
)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) - 2*I*log(I*tanh(x)**3 - 3*tanh(x)**2*sech(x) - 3*I*tanh(x)*sech(x
)**2 + sech(x)**3)*tanh(x)**2/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) + 4*log(I*tanh(x)**3 - 3*ta
nh(x)**2*sech(x) - 3*I*tanh(x)*sech(x)**2 + sech(x)**3)*tanh(x)*sech(x)/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) -
6*sech(x)**2) + 2*I*log(I*tanh(x)**3 - 3*tanh(x)**2*sech(x) - 3*I*tanh(x)*sech(x)**2 + sech(x)**3)*sech(x)**2
/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) + 6*tanh(x)*sech(x)/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x)
- 6*sech(x)**2) + 6*I*sech(x)**2/(6*tanh(x)**2 + 12*I*tanh(x)*sech(x) - 6*sech(x)**2) + 3*I/(6*tanh(x)**2 + 1
2*I*tanh(x)*sech(x) - 6*sech(x)**2)

________________________________________________________________________________________

Giac [A]  time = 1.14519, size = 36, normalized size = 1.38 \begin{align*} \frac{4 \, e^{x}}{{\left (e^{x} + i\right )}^{2}} + i \, \log \left (-i \, e^{x}\right ) - 2 i \, \log \left (i \, e^{x} - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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