\(\int \frac {\cos ^4(a+b x)}{x^3} \, dx\) [28]

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

Optimal result

Integrand size = 12, antiderivative size = 90 \[ \int \frac {\cos ^4(a+b x)}{x^3} \, dx=-\frac {\cos ^4(a+b x)}{2 x^2}-b^2 \cos (2 a) \operatorname {CosIntegral}(2 b x)-b^2 \cos (4 a) \operatorname {CosIntegral}(4 b x)+\frac {2 b \cos ^3(a+b x) \sin (a+b x)}{x}+b^2 \sin (2 a) \text {Si}(2 b x)+b^2 \sin (4 a) \text {Si}(4 b x) \] Output:

-1/2*cos(b*x+a)^4/x^2-b^2*cos(2*a)*Ci(2*b*x)-b^2*cos(4*a)*Ci(4*b*x)+2*b*co 
s(b*x+a)^3*sin(b*x+a)/x+b^2*sin(2*a)*Si(2*b*x)+b^2*sin(4*a)*Si(4*b*x)
 

Mathematica [A] (verified)

Time = 0.38 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.32 \[ \int \frac {\cos ^4(a+b x)}{x^3} \, dx=-\frac {3+4 \cos (2 (a+b x))+\cos (4 (a+b x))+16 b^2 x^2 \cos (2 a) \operatorname {CosIntegral}(2 b x)+16 b^2 x^2 \cos (4 a) \operatorname {CosIntegral}(4 b x)-8 b x \sin (2 (a+b x))-4 b x \sin (4 (a+b x))-16 b^2 x^2 \sin (2 a) \text {Si}(2 b x)-16 b^2 x^2 \sin (4 a) \text {Si}(4 b x)}{16 x^2} \] Input:

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

Output:

-1/16*(3 + 4*Cos[2*(a + b*x)] + Cos[4*(a + b*x)] + 16*b^2*x^2*Cos[2*a]*Cos 
Integral[2*b*x] + 16*b^2*x^2*Cos[4*a]*CosIntegral[4*b*x] - 8*b*x*Sin[2*(a 
+ b*x)] - 4*b*x*Sin[4*(a + b*x)] - 16*b^2*x^2*Sin[2*a]*SinIntegral[2*b*x] 
- 16*b^2*x^2*Sin[4*a]*SinIntegral[4*b*x])/x^2
 

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.53, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3042, 3795, 3042, 3793, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin \left (a+b x+\frac {\pi }{2}\right )^4}{x^3}dx\)

\(\Big \downarrow \) 3795

\(\displaystyle -8 b^2 \int \frac {\cos ^4(a+b x)}{x}dx+6 b^2 \int \frac {\cos ^2(a+b x)}{x}dx-\frac {\cos ^4(a+b x)}{2 x^2}+\frac {2 b \sin (a+b x) \cos ^3(a+b x)}{x}\)

\(\Big \downarrow \) 3042

\(\displaystyle 6 b^2 \int \frac {\sin \left (a+b x+\frac {\pi }{2}\right )^2}{x}dx-8 b^2 \int \frac {\sin \left (a+b x+\frac {\pi }{2}\right )^4}{x}dx-\frac {\cos ^4(a+b x)}{2 x^2}+\frac {2 b \sin (a+b x) \cos ^3(a+b x)}{x}\)

\(\Big \downarrow \) 3793

\(\displaystyle 6 b^2 \int \left (\frac {\cos (2 a+2 b x)}{2 x}+\frac {1}{2 x}\right )dx-8 b^2 \int \left (\frac {\cos (2 a+2 b x)}{2 x}+\frac {\cos (4 a+4 b x)}{8 x}+\frac {3}{8 x}\right )dx-\frac {\cos ^4(a+b x)}{2 x^2}+\frac {2 b \sin (a+b x) \cos ^3(a+b x)}{x}\)

\(\Big \downarrow \) 2009

\(\displaystyle 6 b^2 \left (\frac {1}{2} \cos (2 a) \operatorname {CosIntegral}(2 b x)-\frac {1}{2} \sin (2 a) \text {Si}(2 b x)+\frac {\log (x)}{2}\right )-8 b^2 \left (\frac {1}{2} \cos (2 a) \operatorname {CosIntegral}(2 b x)+\frac {1}{8} \cos (4 a) \operatorname {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}\right )-\frac {\cos ^4(a+b x)}{2 x^2}+\frac {2 b \sin (a+b x) \cos ^3(a+b x)}{x}\)

