3.126 \(\int \coth ^n(x) \text{csch}^4(x) \, dx\)

Optimal. Leaf size=26 \[ \frac{\coth ^{n+1}(x)}{n+1}-\frac{\coth ^{n+3}(x)}{n+3} \]

[Out]

Coth[x]^(1 + n)/(1 + n) - Coth[x]^(3 + n)/(3 + n)

________________________________________________________________________________________

Rubi [A]  time = 0.0351811, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2607, 14} \[ \frac{\coth ^{n+1}(x)}{n+1}-\frac{\coth ^{n+3}(x)}{n+3} \]

Antiderivative was successfully verified.

[In]

Int[Coth[x]^n*Csch[x]^4,x]

[Out]

Coth[x]^(1 + n)/(1 + n) - Coth[x]^(3 + n)/(3 + n)

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \coth ^n(x) \text{csch}^4(x) \, dx &=-\left (i \operatorname{Subst}\left (\int (-i x)^n \left (1+x^2\right ) \, dx,x,i \coth (x)\right )\right )\\ &=-\left (i \operatorname{Subst}\left (\int \left ((-i x)^n-(-i x)^{2+n}\right ) \, dx,x,i \coth (x)\right )\right )\\ &=\frac{\coth ^{1+n}(x)}{1+n}-\frac{\coth ^{3+n}(x)}{3+n}\\ \end{align*}

Mathematica [A]  time = 0.0860355, size = 30, normalized size = 1.15 \[ \frac{\text{csch}^2(x) (-n+\cosh (2 x)-2) \coth ^{n+1}(x)}{(n+1) (n+3)} \]

Antiderivative was successfully verified.

[In]

Integrate[Coth[x]^n*Csch[x]^4,x]

[Out]

((-2 - n + Cosh[2*x])*Coth[x]^(1 + n)*Csch[x]^2)/((1 + n)*(3 + n))

________________________________________________________________________________________

Maple [C]  time = 0.208, size = 371, normalized size = 14.3 \begin{align*} -2\,{\frac{-{{\rm e}^{6\,x}}+2\,n{{\rm e}^{4\,x}}+3\,{{\rm e}^{4\,x}}+2\,n{{\rm e}^{2\,x}}+3\,{{\rm e}^{2\,x}}-1}{ \left ( n+1 \right ) \left ( n+3 \right ) \left ({{\rm e}^{2\,x}}-1 \right ) ^{3}}{{\rm e}^{-1/2\,n \left ( i\pi \, \left ({\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{{{\rm e}^{x}}+1}} \right ) \right ) ^{3}-i\pi \, \left ({\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{{{\rm e}^{x}}+1}} \right ) \right ) ^{2}{\it csgn} \left ({\frac{i}{{{\rm e}^{x}}+1}} \right ) -i\pi \, \left ({\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{{{\rm e}^{x}}+1}} \right ) \right ) ^{2}{\it csgn} \left ( i \left ({{\rm e}^{2\,x}}+1 \right ) \right ) +i\pi \,{\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{{{\rm e}^{x}}+1}} \right ){\it csgn} \left ({\frac{i}{{{\rm e}^{x}}+1}} \right ){\it csgn} \left ( i \left ({{\rm e}^{2\,x}}+1 \right ) \right ) -i\pi \,{\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{{{\rm e}^{x}}+1}} \right ) \left ({\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{ \left ({{\rm e}^{x}}-1 \right ) \left ({{\rm e}^{x}}+1 \right ) }} \right ) \right ) ^{2}+i\pi \,{\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{{{\rm e}^{x}}+1}} \right ){\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{ \left ({{\rm e}^{x}}-1 \right ) \left ({{\rm e}^{x}}+1 \right ) }} \right ){\it csgn} \left ({\frac{i}{{{\rm e}^{x}}-1}} \right ) +i\pi \, \left ({\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{ \left ({{\rm e}^{x}}-1 \right ) \left ({{\rm e}^{x}}+1 \right ) }} \right ) \right ) ^{3}-i\pi \, \left ({\it csgn} \left ({\frac{i \left ({{\rm e}^{2\,x}}+1 \right ) }{ \left ({{\rm e}^{x}}-1 \right ) \left ({{\rm e}^{x}}+1 \right ) }} \right ) \right ) ^{2}{\it csgn} \left ({\frac{i}{{{\rm e}^{x}}-1}} \right ) +2\,\ln \left ({{\rm e}^{x}}-1 \right ) +2\,\ln \left ({{\rm e}^{x}}+1 \right ) -2\,\ln \left ({{\rm e}^{2\,x}}+1 \right ) \right ) }}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(coth(x)^n*csch(x)^4,x)

[Out]

-2*(-exp(6*x)+2*n*exp(4*x)+3*exp(4*x)+2*n*exp(2*x)+3*exp(2*x)-1)/(n+1)/(n+3)/(exp(2*x)-1)^3*exp(-1/2*n*(I*Pi*c
sgn(I/(exp(x)+1)*(exp(2*x)+1))^3-I*Pi*csgn(I/(exp(x)+1)*(exp(2*x)+1))^2*csgn(I/(exp(x)+1))-I*Pi*csgn(I/(exp(x)
+1)*(exp(2*x)+1))^2*csgn(I*(exp(2*x)+1))+I*Pi*csgn(I/(exp(x)+1)*(exp(2*x)+1))*csgn(I/(exp(x)+1))*csgn(I*(exp(2
*x)+1))-I*Pi*csgn(I/(exp(x)+1)*(exp(2*x)+1))*csgn(I/(exp(x)-1)*(exp(2*x)+1)/(exp(x)+1))^2+I*Pi*csgn(I/(exp(x)+
1)*(exp(2*x)+1))*csgn(I/(exp(x)-1)*(exp(2*x)+1)/(exp(x)+1))*csgn(I/(exp(x)-1))+I*Pi*csgn(I/(exp(x)-1)*(exp(2*x
)+1)/(exp(x)+1))^3-I*Pi*csgn(I/(exp(x)-1)*(exp(2*x)+1)/(exp(x)+1))^2*csgn(I/(exp(x)-1))+2*ln(exp(x)-1)+2*ln(ex
p(x)+1)-2*ln(exp(2*x)+1)))

