\(\int \cos ^3(a+b x) \cos ^3(c+b x) \, dx\) [311]

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

Optimal result

Integrand size = 17, antiderivative size = 126 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\frac {1}{32} x (9 \cos (a-c)+\cos (3 (a-c)))-\frac {3 \sin (a-3 c-2 b x)}{64 b}+\frac {3 \sin (3 a-c+2 b x)}{64 b}+\frac {9 \sin (a+c+2 b x)}{64 b}+\frac {3 \sin (3 a+c+4 b x)}{128 b}+\frac {3 \sin (a+3 c+4 b x)}{128 b}+\frac {\sin (3 (a+c)+6 b x)}{192 b} \] Output:

1/32*x*(9*cos(a-c)+cos(3*a-3*c))-3/64*sin(-2*b*x+a-3*c)/b+3/64*sin(2*b*x+3 
*a-c)/b+9/64*sin(2*b*x+a+c)/b+3/128*sin(4*b*x+3*a+c)/b+3/128*sin(4*b*x+a+3 
*c)/b+1/192*sin(6*b*x+3*a+3*c)/b
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.81 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\frac {108 b x \cos (a-c)+12 b x \cos (3 (a-c))-18 \sin (a-3 c-2 b x)+18 \sin (3 a-c+2 b x)+54 \sin (a+c+2 b x)+2 \sin (3 (a+c+2 b x))+9 \sin (3 a+c+4 b x)+9 \sin (a+3 c+4 b x)}{384 b} \] Input:

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

Output:

(108*b*x*Cos[a - c] + 12*b*x*Cos[3*(a - c)] - 18*Sin[a - 3*c - 2*b*x] + 18 
*Sin[3*a - c + 2*b*x] + 54*Sin[a + c + 2*b*x] + 2*Sin[3*(a + c + 2*b*x)] + 
 9*Sin[3*a + c + 4*b*x] + 9*Sin[a + 3*c + 4*b*x])/(384*b)
 

Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {5081, 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 \cos ^3(a+b x) \cos ^3(b x+c) \, dx\)

\(\Big \downarrow \) 5081

