\(\int \cos ^3(\coth (a+b x)) \, dx\) [221]

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

Optimal result

Integrand size = 9, antiderivative size = 157 \[ \int \cos ^3(\coth (a+b x)) \, dx=-\frac {\cos (3) \operatorname {CosIntegral}(3-3 \coth (a+b x))}{8 b}-\frac {3 \cos (1) \operatorname {CosIntegral}(1-\coth (a+b x))}{8 b}+\frac {3 \cos (1) \operatorname {CosIntegral}(1+\coth (a+b x))}{8 b}+\frac {\cos (3) \operatorname {CosIntegral}(3+3 \coth (a+b x))}{8 b}-\frac {\sin (3) \text {Si}(3-3 \coth (a+b x))}{8 b}-\frac {3 \sin (1) \text {Si}(1-\coth (a+b x))}{8 b}+\frac {3 \sin (1) \text {Si}(1+\coth (a+b x))}{8 b}+\frac {\sin (3) \text {Si}(3+3 \coth (a+b x))}{8 b} \]

[Out]

-3/8*Ci(1-coth(b*x+a))*cos(1)/b+3/8*Ci(1+coth(b*x+a))*cos(1)/b-1/8*Ci(3-3*coth(b*x+a))*cos(3)/b+1/8*Ci(3+3*cot
h(b*x+a))*cos(3)/b+3/8*Si(-1+coth(b*x+a))*sin(1)/b+3/8*Si(1+coth(b*x+a))*sin(1)/b+1/8*Si(-3+3*coth(b*x+a))*sin
(3)/b+1/8*Si(3+3*coth(b*x+a))*sin(3)/b

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 19, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {6857, 3393, 3384, 3380, 3383} \[ \int \cos ^3(\coth (a+b x)) \, dx=-\frac {\cos (3) \operatorname {CosIntegral}(3-3 \coth (a+b x))}{8 b}-\frac {3 \cos (1) \operatorname {CosIntegral}(1-\coth (a+b x))}{8 b}+\frac {3 \cos (1) \operatorname {CosIntegral}(\coth (a+b x)+1)}{8 b}+\frac {\cos (3) \operatorname {CosIntegral}(3 \coth (a+b x)+3)}{8 b}-\frac {\sin (3) \text {Si}(3-3 \coth (a+b x))}{8 b}-\frac {3 \sin (1) \text {Si}(1-\coth (a+b x))}{8 b}+\frac {3 \sin (1) \text {Si}(\coth (a+b x)+1)}{8 b}+\frac {\sin (3) \text {Si}(3 \coth (a+b x)+3)}{8 b} \]

[In]

Int[Cos[Coth[a + b*x]]^3,x]

[Out]

-1/8*(Cos[3]*CosIntegral[3 - 3*Coth[a + b*x]])/b - (3*Cos[1]*CosIntegral[1 - Coth[a + b*x]])/(8*b) + (3*Cos[1]
*CosIntegral[1 + Coth[a + b*x]])/(8*b) + (Cos[3]*CosIntegral[3 + 3*Coth[a + b*x]])/(8*b) - (Sin[3]*SinIntegral
[3 - 3*Coth[a + b*x]])/(8*b) - (3*Sin[1]*SinIntegral[1 - Coth[a + b*x]])/(8*b) + (3*Sin[1]*SinIntegral[1 + Cot
h[a + b*x]])/(8*b) + (Sin[3]*SinIntegral[3 + 3*Coth[a + b*x]])/(8*b)

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3393

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Int[ExpandTrigReduce[(c + d*x)^m, Sin
[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1])
)

