3.26 \(\int \frac {\cos ^4(a+b x)}{x} \, dx\)

Optimal. Leaf size=59 \[ \frac {1}{2} \cos (2 a) \text {Ci}(2 b x)+\frac {1}{8} \cos (4 a) \text {Ci}(4 b x)-\frac {1}{2} \sin (2 a) \text {Si}(2 b x)-\frac {1}{8} \sin (4 a) \text {Si}(4 b x)+\frac {3 \log (x)}{8} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3312, 3303, 3299, 3302} \[ \frac {1}{2} \cos (2 a) \text {CosIntegral}(2 b x)+\frac {1}{8} \cos (4 a) \text {CosIntegral}(4 b x)-\frac {1}{2} \sin (2 a) \text {Si}(2 b x)-\frac {1}{8} \sin (4 a) \text {Si}(4 b x)+\frac {3 \log (x)}{8} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^4/x,x]

[Out]

(Cos[2*a]*CosIntegral[2*b*x])/2 + (Cos[4*a]*CosIntegral[4*b*x])/8 + (3*Log[x])/8 - (Sin[2*a]*SinIntegral[2*b*x
])/2 - (Sin[4*a]*SinIntegral[4*b*x])/8

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]

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 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])
)

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 52, normalized size = 0.88 \[ \frac {1}{8} (4 \cos (2 a) \text {Ci}(2 b x)+\cos (4 a) \text {Ci}(4 b x)-4 \sin (2 a) \text {Si}(2 b x)-\sin (4 a) \text {Si}(4 b x)+3 \log (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^4/x,x]

[Out]

(4*Cos[2*a]*CosIntegral[2*b*x] + Cos[4*a]*CosIntegral[4*b*x] + 3*Log[x] - 4*Sin[2*a]*SinIntegral[2*b*x] - Sin[
4*a]*SinIntegral[4*b*x])/8

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 61, normalized size = 1.03 \[ \frac {1}{16} \, {\left (\operatorname {Ci}\left (4 \, b x\right ) + \operatorname {Ci}\left (-4 \, b x\right )\right )} \cos \left (4 \, a\right ) + \frac {1}{4} \, {\left (\operatorname {Ci}\left (2 \, b x\right ) + \operatorname {Ci}\left (-2 \, b x\right )\right )} \cos \left (2 \, a\right ) - \frac {1}{8} \, \sin \left (4 \, a\right ) \operatorname {Si}\left (4 \, b x\right ) - \frac {1}{2} \, \sin \left (2 \, a\right ) \operatorname {Si}\left (2 \, b x\right ) + \frac {3}{8} \, \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/x,x, algorithm="fricas")

[Out]

1/16*(cos_integral(4*b*x) + cos_integral(-4*b*x))*cos(4*a) + 1/4*(cos_integral(2*b*x) + cos_integral(-2*b*x))*
cos(2*a) - 1/8*sin(4*a)*sin_integral(4*b*x) - 1/2*sin(2*a)*sin_integral(2*b*x) + 3/8*log(x)

________________________________________________________________________________________

giac [C]  time = 0.49, size = 428, normalized size = 7.25 \[ \frac {6 \, \log \left ({\left | x \right |}\right ) \tan \left (2 \, a\right )^{2} \tan \relax (a)^{2} - \Re \left (\operatorname {Ci}\left (4 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} \tan \relax (a)^{2} - 4 \, \Re \left (\operatorname {Ci}\left (2 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} \tan \relax (a)^{2} - 4 \, \Re \left (\operatorname {Ci}\left (-2 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} \tan \relax (a)^{2} - \Re \left (\operatorname {Ci}\left (-4 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} \tan \relax (a)^{2} - 8 \, \Im \left (\operatorname {Ci}\left (2 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} \tan \relax (a) + 8 \, \Im \left (\operatorname {Ci}\left (-2 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} \tan \relax (a) - 16 \, \operatorname {Si}\left (2 \, b x\right ) \tan \left (2 \, a\right )^{2} \tan \relax (a) - 2 \, \Im \left (\operatorname {Ci}\left (4 \, b x\right ) \right ) \tan \left (2 \, a\right ) \tan \relax (a)^{2} + 2 \, \Im \left (\operatorname {Ci}\left (-4 \, b x\right ) \right ) \tan \left (2 \, a\right ) \tan \relax (a)^{2} - 4 \, \operatorname {Si}\left (4 \, b x\right ) \tan \left (2 \, a\right ) \tan \relax (a)^{2} + 6 \, \log \left ({\left | x \right |}\right ) \tan \left (2 \, a\right )^{2} - \Re \left (\operatorname {Ci}\left (4 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} + 4 \, \Re \left (\operatorname {Ci}\left (2 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} + 4 \, \Re \left (\operatorname {Ci}\left (-2 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} - \Re \left (\operatorname {Ci}\left (-4 \, b x\right ) \right ) \tan \left (2 \, a\right )^{2} + 6 \, \log \left ({\left | x \right |}\right ) \tan \relax (a)^{2} + \Re \left (\operatorname {Ci}\left (4 \, b x\right ) \right ) \tan \relax (a)^{2} - 4 \, \Re \left (\operatorname {Ci}\left (2 \, b x\right ) \right ) \tan \relax (a)^{2} - 4 \, \Re \left (\operatorname {Ci}\left (-2 \, b x\right ) \right ) \tan \relax (a)^{2} + \Re \left (\operatorname {Ci}\left (-4 \, b x\right ) \right ) \tan \relax (a)^{2} - 2 \, \Im \left (\operatorname {Ci}\left (4 \, b x\right ) \right ) \tan \left (2 \, a\right ) + 2 \, \Im \left (\operatorname {Ci}\left (-4 \, b x\right ) \right ) \tan \left (2 \, a\right ) - 4 \, \operatorname {Si}\left (4 \, b x\right ) \tan \left (2 \, a\right ) - 8 \, \Im \left (\operatorname {Ci}\left (2 \, b x\right ) \right ) \tan \relax (a) + 8 \, \Im \left (\operatorname {Ci}\left (-2 \, b x\right ) \right ) \tan \relax (a) - 16 \, \operatorname {Si}\left (2 \, b x\right ) \tan \relax (a) + 6 \, \log \left ({\left | x \right |}\right ) + \Re \left (\operatorname {Ci}\left (4 \, b x\right ) \right ) + 4 \, \Re \left (\operatorname {Ci}\left (2 \, b x\right ) \right ) + 4 \, \Re \left (\operatorname {Ci}\left (-2 \, b x\right ) \right ) + \Re \left (\operatorname {Ci}\left (-4 \, b x\right ) \right )}{16 \, {\left (\tan \left (2 \, a\right )^{2} \tan \relax (a)^{2} + \tan \left (2 \, a\right )^{2} + \tan \relax (a)^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/x,x, algorithm="giac")

[Out]

1/16*(6*log(abs(x))*tan(2*a)^2*tan(a)^2 - real_part(cos_integral(4*b*x))*tan(2*a)^2*tan(a)^2 - 4*real_part(cos
_integral(2*b*x))*tan(2*a)^2*tan(a)^2 - 4*real_part(cos_integral(-2*b*x))*tan(2*a)^2*tan(a)^2 - real_part(cos_
integral(-4*b*x))*tan(2*a)^2*tan(a)^2 - 8*imag_part(cos_integral(2*b*x))*tan(2*a)^2*tan(a) + 8*imag_part(cos_i
ntegral(-2*b*x))*tan(2*a)^2*tan(a) - 16*sin_integral(2*b*x)*tan(2*a)^2*tan(a) - 2*imag_part(cos_integral(4*b*x
))*tan(2*a)*tan(a)^2 + 2*imag_part(cos_integral(-4*b*x))*tan(2*a)*tan(a)^2 - 4*sin_integral(4*b*x)*tan(2*a)*ta
n(a)^2 + 6*log(abs(x))*tan(2*a)^2 - real_part(cos_integral(4*b*x))*tan(2*a)^2 + 4*real_part(cos_integral(2*b*x
))*tan(2*a)^2 + 4*real_part(cos_integral(-2*b*x))*tan(2*a)^2 - real_part(cos_integral(-4*b*x))*tan(2*a)^2 + 6*
log(abs(x))*tan(a)^2 + real_part(cos_integral(4*b*x))*tan(a)^2 - 4*real_part(cos_integral(2*b*x))*tan(a)^2 - 4
*real_part(cos_integral(-2*b*x))*tan(a)^2 + real_part(cos_integral(-4*b*x))*tan(a)^2 - 2*imag_part(cos_integra
l(4*b*x))*tan(2*a) + 2*imag_part(cos_integral(-4*b*x))*tan(2*a) - 4*sin_integral(4*b*x)*tan(2*a) - 8*imag_part
(cos_integral(2*b*x))*tan(a) + 8*imag_part(cos_integral(-2*b*x))*tan(a) - 16*sin_integral(2*b*x)*tan(a) + 6*lo
g(abs(x)) + real_part(cos_integral(4*b*x)) + 4*real_part(cos_integral(2*b*x)) + 4*real_part(cos_integral(-2*b*
x)) + real_part(cos_integral(-4*b*x)))/(tan(2*a)^2*tan(a)^2 + tan(2*a)^2 + tan(a)^2 + 1)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 52, normalized size = 0.88 \[ -\frac {\Si \left (4 b x \right ) \sin \left (4 a \right )}{8}+\frac {\Ci \left (4 b x \right ) \cos \left (4 a \right )}{8}-\frac {\Si \left (2 b x \right ) \sin \left (2 a \right )}{2}+\frac {\Ci \left (2 b x \right ) \cos \left (2 a \right )}{2}+\frac {3 \ln \left (b x \right )}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^4/x,x)

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.81, size = 91, normalized size = 1.54 \[ -\frac {1}{16} \, {\left (E_{1}\left (4 i \, b x\right ) + E_{1}\left (-4 i \, b x\right )\right )} \cos \left (4 \, a\right ) - \frac {1}{4} \, {\left (E_{1}\left (2 i \, b x\right ) + E_{1}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right ) + \frac {1}{16} \, {\left (i \, E_{1}\left (4 i \, b x\right ) - i \, E_{1}\left (-4 i \, b x\right )\right )} \sin \left (4 \, a\right ) + \frac {1}{16} \, {\left (4 i \, E_{1}\left (2 i \, b x\right ) - 4 i \, E_{1}\left (-2 i \, b x\right )\right )} \sin \left (2 \, a\right ) + \frac {3}{8} \, \log \left (b x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/x,x, algorithm="maxima")

[Out]

-1/16*(exp_integral_e(1, 4*I*b*x) + exp_integral_e(1, -4*I*b*x))*cos(4*a) - 1/4*(exp_integral_e(1, 2*I*b*x) +
exp_integral_e(1, -2*I*b*x))*cos(2*a) + 1/16*(I*exp_integral_e(1, 4*I*b*x) - I*exp_integral_e(1, -4*I*b*x))*si
n(4*a) + 1/16*(4*I*exp_integral_e(1, 2*I*b*x) - 4*I*exp_integral_e(1, -2*I*b*x))*sin(2*a) + 3/8*log(b*x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {{\cos \left (a+b\,x\right )}^4}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)^4/x,x)

[Out]

int(cos(a + b*x)^4/x, x)

________________________________________________________________________________________

sympy [A]  time = 2.46, size = 60, normalized size = 1.02 \[ \frac {3 \log {\relax (x )}}{8} - \frac {\sin {\left (2 a \right )} \operatorname {Si}{\left (2 b x \right )}}{2} - \frac {\sin {\left (4 a \right )} \operatorname {Si}{\left (4 b x \right )}}{8} + \frac {\cos {\left (2 a \right )} \operatorname {Ci}{\left (2 b x \right )}}{2} + \frac {\cos {\left (4 a \right )} \operatorname {Ci}{\left (4 b x \right )}}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**4/x,x)

[Out]

3*log(x)/8 - sin(2*a)*Si(2*b*x)/2 - sin(4*a)*Si(4*b*x)/8 + cos(2*a)*Ci(2*b*x)/2 + cos(4*a)*Ci(4*b*x)/8

________________________________________________________________________________________