\(\displaystyle \int \left (\frac {3}{32} \cos (a-2 b x-3 c)+\frac {3}{32} \cos (3 a+2 b x-c)+\frac {9}{32} \cos (a+2 b x+c)+\frac {3}{32} \cos (3 a+4 b x+c)+\frac {3}{32} \cos (a+4 b x+3 c)+\frac {1}{32} \cos (3 (a+c)+6 b x)+\frac {1}{32} \cos (3 a-3 c)+\frac {9}{32} \cos (a-c)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {3 \sin (a-2 b x-3 c)}{64 b}+\frac {3 \sin (3 a+2 b x-c)}{64 b}+\frac {9 \sin (a+2 b x+c)}{64 b}+\frac {3 \sin (3 a+4 b x+c)}{128 b}+\frac {3 \sin (a+4 b x+3 c)}{128 b}+\frac {\sin (3 (a+c)+6 b x)}{192 b}+\frac {1}{32} x (9 \cos (a-c)+\cos (3 (a-c)))\)

Input:

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

Output:

(x*(9*Cos[a - c] + Cos[3*(a - c)]))/32 - (3*Sin[a - 3*c - 2*b*x])/(64*b) + 
 (3*Sin[3*a - c + 2*b*x])/(64*b) + (9*Sin[a + c + 2*b*x])/(64*b) + (3*Sin[ 
3*a + c + 4*b*x])/(128*b) + (3*Sin[a + 3*c + 4*b*x])/(128*b) + Sin[3*(a + 
c) + 6*b*x]/(192*b)
 

Defintions of rubi rules used

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

rule 5081
Int[Cos[v_]^(p_.)*Cos[w_]^(q_.), x_Symbol] :> Int[ExpandTrigReduce[Cos[v]^p 
*Cos[w]^q, x], x] /; ((PolynomialQ[v, x] && PolynomialQ[w, x]) || (Binomial 
Q[{v, w}, x] && IndependentQ[Cancel[v/w], x])) && IGtQ[p, 0] && IGtQ[q, 0]
 
Maple [A] (verified)

Time = 7.12 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.90

method result size
default \(\frac {9 x \cos \left (a -c \right )}{32}+\frac {x \cos \left (3 a -3 c \right )}{32}-\frac {3 \sin \left (-2 b x +a -3 c \right )}{64 b}+\frac {9 \sin \left (2 b x +a +c \right )}{64 b}+\frac {3 \sin \left (2 b x +3 a -c \right )}{64 b}+\frac {3 \sin \left (4 b x +a +3 c \right )}{128 b}+\frac {3 \sin \left (4 b x +3 a +c \right )}{128 b}+\frac {\sin \left (6 b x +3 a +3 c \right )}{192 b}\) \(114\)
risch \(\frac {9 x \cos \left (a -c \right )}{32}+\frac {x \cos \left (3 a -3 c \right )}{32}-\frac {3 \sin \left (-2 b x +a -3 c \right )}{64 b}+\frac {9 \sin \left (2 b x +a +c \right )}{64 b}+\frac {3 \sin \left (2 b x +3 a -c \right )}{64 b}+\frac {3 \sin \left (4 b x +a +3 c \right )}{128 b}+\frac {3 \sin \left (4 b x +3 a +c \right )}{128 b}+\frac {\sin \left (6 b x +3 a +3 c \right )}{192 b}\) \(114\)
parallelrisch \(\frac {-29 \sin \left (3 a -3 c \right )+12 b x \cos \left (3 a -3 c \right )+108 x \cos \left (a -c \right ) b +18 \sin \left (2 b x +3 a -c \right )+9 \sin \left (4 b x +3 a +c \right )+2 \sin \left (6 b x +3 a +3 c \right )+54 \sin \left (2 b x +a +c \right )-18 \sin \left (-2 b x +a -3 c \right )+9 \sin \left (4 b x +a +3 c \right )-45 \sin \left (a -c \right )}{384 b}\) \(121\)
orering \(\text {Expression too large to display}\) \(1006\)

Input:

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

Output:

9/32*x*cos(a-c)+1/32*x*cos(3*a-3*c)-3/64*sin(-2*b*x+a-3*c)/b+9/64*sin(2*b* 
x+a+c)/b+3/64*sin(2*b*x+3*a-c)/b+3/128*sin(4*b*x+a+3*c)/b+3/128*sin(4*b*x+ 
3*a+c)/b+1/192*sin(6*b*x+3*a+3*c)/b
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.37 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\frac {6 \, b x \cos \left (-a + c\right )^{3} + 9 \, b x \cos \left (-a + c\right ) + {\left (8 \, {\left (4 \, \cos \left (-a + c\right )^{3} - 3 \, \cos \left (-a + c\right )\right )} \cos \left (b x + c\right )^{5} + 2 \, {\left (2 \, \cos \left (-a + c\right )^{3} + 3 \, \cos \left (-a + c\right )\right )} \cos \left (b x + c\right )^{3} + 3 \, {\left (2 \, \cos \left (-a + c\right )^{3} + 3 \, \cos \left (-a + c\right )\right )} \cos \left (b x + c\right )\right )} \sin \left (b x + c\right ) - 4 \, {\left (2 \, {\left (4 \, \cos \left (-a + c\right )^{2} - 1\right )} \cos \left (b x + c\right )^{6} - 3 \, {\left (\cos \left (-a + c\right )^{2} - 1\right )} \cos \left (b x + c\right )^{4}\right )} \sin \left (-a + c\right )}{48 \, b} \] Input:

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

Output:

1/48*(6*b*x*cos(-a + c)^3 + 9*b*x*cos(-a + c) + (8*(4*cos(-a + c)^3 - 3*co 
s(-a + c))*cos(b*x + c)^5 + 2*(2*cos(-a + c)^3 + 3*cos(-a + c))*cos(b*x + 
c)^3 + 3*(2*cos(-a + c)^3 + 3*cos(-a + c))*cos(b*x + c))*sin(b*x + c) - 4* 
(2*(4*cos(-a + c)^2 - 1)*cos(b*x + c)^6 - 3*(cos(-a + c)^2 - 1)*cos(b*x + 
c)^4)*sin(-a + c))/b
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 406 vs. \(2 (117) = 234\).

