\(\int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx\) [169]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 37 \[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=-\frac {i \text {sech}^3(x)}{5 (i+\sinh (x))}-\frac {4}{5} i \tanh (x)+\frac {4}{15} i \tanh ^3(x) \]

[Out]

-1/5*I*sech(x)^3/(I+sinh(x))-4/5*I*tanh(x)+4/15*I*tanh(x)^3

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2751, 3852} \[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=\frac {4}{15} i \tanh ^3(x)-\frac {4}{5} i \tanh (x)-\frac {i \text {sech}^3(x)}{5 (\sinh (x)+i)} \]

[In]

Int[Sech[x]^4/(I + Sinh[x]),x]

[Out]

((-1/5*I)*Sech[x]^3)/(I + Sinh[x]) - ((4*I)/5)*Tanh[x] + ((4*I)/15)*Tanh[x]^3

Rule 2751

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b*(g*C
os[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*Simplify[2*m + p + 1])), x] + Dist[Simplify[m + p + 1]/(a*
Simplify[2*m + p + 1]), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g, m
, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[Simplify[m + p + 1], 0] && NeQ[2*m + p + 1, 0] &&  !IGtQ[m, 0]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.95 \[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=-\frac {1}{15} i \left (\frac {3 \text {sech}^3(x)}{i+\sinh (x)}+12 \text {sech}^2(x) \tanh (x)+8 \tanh ^3(x)\right ) \]

[In]

Integrate[Sech[x]^4/(I + Sinh[x]),x]

[Out]

(-1/15*I)*((3*Sech[x]^3)/(I + Sinh[x]) + 12*Sech[x]^2*Tanh[x] + 8*Tanh[x]^3)

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 92 vs. \(2 (27 ) = 54\).

Time = 0.43 (sec) , antiderivative size = 93, normalized size of antiderivative = 2.51

\[\frac {i}{6 \left (-i+\tanh \left (\frac {x}{2}\right )\right )^{3}}-\frac {5 i}{8 \left (-i+\tanh \left (\frac {x}{2}\right )\right )}+\frac {1}{4 \left (-i+\tanh \left (\frac {x}{2}\right )\right )^{2}}-\frac {2 i}{5 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{5}}+\frac {5 i}{3 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}-\frac {11 i}{8 \left (\tanh \left (\frac {x}{2}\right )+i\right )}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{4}}-\frac {3}{2 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}\]

[In]

int(sech(x)^4/(I+sinh(x)),x)

[Out]

1/6*I/(-I+tanh(1/2*x))^3-5/8*I/(-I+tanh(1/2*x))+1/4/(-I+tanh(1/2*x))^2-2/5*I/(tanh(1/2*x)+I)^5+5/3*I/(tanh(1/2
*x)+I)^3-11/8*I/(tanh(1/2*x)+I)+1/(tanh(1/2*x)+I)^4-3/2/(tanh(1/2*x)+I)^2

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (23) = 46\).

Time = 0.27 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.68 \[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=-\frac {16 \, {\left (6 \, e^{\left (3 \, x\right )} + 2 i \, e^{\left (2 \, x\right )} + 2 \, e^{x} + i\right )}}{15 \, {\left (e^{\left (8 \, x\right )} + 2 i \, e^{\left (7 \, x\right )} + 2 \, e^{\left (6 \, x\right )} + 6 i \, e^{\left (5 \, x\right )} + 6 i \, e^{\left (3 \, x\right )} - 2 \, e^{\left (2 \, x\right )} + 2 i \, e^{x} - 1\right )}} \]

[In]

integrate(sech(x)^4/(I+sinh(x)),x, algorithm="fricas")

[Out]

-16/15*(6*e^(3*x) + 2*I*e^(2*x) + 2*e^x + I)/(e^(8*x) + 2*I*e^(7*x) + 2*e^(6*x) + 6*I*e^(5*x) + 6*I*e^(3*x) -
2*e^(2*x) + 2*I*e^x - 1)

Sympy [F]

\[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=\int \frac {\operatorname {sech}^{4}{\left (x \right )}}{\sinh {\left (x \right )} + i}\, dx \]

[In]

integrate(sech(x)**4/(I+sinh(x)),x)

[Out]

Integral(sech(x)**4/(sinh(x) + I), x)

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 205 vs. \(2 (23) = 46\).

Time = 0.20 (sec) , antiderivative size = 205, normalized size of antiderivative = 5.54 \[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=-\frac {32 \, e^{\left (-x\right )}}{-30 i \, e^{\left (-x\right )} - 30 \, e^{\left (-2 \, x\right )} - 90 i \, e^{\left (-3 \, x\right )} - 90 i \, e^{\left (-5 \, x\right )} + 30 \, e^{\left (-6 \, x\right )} - 30 i \, e^{\left (-7 \, x\right )} + 15 \, e^{\left (-8 \, x\right )} - 15} + \frac {32 i \, e^{\left (-2 \, x\right )}}{-30 i \, e^{\left (-x\right )} - 30 \, e^{\left (-2 \, x\right )} - 90 i \, e^{\left (-3 \, x\right )} - 90 i \, e^{\left (-5 \, x\right )} + 30 \, e^{\left (-6 \, x\right )} - 30 i \, e^{\left (-7 \, x\right )} + 15 \, e^{\left (-8 \, x\right )} - 15} - \frac {96 \, e^{\left (-3 \, x\right )}}{-30 i \, e^{\left (-x\right )} - 30 \, e^{\left (-2 \, x\right )} - 90 i \, e^{\left (-3 \, x\right )} - 90 i \, e^{\left (-5 \, x\right )} + 30 \, e^{\left (-6 \, x\right )} - 30 i \, e^{\left (-7 \, x\right )} + 15 \, e^{\left (-8 \, x\right )} - 15} + \frac {16 i}{-30 i \, e^{\left (-x\right )} - 30 \, e^{\left (-2 \, x\right )} - 90 i \, e^{\left (-3 \, x\right )} - 90 i \, e^{\left (-5 \, x\right )} + 30 \, e^{\left (-6 \, x\right )} - 30 i \, e^{\left (-7 \, x\right )} + 15 \, e^{\left (-8 \, x\right )} - 15} \]

