\(\int \frac {\cosh ^4(x)}{i+\sinh (x)} \, dx\) [162]

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2761, 2715, 8} \[ \int \frac {\cosh ^4(x)}{i+\sinh (x)} \, dx=-\frac {i x}{2}+\frac {\cosh ^3(x)}{3}-\frac {1}{2} i \sinh (x) \cosh (x) \]

[In]

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

[Out]

(-1/2*I)*x + Cosh[x]^3/3 - (I/2)*Cosh[x]*Sinh[x]

Rule 8

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

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 2761

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

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

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(93\) vs. \(2(26)=52\).

Time = 0.13 (sec) , antiderivative size = 93, normalized size of antiderivative = 3.58 \[ \int \frac {\cosh ^4(x)}{i+\sinh (x)} \, dx=\frac {\cosh ^5(x) \left (2 i+\frac {6 i \arcsin \left (\frac {\sqrt {1-i \sinh (x)}}{\sqrt {2}}\right ) \sqrt {1-i \sinh (x)}}{\sqrt {1+i \sinh (x)}}+5 \sinh (x)-i \sinh ^2(x)+2 \sinh ^3(x)\right )}{6 (-i+\sinh (x))^2 (i+\sinh (x))^3} \]

[In]

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

[Out]

(Cosh[x]^5*(2*I + ((6*I)*ArcSin[Sqrt[1 - I*Sinh[x]]/Sqrt[2]]*Sqrt[1 - I*Sinh[x]])/Sqrt[1 + I*Sinh[x]] + 5*Sinh
[x] - I*Sinh[x]^2 + 2*Sinh[x]^3))/(6*(-I + Sinh[x])^2*(I + Sinh[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. 41 vs. \(2 (18 ) = 36\).

Time = 210.70 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.62

method result size
risch \(-\frac {i x}{2}+\frac {{\mathrm e}^{3 x}}{24}-\frac {i {\mathrm e}^{2 x}}{8}+\frac {{\mathrm e}^{x}}{8}+\frac {{\mathrm e}^{-x}}{8}+\frac {i {\mathrm e}^{-2 x}}{8}+\frac {{\mathrm e}^{-3 x}}{24}\) \(42\)
default \(-\frac {i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2}+\frac {\frac {1}{2}-\frac {i}{2}}{\tanh \left (\frac {x}{2}\right )+1}+\frac {-\frac {1}{2}+\frac {i}{2}}{\left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {1}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}+\frac {-\frac {1}{2}-\frac {i}{2}}{\left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {-\frac {1}{2}-\frac {i}{2}}{\tanh \left (\frac {x}{2}\right )-1}-\frac {1}{3 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}\) \(90\)

[In]

int(cosh(x)^4/(I+sinh(x)),x,method=_RETURNVERBOSE)

[Out]

-1/2*I*x+1/24*exp(x)^3-1/8*I*exp(x)^2+1/8*exp(x)+1/8/exp(x)+1/8*I/exp(x)^2+1/24/exp(x)^3

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. 41 vs. \(2 (16) = 32\).

Time = 0.29 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.58 \[ \int \frac {\cosh ^4(x)}{i+\sinh (x)} \, dx=\frac {1}{24} \, {\left (-12 i \, x e^{\left (3 \, x\right )} + e^{\left (6 \, x\right )} - 3 i \, e^{\left (5 \, x\right )} + 3 \, e^{\left (4 \, x\right )} + 3 \, e^{\left (2 \, x\right )} + 3 i \, e^{x} + 1\right )} e^{\left (-3 \, x\right )} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (20) = 40\).

Time = 0.08 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.85 \[ \int \frac {\cosh ^4(x)}{i+\sinh (x)} \, dx=- \frac {i x}{2} + \frac {e^{3 x}}{24} - \frac {i e^{2 x}}{8} + \frac {e^{x}}{8} + \frac {e^{- x}}{8} + \frac {i e^{- 2 x}}{8} + \frac {e^{- 3 x}}{24} \]

[In]

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

[Out]

-I*x/2 + exp(3*x)/24 - I*exp(2*x)/8 + exp(x)/8 + exp(-x)/8 + I*exp(-2*x)/8 + exp(-3*x)/24

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. 42 vs. \(2 (16) = 32\).

Time = 0.20 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.62 \[ \int \frac {\cosh ^4(x)}{i+\sinh (x)} \, dx=-\frac {1}{24} \, {\left (3 i \, e^{\left (-x\right )} - 3 \, e^{\left (-2 \, x\right )} - 1\right )} e^{\left (3 \, x\right )} - \frac {1}{2} i \, x + \frac {1}{8} \, e^{\left (-x\right )} + \frac {1}{8} i \, e^{\left (-2 \, x\right )} + \frac {1}{24} \, e^{\left (-3 \, x\right )} \]

[In]

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

[Out]

-1/24*(3*I*e^(-x) - 3*e^(-2*x) - 1)*e^(3*x) - 1/2*I*x + 1/8*e^(-x) + 1/8*I*e^(-2*x) + 1/24*e^(-3*x)

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. 38 vs. \(2 (16) = 32\).

Time = 0.27 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.46 \[ \int \frac {\cosh ^4(x)}{i+\sinh (x)} \, dx=\frac {1}{24} \, {\left (3 \, e^{\left (2 \, x\right )} + 3 i \, e^{x} + 1\right )} e^{\left (-3 \, x\right )} - \frac {1}{2} i \, x + \frac {1}{24} \, e^{\left (3 \, x\right )} - \frac {1}{8} i \, e^{\left (2 \, x\right )} + \frac {1}{8} \, e^{x} \]

[In]

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

[Out]

1/24*(3*e^(2*x) + 3*I*e^x + 1)*e^(-3*x) - 1/2*I*x + 1/24*e^(3*x) - 1/8*I*e^(2*x) + 1/8*e^x

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.58 \[ \int \frac {\cosh ^4(x)}{i+\sinh (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}}{2}+\frac {{\mathrm {e}}^{-2\,x}\,1{}\mathrm {i}}{8}-\frac {{\mathrm {e}}^{2\,x}\,1{}\mathrm {i}}{8} \]

[In]

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

[Out]

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