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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0591995, antiderivative size = 42, 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{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 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 (\text{sech}(x)-i \tanh (x))^5 \, dx &=\int \text{sech}^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{1}{1-x}-\frac{4}{(-1+x)^3}-\frac{4}{(-1+x)^2}\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.0578758, size = 62, normalized size = 1.48 \[ \frac{11}{4} i \tanh ^4(x)+\frac{1}{2} i \tanh ^2(x)+\frac{5}{4} i \text{sech}^4(x)+\tan ^{-1}(\sinh (x))-i \log (\cosh (x))-\tanh (x) \text{sech}^3(x)-5 \tanh ^3(x) \text{sech}(x)+\tanh (x) \text{sech}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.048, size = 82, normalized size = 2. \begin{align*}{\frac{8\,\tanh \left ( x \right ) }{3} \left ({\frac{ \left ({\rm sech} \left (x\right ) \right ) ^{3}}{4}}+{\frac{3\,{\rm sech} \left (x\right )}{8}} \right ) }+2\,\arctan \left ({{\rm e}^{x}} \right ) -{\frac{{\frac{15\,i}{4}} \left ( \sinh \left ( x \right ) \right ) ^{2}}{ \left ( \cosh \left ( x \right ) \right ) ^{4}}}+{\frac{{\frac{5\,i}{4}} \left ( \sinh \left ( x \right ) \right ) ^{2}}{ \left ( \cosh \left ( x \right ) \right ) ^{2}}}-{\frac{5\,\sinh \left ( x \right ) }{3\, \left ( \cosh \left ( x \right ) \right ) ^{4}}}-5\,{\frac{ \left ( \sinh \left ( x \right ) \right ) ^{3}}{ \left ( \cosh \left ( x \right ) \right ) ^{4}}}-i\ln \left ( \cosh \left ( x \right ) \right ) +{\frac{i}{2}} \left ( \tanh \left ( x \right ) \right ) ^{2}+{\frac{i}{4}} \left ( \tanh \left ( x \right ) \right ) ^{4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

8/3*(1/4*sech(x)^3+3/8*sech(x))*tanh(x)+2*arctan(exp(x))-15/4*I*sinh(x)^2/cosh(x)^4+5/4*I*sinh(x)^2/cosh(x)^2-
5/3*sinh(x)/cosh(x)^4-5*sinh(x)^3/cosh(x)^4-I*ln(cosh(x))+1/2*I*tanh(x)^2+1/4*I*tanh(x)^4

________________________________________________________________________________________

Maxima [B]  time = 1.64778, size = 317, normalized size = 7.55 \begin{align*} \frac{5}{2} i \, \tanh \left (x\right )^{4} - i \, x - \frac{5 \,{\left (5 \, e^{\left (-x\right )} - 3 \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-5 \, x\right )} - 5 \, e^{\left (-7 \, x\right )}\right )}}{4 \,{\left (4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1\right )}} + \frac{3 \, e^{\left (-x\right )} + 11 \, e^{\left (-3 \, x\right )} - 11 \, e^{\left (-5 \, x\right )} - 3 \, e^{\left (-7 \, x\right )}}{4 \,{\left (4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1\right )}} - \frac{5 \,{\left (e^{\left (-x\right )} - 7 \, e^{\left (-3 \, x\right )} + 7 \, e^{\left (-5 \, x\right )} - e^{\left (-7 \, x\right )}\right )}}{2 \,{\left (4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1\right )}} - \frac{4 i \,{\left (e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )}\right )}}{4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1} + \frac{20 i}{{\left (e^{\left (-x\right )} + e^{x}\right )}^{4}} - 2 \, \arctan \left (e^{\left (-x\right )}\right ) - i \, \log \left (e^{\left (-2 \, x\right )} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/2*I*tanh(x)^4 - I*x - 5/4*(5*e^(-x) - 3*e^(-3*x) + 3*e^(-5*x) - 5*e^(-7*x))/(4*e^(-2*x) + 6*e^(-4*x) + 4*e^(
-6*x) + e^(-8*x) + 1) + 1/4*(3*e^(-x) + 11*e^(-3*x) - 11*e^(-5*x) - 3*e^(-7*x))/(4*e^(-2*x) + 6*e^(-4*x) + 4*e
^(-6*x) + e^(-8*x) + 1) - 5/2*(e^(-x) - 7*e^(-3*x) + 7*e^(-5*x) - e^(-7*x))/(4*e^(-2*x) + 6*e^(-4*x) + 4*e^(-6
*x) + e^(-8*x) + 1) - 4*I*(e^(-2*x) + e^(-4*x) + e^(-6*x))/(4*e^(-2*x) + 6*e^(-4*x) + 4*e^(-6*x) + e^(-8*x) +
1) + 20*I/(e^(-x) + e^x)^4 - 2*arctan(e^(-x)) - I*log(e^(-2*x) + 1)

________________________________________________________________________________________

Fricas [B]  time = 2.09173, size = 274, normalized size = 6.52 \begin{align*} \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} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \int i \tanh ^{5}{\left (x \right )}\, dx - \int 10 \tanh ^{2}{\left (x \right )} \operatorname{sech}^{3}{\left (x \right )}\, dx - \int - 5 \tanh ^{4}{\left (x \right )} \operatorname{sech}{\left (x \right )}\, dx - \int 5 i \tanh{\left (x \right )} \operatorname{sech}^{4}{\left (x \right )}\, dx - \int - 10 i \tanh ^{3}{\left (x \right )} \operatorname{sech}^{2}{\left (x \right )}\, dx - \int - \operatorname{sech}^{5}{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-Integral(I*tanh(x)**5, x) - Integral(10*tanh(x)**2*sech(x)**3, x) - Integral(-5*tanh(x)**4*sech(x), x) - Inte
gral(5*I*tanh(x)*sech(x)**4, x) - Integral(-10*I*tanh(x)**3*sech(x)**2, x) - Integral(-sech(x)**5, x)

________________________________________________________________________________________

Giac [A]  time = 1.13774, size = 49, normalized size = 1.17 \begin{align*} i \, x - \frac{8 \, e^{\left (3 \, x\right )} - 8 i \, e^{\left (2 \, x\right )} - 8 \, e^{x}}{{\left (e^{x} - i\right )}^{4}} - 2 i \, \log \left (e^{x} - i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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