[In]

integrate(sech(x)^4/(I+sinh(x)),x, algorithm="maxima")

[Out]

-32*e^(-x)/(-30*I*e^(-x) - 30*e^(-2*x) - 90*I*e^(-3*x) - 90*I*e^(-5*x) + 30*e^(-6*x) - 30*I*e^(-7*x) + 15*e^(-
8*x) - 15) + 32*I*e^(-2*x)/(-30*I*e^(-x) - 30*e^(-2*x) - 90*I*e^(-3*x) - 90*I*e^(-5*x) + 30*e^(-6*x) - 30*I*e^
(-7*x) + 15*e^(-8*x) - 15) - 96*e^(-3*x)/(-30*I*e^(-x) - 30*e^(-2*x) - 90*I*e^(-3*x) - 90*I*e^(-5*x) + 30*e^(-
6*x) - 30*I*e^(-7*x) + 15*e^(-8*x) - 15) + 16*I/(-30*I*e^(-x) - 30*e^(-2*x) - 90*I*e^(-3*x) - 90*I*e^(-5*x) +
30*e^(-6*x) - 30*I*e^(-7*x) + 15*e^(-8*x) - 15)

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (23) = 46\).

Time = 0.27 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.43 \[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=\frac {9 \, e^{\left (2 \, x\right )} - 24 i \, e^{x} - 11}{24 \, {\left (e^{x} - i\right )}^{3}} - \frac {45 \, e^{\left (4 \, x\right )} + 240 i \, e^{\left (3 \, x\right )} - 490 \, e^{\left (2 \, x\right )} - 320 i \, e^{x} + 73}{120 \, {\left (e^{x} + i\right )}^{5}} \]

[In]

integrate(sech(x)^4/(I+sinh(x)),x, algorithm="giac")

[Out]

1/24*(9*e^(2*x) - 24*I*e^x - 11)/(e^x - I)^3 - 1/120*(45*e^(4*x) + 240*I*e^(3*x) - 490*e^(2*x) - 320*I*e^x + 7
3)/(e^x + I)^5

Mupad [B] (verification not implemented)

Time = 1.78 (sec) , antiderivative size = 231, normalized size of antiderivative = 6.24 \[ \int \frac {\text {sech}^4(x)}{i+\sinh (x)} \, dx=-\frac {1}{6\,\left ({\mathrm {e}}^{2\,x}\,3{}\mathrm {i}-{\mathrm {e}}^{3\,x}+3\,{\mathrm {e}}^x-\mathrm {i}\right )}-\frac {\frac {3\,{\mathrm {e}}^x}{40}+\frac {1}{8}{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}}-\frac {\frac {3\,{\mathrm {e}}^{2\,x}}{40}-\frac {5}{24}+\frac {{\mathrm {e}}^x\,1{}\mathrm {i}}{4}}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}}+\frac {1{}\mathrm {i}}{4\,\left (1-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x\,2{}\mathrm {i}\right )}+\frac {3}{8\,\left ({\mathrm {e}}^x-\mathrm {i}\right )}-\frac {3}{40\,\left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}-\frac {\frac {{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}}{8}+\frac {3\,{\mathrm {e}}^{3\,x}}{40}-\frac {5\,{\mathrm {e}}^x}{8}-\frac {1}{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 {\frac {3\,{\mathrm {e}}^{4\,x}}{40}-\frac {5\,{\mathrm {e}}^{2\,x}}{4}+\frac {3}{40}+\frac {{\mathrm {e}}^{3\,x}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^x\,1{}\mathrm {i}}{2}}{{\mathrm {e}}^{5\,x}-10\,{\mathrm {e}}^{3\,x}+{\mathrm {e}}^{4\,x}\,5{}\mathrm {i}-{\mathrm {e}}^{2\,x}\,10{}\mathrm {i}+5\,{\mathrm {e}}^x+1{}\mathrm {i}} \]

[In]

int(1/(cosh(x)^4*(sinh(x) + 1i)),x)

[Out]

1i/(4*(exp(x)*2i - exp(2*x) + 1)) - ((3*exp(x))/40 + 1i/8)/(exp(2*x) + exp(x)*2i - 1) - ((3*exp(2*x))/40 + (ex
p(x)*1i)/4 - 5/24)/(exp(2*x)*3i + exp(3*x) - 3*exp(x) - 1i) - 1/(6*(exp(2*x)*3i - exp(3*x) + 3*exp(x) - 1i)) +
 3/(8*(exp(x) - 1i)) - 3/(40*(exp(x) + 1i)) - ((exp(2*x)*3i)/8 + (3*exp(3*x))/40 - (5*exp(x))/8 - 1i/8)/(exp(3
*x)*4i - 6*exp(2*x) + exp(4*x) - exp(x)*4i + 1) - ((exp(3*x)*1i)/2 - (5*exp(2*x))/4 + (3*exp(4*x))/40 - (exp(x
)*1i)/2 + 3/40)/(exp(4*x)*5i - 10*exp(3*x) - exp(2*x)*10i + exp(5*x) + 5*exp(x) + 1i)