Input:

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

Output:

-1/2*Cos[a + b*x]^4/x^2 + (2*b*Cos[a + b*x]^3*Sin[a + b*x])/x + 6*b^2*((Co 
s[2*a]*CosIntegral[2*b*x])/2 + Log[x]/2 - (Sin[2*a]*SinIntegral[2*b*x])/2) 
 - 8*b^2*((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)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3793
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> In 
t[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 3795
Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbo 
l] :> Simp[(c + d*x)^(m + 1)*((b*Sin[e + f*x])^n/(d*(m + 1))), x] + (-Simp[ 
b*f*n*(c + d*x)^(m + 2)*Cos[e + f*x]*((b*Sin[e + f*x])^(n - 1)/(d^2*(m + 1) 
*(m + 2))), x] + Simp[b^2*f^2*n*((n - 1)/(d^2*(m + 1)*(m + 2)))   Int[(c + 
d*x)^(m + 2)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[f^2*(n^2/(d^2*(m + 1)* 
(m + 2)))   Int[(c + d*x)^(m + 2)*(b*Sin[e + f*x])^n, x], x]) /; FreeQ[{b, 
c, d, e, f}, x] && GtQ[n, 1] && LtQ[m, -2]
 
Maple [A] (verified)

Time = 1.72 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.38

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.11 \[ \int \frac {\cos ^4(a+b x)}{x^3} \, dx=-\frac {2 \, b^{2} x^{2} \cos \left (4 \, a\right ) \operatorname {Ci}\left (4 \, b x\right ) + 2 \, b^{2} x^{2} \cos \left (2 \, a\right ) \operatorname {Ci}\left (2 \, b x\right ) - 4 \, b x \cos \left (b x + a\right )^{3} \sin \left (b x + a\right ) - 2 \, b^{2} x^{2} \sin \left (4 \, a\right ) \operatorname {Si}\left (4 \, b x\right ) - 2 \, b^{2} x^{2} \sin \left (2 \, a\right ) \operatorname {Si}\left (2 \, b x\right ) + \cos \left (b x + a\right )^{4}}{2 \, x^{2}} \] Input:

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

Output:

-1/2*(2*b^2*x^2*cos(4*a)*cos_integral(4*b*x) + 2*b^2*x^2*cos(2*a)*cos_inte 
gral(2*b*x) - 4*b*x*cos(b*x + a)^3*sin(b*x + a) - 2*b^2*x^2*sin(4*a)*sin_i 
ntegral(4*b*x) - 2*b^2*x^2*sin(2*a)*sin_integral(2*b*x) + cos(b*x + a)^4)/ 
x^2
 

Sympy [F]

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

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

Output:

Integral(cos(a + b*x)**4/x**3, x)
 

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.11 (sec) , antiderivative size = 790, normalized size of antiderivative = 8.78 \[ \int \frac {\cos ^4(a+b x)}{x^3} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/32*(((exp_integral_e(3, 4*I*b*x) + exp_integral_e(3, -4*I*b*x))*cos(2*a 
)^2 + (exp_integral_e(3, 4*I*b*x) + exp_integral_e(3, -4*I*b*x))*sin(2*a)^ 
2)*cos(4*a)^3 + ((-I*exp_integral_e(3, 4*I*b*x) + I*exp_integral_e(3, -4*I 
*b*x))*cos(2*a)^2 + (-I*exp_integral_e(3, 4*I*b*x) + I*exp_integral_e(3, - 
4*I*b*x))*sin(2*a)^2)*sin(4*a)^3 + 2*(2*(exp_integral_e(3, 2*I*b*x) + exp_ 
integral_e(3, -2*I*b*x))*cos(2*a)^3 + 2*(-I*exp_integral_e(3, 2*I*b*x) + I 
*exp_integral_e(3, -2*I*b*x))*sin(2*a)^3 + (2*(exp_integral_e(3, 2*I*b*x) 
+ exp_integral_e(3, -2*I*b*x))*cos(2*a) + 3)*sin(2*a)^2 + 2*(exp_integral_ 
e(3, 2*I*b*x) + exp_integral_e(3, -2*I*b*x))*cos(2*a) + 3*cos(2*a)^2 + 2*( 
(-I*exp_integral_e(3, 2*I*b*x) + I*exp_integral_e(3, -2*I*b*x))*cos(2*a)^2 
 - I*exp_integral_e(3, 2*I*b*x) + I*exp_integral_e(3, -2*I*b*x))*sin(2*a)) 
*cos(4*a)^2 + (4*(exp_integral_e(3, 2*I*b*x) + exp_integral_e(3, -2*I*b*x) 
)*cos(2*a)^3 + 4*(-I*exp_integral_e(3, 2*I*b*x) + I*exp_integral_e(3, -2*I 
*b*x))*sin(2*a)^3 + 2*(2*(exp_integral_e(3, 2*I*b*x) + exp_integral_e(3, - 
2*I*b*x))*cos(2*a) + 3)*sin(2*a)^2 + ((exp_integral_e(3, 4*I*b*x) + exp_in 
tegral_e(3, -4*I*b*x))*cos(2*a)^2 + (exp_integral_e(3, 4*I*b*x) + exp_inte 
gral_e(3, -4*I*b*x))*sin(2*a)^2)*cos(4*a) + 4*(exp_integral_e(3, 2*I*b*x) 
+ exp_integral_e(3, -2*I*b*x))*cos(2*a) + 6*cos(2*a)^2 + 4*((-I*exp_integr 
al_e(3, 2*I*b*x) + I*exp_integral_e(3, -2*I*b*x))*cos(2*a)^2 - I*exp_integ 
ral_e(3, 2*I*b*x) + I*exp_integral_e(3, -2*I*b*x))*sin(2*a))*sin(4*a)^2...
 

Giac [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.39 (sec) , antiderivative size = 3920, normalized size of antiderivative = 43.56 \[ \int \frac {\cos ^4(a+b x)}{x^3} \, dx=\text {Too large to display} \] Input:

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

Output:

1/8*(4*b^2*x^2*real_part(cos_integral(4*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan( 
2*a)^2*tan(a)^2 + 4*b^2*x^2*real_part(cos_integral(2*b*x))*tan(2*b*x)^2*ta 
n(b*x)^2*tan(2*a)^2*tan(a)^2 + 4*b^2*x^2*real_part(cos_integral(-2*b*x))*t 
an(2*b*x)^2*tan(b*x)^2*tan(2*a)^2*tan(a)^2 + 4*b^2*x^2*real_part(cos_integ 
ral(-4*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2*tan(a)^2 + 8*b^2*x^2*imag_ 
part(cos_integral(2*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2*tan(a) - 8*b^ 
2*x^2*imag_part(cos_integral(-2*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2*t 
an(a) + 16*b^2*x^2*sin_integral(2*b*x)*tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2* 
tan(a) + 8*b^2*x^2*imag_part(cos_integral(4*b*x))*tan(2*b*x)^2*tan(b*x)^2* 
tan(2*a)*tan(a)^2 - 8*b^2*x^2*imag_part(cos_integral(-4*b*x))*tan(2*b*x)^2 
*tan(b*x)^2*tan(2*a)*tan(a)^2 + 16*b^2*x^2*sin_integral(4*b*x)*tan(2*b*x)^ 
2*tan(b*x)^2*tan(2*a)*tan(a)^2 + 4*b^2*x^2*real_part(cos_integral(4*b*x))* 
tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2 - 4*b^2*x^2*real_part(cos_integral(2*b* 
x))*tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2 - 4*b^2*x^2*real_part(cos_integral( 
-2*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2 + 4*b^2*x^2*real_part(cos_inte 
gral(-4*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(2*a)^2 - 4*b^2*x^2*real_part(cos 
_integral(4*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(a)^2 + 4*b^2*x^2*real_part(c 
os_integral(2*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(a)^2 + 4*b^2*x^2*real_part 
(cos_integral(-2*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(a)^2 - 4*b^2*x^2*real_p 
art(cos_integral(-4*b*x))*tan(2*b*x)^2*tan(b*x)^2*tan(a)^2 + 4*b^2*x^2*...
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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