3.244 \(\int \cos ^3(\tanh (a+b x)) \, dx\)

Optimal. Leaf size=157 \[ -\frac{\cos (3) \text{CosIntegral}(3-3 \tanh (a+b x))}{8 b}-\frac{3 \cos (1) \text{CosIntegral}(1-\tanh (a+b x))}{8 b}+\frac{3 \cos (1) \text{CosIntegral}(\tanh (a+b x)+1)}{8 b}+\frac{\cos (3) \text{CosIntegral}(3 \tanh (a+b x)+3)}{8 b}-\frac{\sin (3) \text{Si}(3-3 \tanh (a+b x))}{8 b}-\frac{3 \sin (1) \text{Si}(1-\tanh (a+b x))}{8 b}+\frac{3 \sin (1) \text{Si}(\tanh (a+b x)+1)}{8 b}+\frac{\sin (3) \text{Si}(3 \tanh (a+b x)+3)}{8 b} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.372814, antiderivative size = 157, normalized size of antiderivative = 1., number of steps used = 19, number of rules used = 5, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.556, Rules used = {6725, 3312, 3303, 3299, 3302} \[ -\frac{\cos (3) \text{CosIntegral}(3-3 \tanh (a+b x))}{8 b}-\frac{3 \cos (1) \text{CosIntegral}(1-\tanh (a+b x))}{8 b}+\frac{3 \cos (1) \text{CosIntegral}(\tanh (a+b x)+1)}{8 b}+\frac{\cos (3) \text{CosIntegral}(3 \tanh (a+b x)+3)}{8 b}-\frac{\sin (3) \text{Si}(3-3 \tanh (a+b x))}{8 b}-\frac{3 \sin (1) \text{Si}(1-\tanh (a+b x))}{8 b}+\frac{3 \sin (1) \text{Si}(\tanh (a+b x)+1)}{8 b}+\frac{\sin (3) \text{Si}(3 \tanh (a+b x)+3)}{8 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6725

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]

Rule 3312

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 3303

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 3299

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 3302

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]

Rubi steps

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

Mathematica [A]  time = 0.262534, size = 124, normalized size = 0.79 \[ \frac{-2 \cos (3) \text{CosIntegral}(3-3 \tanh (a+b x))-6 \cos (1) \text{CosIntegral}(1-\tanh (a+b x))+6 \cos (1) \text{CosIntegral}(\tanh (a+b x)+1)+2 \cos (3) \text{CosIntegral}(3 \tanh (a+b x)+3)-2 \sin (3) \text{Si}(3-3 \tanh (a+b x))-6 \sin (1) \text{Si}(1-\tanh (a+b x))+6 \sin (1) \text{Si}(\tanh (a+b x)+1)+2 \sin (3) \text{Si}(3 \tanh (a+b x)+3)}{16 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*Cos[3]*CosIntegral[3 - 3*Tanh[a + b*x]] - 6*Cos[1]*CosIntegral[1 - Tanh[a + b*x]] + 6*Cos[1]*CosIntegral[1
 + Tanh[a + b*x]] + 2*Cos[3]*CosIntegral[3 + 3*Tanh[a + b*x]] - 2*Sin[3]*SinIntegral[3 - 3*Tanh[a + b*x]] - 6*
Sin[1]*SinIntegral[1 - Tanh[a + b*x]] + 6*Sin[1]*SinIntegral[1 + Tanh[a + b*x]] + 2*Sin[3]*SinIntegral[3 + 3*T
anh[a + b*x]])/(16*b)

________________________________________________________________________________________

Maple [A]  time = 0.023, size = 118, normalized size = 0.8 \begin{align*}{\frac{1}{b} \left ({\frac{{\it Si} \left ( 3+3\,\tanh \left ( bx+a \right ) \right ) \sin \left ( 3 \right ) }{8}}+{\frac{{\it Ci} \left ( 3+3\,\tanh \left ( bx+a \right ) \right ) \cos \left ( 3 \right ) }{8}}+{\frac{{\it Si} \left ( -3+3\,\tanh \left ( bx+a \right ) \right ) \sin \left ( 3 \right ) }{8}}-{\frac{{\it Ci} \left ( -3+3\,\tanh \left ( bx+a \right ) \right ) \cos \left ( 3 \right ) }{8}}+{\frac{3\,{\it Si} \left ( 1+\tanh \left ( bx+a \right ) \right ) \sin \left ( 1 \right ) }{8}}+{\frac{3\,{\it Ci} \left ( 1+\tanh \left ( bx+a \right ) \right ) \cos \left ( 1 \right ) }{8}}+{\frac{3\,{\it Si} \left ( -1+\tanh \left ( bx+a \right ) \right ) \sin \left ( 1 \right ) }{8}}-{\frac{3\,{\it Ci} \left ( -1+\tanh \left ( bx+a \right ) \right ) \cos \left ( 1 \right ) }{8}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (\tanh \left (b x + a\right )\right )^{3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.51146, size = 929, normalized size = 5.92 \begin{align*} \frac{\cos \left (3\right ) \operatorname{Ci}\left (\frac{6 \, e^{\left (2 \, b x + 2 \, a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) + 3 \, \cos \left (1\right ) \operatorname{Ci}\left (\frac{2 \, e^{\left (2 \, b x + 2 \, a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) + 3 \, \cos \left (1\right ) \operatorname{Ci}\left (-\frac{2 \, e^{\left (2 \, b x + 2 \, a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) + \cos \left (3\right ) \operatorname{Ci}\left (-\frac{6 \, e^{\left (2 \, b x + 2 \, a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) - \cos \left (3\right ) \operatorname{Ci}\left (\frac{6}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) - 3 \, \cos \left (1\right ) \operatorname{Ci}\left (\frac{2}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) - 3 \, \cos \left (1\right ) \operatorname{Ci}\left (-\frac{2}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) - \cos \left (3\right ) \operatorname{Ci}\left (-\frac{6}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) + 2 \, \sin \left (3\right ) \operatorname{Si}\left (\frac{6 \, e^{\left (2 \, b x + 2 \, a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) + 6 \, \sin \left (1\right ) \operatorname{Si}\left (\frac{2 \, e^{\left (2 \, b x + 2 \, a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) - 2 \, \sin \left (3\right ) \operatorname{Si}\left (\frac{6}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right ) - 6 \, \sin \left (1\right ) \operatorname{Si}\left (\frac{2}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\right )}{16 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/16*(cos(3)*cos_integral(6*e^(2*b*x + 2*a)/(e^(2*b*x + 2*a) + 1)) + 3*cos(1)*cos_integral(2*e^(2*b*x + 2*a)/(
e^(2*b*x + 2*a) + 1)) + 3*cos(1)*cos_integral(-2*e^(2*b*x + 2*a)/(e^(2*b*x + 2*a) + 1)) + cos(3)*cos_integral(
-6*e^(2*b*x + 2*a)/(e^(2*b*x + 2*a) + 1)) - cos(3)*cos_integral(6/(e^(2*b*x + 2*a) + 1)) - 3*cos(1)*cos_integr
al(2/(e^(2*b*x + 2*a) + 1)) - 3*cos(1)*cos_integral(-2/(e^(2*b*x + 2*a) + 1)) - cos(3)*cos_integral(-6/(e^(2*b
*x + 2*a) + 1)) + 2*sin(3)*sin_integral(6*e^(2*b*x + 2*a)/(e^(2*b*x + 2*a) + 1)) + 6*sin(1)*sin_integral(2*e^(
2*b*x + 2*a)/(e^(2*b*x + 2*a) + 1)) - 2*sin(3)*sin_integral(6/(e^(2*b*x + 2*a) + 1)) - 6*sin(1)*sin_integral(2
/(e^(2*b*x + 2*a) + 1)))/b

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos ^{3}{\left (\tanh{\left (a + b x \right )} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (\tanh \left (b x + a\right )\right )^{3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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