\(\int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx\) [84]

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

Optimal result

Integrand size = 13, antiderivative size = 38 \[ \int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {i x}{8}+\frac {\cosh ^3(x)}{3}+\frac {1}{8} i \cosh (x) \sinh (x)-\frac {1}{4} i \cosh ^3(x) \sinh (x) \]

[Out]

1/8*I*x+1/3*cosh(x)^3+1/8*I*cosh(x)*sinh(x)-1/4*I*cosh(x)^3*sinh(x)

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3957, 2918, 2645, 30, 2648, 2715, 8} \[ \int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {i x}{8}+\frac {\cosh ^3(x)}{3}-\frac {1}{4} i \sinh (x) \cosh ^3(x)+\frac {1}{8} i \sinh (x) \cosh (x) \]

[In]

Int[Cosh[x]^4/(I + Csch[x]),x]

[Out]

(I/8)*x + Cosh[x]^3/3 + (I/8)*Cosh[x]*Sinh[x] - (I/4)*Cosh[x]^3*Sinh[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 2648

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-a)*(b*Cos[e
 + f*x])^(n + 1)*((a*Sin[e + f*x])^(m - 1)/(b*f*(m + n))), x] + Dist[a^2*((m - 1)/(m + n)), Int[(b*Cos[e + f*x
])^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[
2*m, 2*n]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2918

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.84 \[ \int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {i x}{8}+\frac {\cosh (x)}{4}+\frac {1}{12} \cosh (3 x)-\frac {1}{32} i \sinh (4 x) \]

[In]

Integrate[Cosh[x]^4/(I + Csch[x]),x]

[Out]

(I/8)*x + Cosh[x]/4 + Cosh[3*x]/12 - (I/32)*Sinh[4*x]

Maple [B] (verified)

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

Time = 0.15 (sec) , antiderivative size = 116, normalized size of antiderivative = 3.05

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

[In]

int(cosh(x)^4/(I+csch(x)),x)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.13 \[ \int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {1}{192} \, {\left (24 i \, x e^{\left (4 \, x\right )} - 3 i \, e^{\left (8 \, x\right )} + 8 \, e^{\left (7 \, x\right )} + 24 \, e^{\left (5 \, x\right )} + 24 \, e^{\left (3 \, x\right )} + 8 \, e^{x} + 3 i\right )} e^{\left (-4 \, x\right )} \]

[In]

integrate(cosh(x)^4/(I+csch(x)),x, algorithm="fricas")

[Out]

1/192*(24*I*x*e^(4*x) - 3*I*e^(8*x) + 8*e^(7*x) + 24*e^(5*x) + 24*e^(3*x) + 8*e^x + 3*I)*e^(-4*x)

Sympy [F]

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

[In]

integrate(cosh(x)**4/(I+csch(x)),x)

[Out]

Integral(cosh(x)**4/(csch(x) + I), x)

Maxima [A] (verification not implemented)

none

Time = 0.17 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.11 \[ \int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {1}{192} \, {\left (8 \, e^{\left (-x\right )} + 24 \, e^{\left (-3 \, x\right )} - 3 i\right )} e^{\left (4 \, x\right )} + \frac {1}{8} i \, x + \frac {1}{8} \, e^{\left (-x\right )} + \frac {1}{24} \, e^{\left (-3 \, x\right )} + \frac {1}{64} i \, e^{\left (-4 \, x\right )} \]

[In]

integrate(cosh(x)^4/(I+csch(x)),x, algorithm="maxima")

[Out]

1/192*(8*e^(-x) + 24*e^(-3*x) - 3*I)*e^(4*x) + 1/8*I*x + 1/8*e^(-x) + 1/24*e^(-3*x) + 1/64*I*e^(-4*x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {1}{192} \, {\left (24 \, e^{\left (3 \, x\right )} + 8 \, e^{x} + 3 i\right )} e^{\left (-4 \, x\right )} + \frac {1}{8} i \, x - \frac {1}{64} i \, e^{\left (4 \, x\right )} + \frac {1}{24} \, e^{\left (3 \, x\right )} + \frac {1}{8} \, e^{x} \]

[In]

integrate(cosh(x)^4/(I+csch(x)),x, algorithm="giac")

[Out]

1/192*(24*e^(3*x) + 8*e^x + 3*I)*e^(-4*x) + 1/8*I*x - 1/64*I*e^(4*x) + 1/24*e^(3*x) + 1/8*e^x

Mupad [B] (verification not implemented)

Time = 2.29 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.08 \[ \int \frac {\cosh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {{\mathrm {e}}^{-x}}{8}+\frac {{\mathrm {e}}^{-3\,x}}{24}+\frac {{\mathrm {e}}^{3\,x}}{24}+\frac {{\mathrm {e}}^x}{8}+\frac {x\,1{}\mathrm {i}}{8}+\frac {{\mathrm {e}}^{-4\,x}\,1{}\mathrm {i}}{64}-\frac {{\mathrm {e}}^{4\,x}\,1{}\mathrm {i}}{64} \]

[In]

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

[Out]

(x*1i)/8 + exp(-x)/8 + exp(-3*x)/24 + exp(3*x)/24 + (exp(-4*x)*1i)/64 - (exp(4*x)*1i)/64 + exp(x)/8