________________________________________________________________________________________

Maxima [B]  time = 1.66412, size = 497, normalized size = 19.12 \begin{align*} -\frac{2 \,{\left (2 \, n + 3\right )} e^{\left (-n \log \left (e^{\left (-x\right )} + 1\right ) - n \log \left (-e^{\left (-x\right )} + 1\right ) + n \log \left (e^{\left (-2 \, x\right )} + 1\right ) - 2 \, x\right )}}{n^{2} - 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, x\right )} + 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, x\right )} -{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, x\right )} + 4 \, n + 3} - \frac{2 \,{\left (2 \, n + 3\right )} e^{\left (-n \log \left (e^{\left (-x\right )} + 1\right ) - n \log \left (-e^{\left (-x\right )} + 1\right ) + n \log \left (e^{\left (-2 \, x\right )} + 1\right ) - 4 \, x\right )}}{n^{2} - 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, x\right )} + 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, x\right )} -{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, x\right )} + 4 \, n + 3} + \frac{2 \, e^{\left (-n \log \left (e^{\left (-x\right )} + 1\right ) - n \log \left (-e^{\left (-x\right )} + 1\right ) + n \log \left (e^{\left (-2 \, x\right )} + 1\right ) - 6 \, x\right )}}{n^{2} - 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, x\right )} + 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, x\right )} -{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, x\right )} + 4 \, n + 3} + \frac{2 \, e^{\left (-n \log \left (e^{\left (-x\right )} + 1\right ) - n \log \left (-e^{\left (-x\right )} + 1\right ) + n \log \left (e^{\left (-2 \, x\right )} + 1\right )\right )}}{n^{2} - 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, x\right )} + 3 \,{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, x\right )} -{\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, x\right )} + 4 \, n + 3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)^n*csch(x)^4,x, algorithm="maxima")

[Out]

-2*(2*n + 3)*e^(-n*log(e^(-x) + 1) - n*log(-e^(-x) + 1) + n*log(e^(-2*x) + 1) - 2*x)/(n^2 - 3*(n^2 + 4*n + 3)*
e^(-2*x) + 3*(n^2 + 4*n + 3)*e^(-4*x) - (n^2 + 4*n + 3)*e^(-6*x) + 4*n + 3) - 2*(2*n + 3)*e^(-n*log(e^(-x) + 1
) - n*log(-e^(-x) + 1) + n*log(e^(-2*x) + 1) - 4*x)/(n^2 - 3*(n^2 + 4*n + 3)*e^(-2*x) + 3*(n^2 + 4*n + 3)*e^(-
4*x) - (n^2 + 4*n + 3)*e^(-6*x) + 4*n + 3) + 2*e^(-n*log(e^(-x) + 1) - n*log(-e^(-x) + 1) + n*log(e^(-2*x) + 1
) - 6*x)/(n^2 - 3*(n^2 + 4*n + 3)*e^(-2*x) + 3*(n^2 + 4*n + 3)*e^(-4*x) - (n^2 + 4*n + 3)*e^(-6*x) + 4*n + 3)
+ 2*e^(-n*log(e^(-x) + 1) - n*log(-e^(-x) + 1) + n*log(e^(-2*x) + 1))/(n^2 - 3*(n^2 + 4*n + 3)*e^(-2*x) + 3*(n
^2 + 4*n + 3)*e^(-4*x) - (n^2 + 4*n + 3)*e^(-6*x) + 4*n + 3)

________________________________________________________________________________________

Fricas [B]  time = 2.00791, size = 347, normalized size = 13.35 \begin{align*} \frac{2 \,{\left ({\left (\cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right ) \sinh \left (x\right )^{2} -{\left (2 \, n + 3\right )} \cosh \left (x\right )\right )} \cosh \left (n \log \left (\frac{\cosh \left (x\right )}{\sinh \left (x\right )}\right )\right ) +{\left (\cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right ) \sinh \left (x\right )^{2} -{\left (2 \, n + 3\right )} \cosh \left (x\right )\right )} \sinh \left (n \log \left (\frac{\cosh \left (x\right )}{\sinh \left (x\right )}\right )\right )\right )}}{{\left (n^{2} + 4 \, n + 3\right )} \sinh \left (x\right )^{3} + 3 \,{\left ({\left (n^{2} + 4 \, n + 3\right )} \cosh \left (x\right )^{2} - n^{2} - 4 \, n - 3\right )} \sinh \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)^n*csch(x)^4,x, algorithm="fricas")

[Out]

2*((cosh(x)^3 + 3*cosh(x)*sinh(x)^2 - (2*n + 3)*cosh(x))*cosh(n*log(cosh(x)/sinh(x))) + (cosh(x)^3 + 3*cosh(x)
*sinh(x)^2 - (2*n + 3)*cosh(x))*sinh(n*log(cosh(x)/sinh(x))))/((n^2 + 4*n + 3)*sinh(x)^3 + 3*((n^2 + 4*n + 3)*
cosh(x)^2 - n^2 - 4*n - 3)*sinh(x))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)**n*csch(x)**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \coth \left (x\right )^{n} \operatorname{csch}\left (x\right )^{4}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)^n*csch(x)^4,x, algorithm="giac")

[Out]

integrate(coth(x)^n*csch(x)^4, x)