Rule 6857

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\cos ^3(x)}{1-x^2} \, dx,x,\coth (a+b x)\right )}{b} \\ & = \frac {\text {Subst}\left (\int \left (-\frac {\cos ^3(x)}{2 (-1+x)}+\frac {\cos ^3(x)}{2 (1+x)}\right ) \, dx,x,\coth (a+b x)\right )}{b} \\ & = -\frac {\text {Subst}\left (\int \frac {\cos ^3(x)}{-1+x} \, dx,x,\coth (a+b x)\right )}{2 b}+\frac {\text {Subst}\left (\int \frac {\cos ^3(x)}{1+x} \, dx,x,\coth (a+b x)\right )}{2 b} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {3 \cos (x)}{4 (-1+x)}+\frac {\cos (3 x)}{4 (-1+x)}\right ) \, dx,x,\coth (a+b x)\right )}{2 b}+\frac {\text {Subst}\left (\int \left (\frac {3 \cos (x)}{4 (1+x)}+\frac {\cos (3 x)}{4 (1+x)}\right ) \, dx,x,\coth (a+b x)\right )}{2 b} \\ & = -\frac {\text {Subst}\left (\int \frac {\cos (3 x)}{-1+x} \, dx,x,\coth (a+b x)\right )}{8 b}+\frac {\text {Subst}\left (\int \frac {\cos (3 x)}{1+x} \, dx,x,\coth (a+b x)\right )}{8 b}-\frac {3 \text {Subst}\left (\int \frac {\cos (x)}{-1+x} \, dx,x,\coth (a+b x)\right )}{8 b}+\frac {3 \text {Subst}\left (\int \frac {\cos (x)}{1+x} \, dx,x,\coth (a+b x)\right )}{8 b} \\ & = -\frac {(3 \cos (1)) \text {Subst}\left (\int \frac {\cos (1-x)}{-1+x} \, dx,x,\coth (a+b x)\right )}{8 b}+\frac {(3 \cos (1)) \text {Subst}\left (\int \frac {\cos (1+x)}{1+x} \, dx,x,\coth (a+b x)\right )}{8 b}-\frac {\cos (3) \text {Subst}\left (\int \frac {\cos (3-3 x)}{-1+x} \, dx,x,\coth (a+b x)\right )}{8 b}+\frac {\cos (3) \text {Subst}\left (\int \frac {\cos (3+3 x)}{1+x} \, dx,x,\coth (a+b x)\right )}{8 b}-\frac {(3 \sin (1)) \text {Subst}\left (\int \frac {\sin (1-x)}{-1+x} \, dx,x,\coth (a+b x)\right )}{8 b}+\frac {(3 \sin (1)) \text {Subst}\left (\int \frac {\sin (1+x)}{1+x} \, dx,x,\coth (a+b x)\right )}{8 b}-\frac {\sin (3) \text {Subst}\left (\int \frac {\sin (3-3 x)}{-1+x} \, dx,x,\coth (a+b x)\right )}{8 b}+\frac {\sin (3) \text {Subst}\left (\int \frac {\sin (3+3 x)}{1+x} \, dx,x,\coth (a+b x)\right )}{8 b} \\ & = -\frac {\cos (3) \operatorname {CosIntegral}(3-3 \coth (a+b x))}{8 b}-\frac {3 \cos (1) \operatorname {CosIntegral}(1-\coth (a+b x))}{8 b}+\frac {3 \cos (1) \operatorname {CosIntegral}(1+\coth (a+b x))}{8 b}+\frac {\cos (3) \operatorname {CosIntegral}(3+3 \coth (a+b x))}{8 b}-\frac {\sin (3) \text {Si}(3-3 \coth (a+b x))}{8 b}-\frac {3 \sin (1) \text {Si}(1-\coth (a+b x))}{8 b}+\frac {3 \sin (1) \text {Si}(1+\coth (a+b x))}{8 b}+\frac {\sin (3) \text {Si}(3+3 \coth (a+b x))}{8 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.68 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.79 \[ \int \cos ^3(\coth (a+b x)) \, dx=\frac {-2 \cos (3) \operatorname {CosIntegral}(3-3 \coth (a+b x))-6 \cos (1) \operatorname {CosIntegral}(1-\coth (a+b x))+6 \cos (1) \operatorname {CosIntegral}(1+\coth (a+b x))+2 \cos (3) \operatorname {CosIntegral}(3+3 \coth (a+b x))-2 \sin (3) \text {Si}(3-3 \coth (a+b x))-6 \sin (1) \text {Si}(1-\coth (a+b x))+6 \sin (1) \text {Si}(1+\coth (a+b x))+2 \sin (3) \text {Si}(3+3 \coth (a+b x))}{16 b} \]

[In]

Integrate[Cos[Coth[a + b*x]]^3,x]

[Out]

(-2*Cos[3]*CosIntegral[3 - 3*Coth[a + b*x]] - 6*Cos[1]*CosIntegral[1 - Coth[a + b*x]] + 6*Cos[1]*CosIntegral[1
 + Coth[a + b*x]] + 2*Cos[3]*CosIntegral[3 + 3*Coth[a + b*x]] - 2*Sin[3]*SinIntegral[3 - 3*Coth[a + b*x]] - 6*
Sin[1]*SinIntegral[1 - Coth[a + b*x]] + 6*Sin[1]*SinIntegral[1 + Coth[a + b*x]] + 2*Sin[3]*SinIntegral[3 + 3*C
oth[a + b*x]])/(16*b)

Maple [A] (verified)

Time = 2.55 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.75

method result size
derivativedivides \(\frac {\frac {\operatorname {Si}\left (-3+3 \coth \left (b x +a \right )\right ) \sin \left (3\right )}{8}-\frac {\operatorname {Ci}\left (-3+3 \coth \left (b x +a \right )\right ) \cos \left (3\right )}{8}+\frac {\operatorname {Si}\left (3+3 \coth \left (b x +a \right )\right ) \sin \left (3\right )}{8}+\frac {\operatorname {Ci}\left (3+3 \coth \left (b x +a \right )\right ) \cos \left (3\right )}{8}+\frac {3 \,\operatorname {Si}\left (\coth \left (b x +a \right )-1\right ) \sin \left (1\right )}{8}-\frac {3 \,\operatorname {Ci}\left (\coth \left (b x +a \right )-1\right ) \cos \left (1\right )}{8}+\frac {3 \,\operatorname {Si}\left (\coth \left (b x +a \right )+1\right ) \sin \left (1\right )}{8}+\frac {3 \,\operatorname {Ci}\left (\coth \left (b x +a \right )+1\right ) \cos \left (1\right )}{8}}{b}\) \(118\)
default \(\frac {\frac {\operatorname {Si}\left (-3+3 \coth \left (b x +a \right )\right ) \sin \left (3\right )}{8}-\frac {\operatorname {Ci}\left (-3+3 \coth \left (b x +a \right )\right ) \cos \left (3\right )}{8}+\frac {\operatorname {Si}\left (3+3 \coth \left (b x +a \right )\right ) \sin \left (3\right )}{8}+\frac {\operatorname {Ci}\left (3+3 \coth \left (b x +a \right )\right ) \cos \left (3\right )}{8}+\frac {3 \,\operatorname {Si}\left (\coth \left (b x +a \right )-1\right ) \sin \left (1\right )}{8}-\frac {3 \,\operatorname {Ci}\left (\coth \left (b x +a \right )-1\right ) \cos \left (1\right )}{8}+\frac {3 \,\operatorname {Si}\left (\coth \left (b x +a \right )+1\right ) \sin \left (1\right )}{8}+\frac {3 \,\operatorname {Ci}\left (\coth \left (b x +a \right )+1\right ) \cos \left (1\right )}{8}}{b}\) \(118\)
risch \(\frac {{\mathrm e}^{-3 i} \operatorname {Ei}_{1}\left (\frac {6 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}\right )}{16 b}-\frac {{\mathrm e}^{3 i} \operatorname {Ei}_{1}\left (\frac {6 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}+6 i\right )}{16 b}-\frac {{\mathrm e}^{-3 i} \operatorname {Ei}_{1}\left (-\frac {6 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}-6 i\right )}{16 b}-\frac {i \operatorname {csgn}\left (\frac {{\mathrm e}^{-a}}{-{\mathrm e}^{2 b x +a}+{\mathrm e}^{-a}}\right ) \pi \,{\mathrm e}^{3 i}}{16 b}-\frac {i \operatorname {Si}\left (\frac {6 \,{\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}\right ) {\mathrm e}^{3 i}}{8 b}+\frac {\operatorname {Ei}_{1}\left (\frac {6 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}\right ) {\mathrm e}^{3 i}}{16 b}-\frac {3 \,{\mathrm e}^{i} \operatorname {Ei}_{1}\left (\frac {2 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}+2 i\right )}{16 b}+\frac {3 \,{\mathrm e}^{-i} \operatorname {Ei}_{1}\left (\frac {2 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}\right )}{16 b}-\frac {3 i \operatorname {csgn}\left (\frac {{\mathrm e}^{-a}}{-{\mathrm e}^{2 b x +a}+{\mathrm e}^{-a}}\right ) {\mathrm e}^{i} \pi }{16 b}-\frac {3 i \operatorname {Si}\left (\frac {2 \,{\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}\right ) {\mathrm e}^{i}}{8 b}+\frac {3 \,{\mathrm e}^{i} \operatorname {Ei}_{1}\left (\frac {2 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}\right )}{16 b}-\frac {3 \,{\mathrm e}^{-i} \operatorname {Ei}_{1}\left (-\frac {2 i {\mathrm e}^{-a}}{{\mathrm e}^{2 b x +a}-{\mathrm e}^{-a}}-2 i\right )}{16 b}\) \(406\)

[In]

int(cos(coth(b*x+a))^3,x,method=_RETURNVERBOSE)

[Out]

1/b*(1/8*Si(-3+3*coth(b*x+a))*sin(3)-1/8*Ci(-3+3*coth(b*x+a))*cos(3)+1/8*Si(3+3*coth(b*x+a))*sin(3)+1/8*Ci(3+3
*coth(b*x+a))*cos(3)+3/8*Si(coth(b*x+a)-1)*sin(1)-3/8*Ci(coth(b*x+a)-1)*cos(1)+3/8*Si(coth(b*x+a)+1)*sin(1)+3/
8*Ci(coth(b*x+a)+1)*cos(1))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.31 (sec) , antiderivative size = 698, normalized size of antiderivative = 4.45 \[ \int \cos ^3(\coth (a+b x)) \, dx=\text {Too large to display} \]

[In]

integrate(cos(coth(b*x+a))^3,x, algorithm="fricas")

[Out]

1/16*((cos(3)^2*cos(1) - (cos(1) + I*sin(1))*sin(3)^2 + 2*I*(cos(3)*cos(1) + I*cos(3)*sin(1))*sin(3) + I*(cos(
3)^2 + 1)*sin(1) + cos(1))*cos_integral(3*(cosh(b*x + a) + sinh(b*x + a))/sinh(b*x + a)) - 3*(-2*I*cos(3)*cos(
1)*sin(1) + cos(3)*sin(1)^2 - (cos(1)^2 + 1)*cos(3) - I*(cos(1)^2 + 2*I*cos(1)*sin(1) - sin(1)^2 + 1)*sin(3))*
cos_integral((cosh(b*x + a) + sinh(b*x + a))/sinh(b*x + a)) - (cos(3)^2*cos(1) - (cos(1) + I*sin(1))*sin(3)^2
+ 2*I*(cos(3)*cos(1) + I*cos(3)*sin(1))*sin(3) + I*(cos(3)^2 + 1)*sin(1) + cos(1))*cos_integral(6/(cosh(b*x +
a)^2 + 2*cosh(b*x + a)*sinh(b*x + a) + sinh(b*x + a)^2 - 1)) - 3*(2*I*cos(3)*cos(1)*sin(1) - cos(3)*sin(1)^2 +
 (cos(1)^2 + 1)*cos(3) + I*(cos(1)^2 + 2*I*cos(1)*sin(1) - sin(1)^2 + 1)*sin(3))*cos_integral(2/(cosh(b*x + a)
^2 + 2*cosh(b*x + a)*sinh(b*x + a) + sinh(b*x + a)^2 - 1)) + (-I*cos(3)^2*cos(1) - (-I*cos(1) + sin(1))*sin(3)
^2 - 2*I*(I*cos(3)*cos(1) - cos(3)*sin(1))*sin(3) + I*(-I*cos(3)^2 + I)*sin(1) + I*cos(1))*sin_integral(3*(cos
h(b*x + a) + sinh(b*x + a))/sinh(b*x + a)) + 3*(2*cos(3)*cos(1)*sin(1) + I*cos(3)*sin(1)^2 - (I*cos(1)^2 - I)*
cos(3) - I*(I*cos(1)^2 - 2*cos(1)*sin(1) - I*sin(1)^2 - I)*sin(3))*sin_integral((cosh(b*x + a) + sinh(b*x + a)
)/sinh(b*x + a)) + (-I*cos(3)^2*cos(1) - (-I*cos(1) + sin(1))*sin(3)^2 - 2*I*(I*cos(3)*cos(1) - cos(3)*sin(1))
*sin(3) + I*(-I*cos(3)^2 + I)*sin(1) + I*cos(1))*sin_integral(6/(cosh(b*x + a)^2 + 2*cosh(b*x + a)*sinh(b*x +
a) + sinh(b*x + a)^2 - 1)) + 3*(2*cos(3)*cos(1)*sin(1) + I*cos(3)*sin(1)^2 - (I*cos(1)^2 - I)*cos(3) - I*(I*co
s(1)^2 - 2*cos(1)*sin(1) - I*sin(1)^2 - I)*sin(3))*sin_integral(2/(cosh(b*x + a)^2 + 2*cosh(b*x + a)*sinh(b*x
+ a) + sinh(b*x + a)^2 - 1)))/(b*cos(3)*cos(1) + I*b*cos(3)*sin(1) + I*(b*cos(1) + I*b*sin(1))*sin(3))

Sympy [F]

\[ \int \cos ^3(\coth (a+b x)) \, dx=\int \cos ^{3}{\left (\coth {\left (a + b x \right )} \right )}\, dx \]

[In]

integrate(cos(coth(b*x+a))**3,x)

[Out]

Integral(cos(coth(a + b*x))**3, x)

Maxima [F]

\[ \int \cos ^3(\coth (a+b x)) \, dx=\int { \cos \left (\coth \left (b x + a\right )\right )^{3} \,d x } \]

[In]

integrate(cos(coth(b*x+a))^3,x, algorithm="maxima")

[Out]

integrate(cos(coth(b*x + a))^3, x)

Giac [F]

\[ \int \cos ^3(\coth (a+b x)) \, dx=\int { \cos \left (\coth \left (b x + a\right )\right )^{3} \,d x } \]

[In]

integrate(cos(coth(b*x+a))^3,x, algorithm="giac")

[Out]

integrate(cos(coth(b*x + a))^3, x)

Mupad [F(-1)]

Timed out. \[ \int \cos ^3(\coth (a+b x)) \, dx=\int {\cos \left (\mathrm {coth}\left (a+b\,x\right )\right )}^3 \,d x \]

[In]

int(cos(coth(a + b*x))^3,x)

[Out]

int(cos(coth(a + b*x))^3, x)