Time = 4.97 (sec) , antiderivative size = 406, normalized size of antiderivative = 3.22 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\begin {cases} \frac {5 x \sin ^{3}{\left (a + b x \right )} \sin ^{3}{\left (b x + c \right )}}{16} + \frac {3 x \sin ^{3}{\left (a + b x \right )} \sin {\left (b x + c \right )} \cos ^{2}{\left (b x + c \right )}}{16} + \frac {9 x \sin ^{2}{\left (a + b x \right )} \sin ^{2}{\left (b x + c \right )} \cos {\left (a + b x \right )} \cos {\left (b x + c \right )}}{16} + \frac {3 x \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )} \cos ^{3}{\left (b x + c \right )}}{16} + \frac {3 x \sin {\left (a + b x \right )} \sin ^{3}{\left (b x + c \right )} \cos ^{2}{\left (a + b x \right )}}{16} + \frac {9 x \sin {\left (a + b x \right )} \sin {\left (b x + c \right )} \cos ^{2}{\left (a + b x \right )} \cos ^{2}{\left (b x + c \right )}}{16} + \frac {3 x \sin ^{2}{\left (b x + c \right )} \cos ^{3}{\left (a + b x \right )} \cos {\left (b x + c \right )}}{16} + \frac {5 x \cos ^{3}{\left (a + b x \right )} \cos ^{3}{\left (b x + c \right )}}{16} - \frac {3 \sin ^{3}{\left (a + b x \right )} \sin ^{2}{\left (b x + c \right )} \cos {\left (b x + c \right )}}{16 b} - \frac {5 \sin ^{3}{\left (a + b x \right )} \cos ^{3}{\left (b x + c \right )}}{16 b} + \frac {\sin ^{2}{\left (a + b x \right )} \sin ^{3}{\left (b x + c \right )} \cos {\left (a + b x \right )}}{2 b} + \frac {3 \sin ^{2}{\left (a + b x \right )} \sin {\left (b x + c \right )} \cos {\left (a + b x \right )} \cos ^{2}{\left (b x + c \right )}}{4 b} + \frac {19 \sin ^{3}{\left (b x + c \right )} \cos ^{3}{\left (a + b x \right )}}{48 b} + \frac {11 \sin {\left (b x + c \right )} \cos ^{3}{\left (a + b x \right )} \cos ^{2}{\left (b x + c \right )}}{16 b} & \text {for}\: b \neq 0 \\x \cos ^{3}{\left (a \right )} \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((5*x*sin(a + b*x)**3*sin(b*x + c)**3/16 + 3*x*sin(a + b*x)**3*si 
n(b*x + c)*cos(b*x + c)**2/16 + 9*x*sin(a + b*x)**2*sin(b*x + c)**2*cos(a 
+ b*x)*cos(b*x + c)/16 + 3*x*sin(a + b*x)**2*cos(a + b*x)*cos(b*x + c)**3/ 
16 + 3*x*sin(a + b*x)*sin(b*x + c)**3*cos(a + b*x)**2/16 + 9*x*sin(a + b*x 
)*sin(b*x + c)*cos(a + b*x)**2*cos(b*x + c)**2/16 + 3*x*sin(b*x + c)**2*co 
s(a + b*x)**3*cos(b*x + c)/16 + 5*x*cos(a + b*x)**3*cos(b*x + c)**3/16 - 3 
*sin(a + b*x)**3*sin(b*x + c)**2*cos(b*x + c)/(16*b) - 5*sin(a + b*x)**3*c 
os(b*x + c)**3/(16*b) + sin(a + b*x)**2*sin(b*x + c)**3*cos(a + b*x)/(2*b) 
 + 3*sin(a + b*x)**2*sin(b*x + c)*cos(a + b*x)*cos(b*x + c)**2/(4*b) + 19* 
sin(b*x + c)**3*cos(a + b*x)**3/(48*b) + 11*sin(b*x + c)*cos(a + b*x)**3*c 
os(b*x + c)**2/(16*b), Ne(b, 0)), (x*cos(a)**3*cos(c)**3, True))
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.83 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\frac {12 \, {\left (9 \, b \cos \left (-a + c\right ) + b \cos \left (-3 \, a + 3 \, c\right )\right )} x + 2 \, \sin \left (6 \, b x + 3 \, a + 3 \, c\right ) + 9 \, \sin \left (4 \, b x + 3 \, a + c\right ) + 9 \, \sin \left (4 \, b x + a + 3 \, c\right ) + 18 \, \sin \left (2 \, b x + 3 \, a - c\right ) + 54 \, \sin \left (2 \, b x + a + c\right ) + 18 \, \sin \left (2 \, b x - a + 3 \, c\right )}{384 \, b} \] Input:

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

Output:

1/384*(12*(9*b*cos(-a + c) + b*cos(-3*a + 3*c))*x + 2*sin(6*b*x + 3*a + 3* 
c) + 9*sin(4*b*x + 3*a + c) + 9*sin(4*b*x + a + 3*c) + 18*sin(2*b*x + 3*a 
- c) + 54*sin(2*b*x + a + c) + 18*sin(2*b*x - a + 3*c))/b
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.90 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\frac {1}{32} \, x \cos \left (3 \, a - 3 \, c\right ) + \frac {9}{32} \, x \cos \left (a - c\right ) + \frac {\sin \left (6 \, b x + 3 \, a + 3 \, c\right )}{192 \, b} + \frac {3 \, \sin \left (4 \, b x + 3 \, a + c\right )}{128 \, b} + \frac {3 \, \sin \left (4 \, b x + a + 3 \, c\right )}{128 \, b} + \frac {3 \, \sin \left (2 \, b x + 3 \, a - c\right )}{64 \, b} + \frac {9 \, \sin \left (2 \, b x + a + c\right )}{64 \, b} - \frac {3 \, \sin \left (-2 \, b x + a - 3 \, c\right )}{64 \, b} \] Input:

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

Output:

1/32*x*cos(3*a - 3*c) + 9/32*x*cos(a - c) + 1/192*sin(6*b*x + 3*a + 3*c)/b 
 + 3/128*sin(4*b*x + 3*a + c)/b + 3/128*sin(4*b*x + a + 3*c)/b + 3/64*sin( 
2*b*x + 3*a - c)/b + 9/64*sin(2*b*x + a + c)/b - 3/64*sin(-2*b*x + a - 3*c 
)/b
 

Mupad [B] (verification not implemented)

Time = 21.02 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.83 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\frac {\frac {9\,\sin \left (a+3\,c+4\,b\,x\right )}{8}+\frac {9\,\sin \left (3\,a+c+4\,b\,x\right )}{8}+\frac {9\,\sin \left (3\,c-a+2\,b\,x\right )}{4}+\frac {9\,\sin \left (3\,a-c+2\,b\,x\right )}{4}+\frac {\sin \left (3\,a+3\,c+6\,b\,x\right )}{4}+\frac {27\,\sin \left (a+c+2\,b\,x\right )}{4}+\frac {27\,b\,x\,\cos \left (a-c\right )}{2}+\frac {3\,b\,x\,\cos \left (3\,a-3\,c\right )}{2}}{48\,b} \] Input:

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

Output:

((9*sin(a + 3*c + 4*b*x))/8 + (9*sin(3*a + c + 4*b*x))/8 + (9*sin(3*c - a 
+ 2*b*x))/4 + (9*sin(3*a - c + 2*b*x))/4 + sin(3*a + 3*c + 6*b*x)/4 + (27* 
sin(a + c + 2*b*x))/4 + (27*b*x*cos(a - c))/2 + (3*b*x*cos(3*a - 3*c))/2)/ 
(48*b)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.30 \[ \int \cos ^3(a+b x) \cos ^3(c+b x) \, dx=\frac {24 \cos \left (b x +c \right ) \cos \left (b x +a \right ) \sin \left (b x +c \right )^{2} \sin \left (b x +a \right )^{2} b x -6 \cos \left (b x +c \right ) \cos \left (b x +a \right ) \sin \left (b x +c \right )^{2} b x -6 \cos \left (b x +c \right ) \cos \left (b x +a \right ) \sin \left (b x +a \right )^{2} b x +15 \cos \left (b x +c \right ) \cos \left (b x +a \right ) b x +6 \cos \left (b x +c \right ) \sin \left (b x +c \right )^{2} \sin \left (b x +a \right )^{3}-15 \cos \left (b x +c \right ) \sin \left (b x +a \right )^{3}+2 \cos \left (b x +a \right ) \sin \left (b x +c \right )^{3} \sin \left (b x +a \right )^{2}-14 \cos \left (b x +a \right ) \sin \left (b x +c \right )^{3}+3 \cos \left (b x +a \right ) \sin \left (b x +c \right ) \sin \left (b x +a \right )^{2}+33 \cos \left (b x +a \right ) \sin \left (b x +c \right )+24 \sin \left (b x +c \right )^{3} \sin \left (b x +a \right )^{3} b x -18 \sin \left (b x +c \right )^{3} \sin \left (b x +a \right ) b x -18 \sin \left (b x +c \right ) \sin \left (b x +a \right )^{3} b x +27 \sin \left (b x +c \right ) \sin \left (b x +a \right ) b x}{48 b} \] Input:

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

Output:

(24*cos(b*x + c)*cos(a + b*x)*sin(b*x + c)**2*sin(a + b*x)**2*b*x - 6*cos( 
b*x + c)*cos(a + b*x)*sin(b*x + c)**2*b*x - 6*cos(b*x + c)*cos(a + b*x)*si 
n(a + b*x)**2*b*x + 15*cos(b*x + c)*cos(a + b*x)*b*x + 6*cos(b*x + c)*sin( 
b*x + c)**2*sin(a + b*x)**3 - 15*cos(b*x + c)*sin(a + b*x)**3 + 2*cos(a + 
b*x)*sin(b*x + c)**3*sin(a + b*x)**2 - 14*cos(a + b*x)*sin(b*x + c)**3 + 3 
*cos(a + b*x)*sin(b*x + c)*sin(a + b*x)**2 + 33*cos(a + b*x)*sin(b*x + c) 
+ 24*sin(b*x + c)**3*sin(a + b*x)**3*b*x - 18*sin(b*x + c)**3*sin(a + b*x) 
*b*x - 18*sin(b*x + c)*sin(a + b*x)**3*b*x + 27*sin(b*x + c)*sin(a + b*x)* 
b*x)/(48*b)