Integrand size = 15, antiderivative size = 97 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=\frac {3 \sin (a-c+(b-d) x)}{8 (b-d)}+\frac {\sin (3 a-c+(3 b-d) x)}{8 (3 b-d)}+\frac {3 \sin (a+c+(b+d) x)}{8 (b+d)}+\frac {\sin (3 a+c+(3 b+d) x)}{8 (3 b+d)} \] Output:
3*sin(a-c+(b-d)*x)/(8*b-8*d)+sin(3*a-c+(3*b-d)*x)/(24*b-8*d)+3*sin(a+c+(b+ d)*x)/(8*b+8*d)+sin(3*a+c+(3*b+d)*x)/(24*b+8*d)
Time = 0.32 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.93 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=\frac {1}{8} \left (\frac {3 \sin (a-c+b x-d x)}{b-d}+\frac {\sin (3 a-c+3 b x-d x)}{3 b-d}+\frac {\sin (3 a+c+3 b x+d x)}{3 b+d}+\frac {3 \sin (a+c+(b+d) x)}{b+d}\right ) \] Input:
Integrate[Cos[a + b*x]^3*Cos[c + d*x],x]
Output:
((3*Sin[a - c + b*x - d*x])/(b - d) + Sin[3*a - c + 3*b*x - d*x]/(3*b - d) + Sin[3*a + c + 3*b*x + d*x]/(3*b + d) + (3*Sin[a + c + (b + d)*x])/(b + d))/8
Time = 0.27 (sec) , antiderivative size = 97, 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.133, 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 (c+d x) \, dx\) |
\(\Big \downarrow \) 5081 |
\(\displaystyle \int \left (\frac {3}{8} \cos (a+x (b-d)-c)+\frac {1}{8} \cos (3 a+x (3 b-d)-c)+\frac {3}{8} \cos (a+x (b+d)+c)+\frac {1}{8} \cos (3 a+x (3 b+d)+c)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 \sin (a+x (b-d)-c)}{8 (b-d)}+\frac {\sin (3 a+x (3 b-d)-c)}{8 (3 b-d)}+\frac {3 \sin (a+x (b+d)+c)}{8 (b+d)}+\frac {\sin (3 a+x (3 b+d)+c)}{8 (3 b+d)}\) |
Input:
Int[Cos[a + b*x]^3*Cos[c + d*x],x]
Output:
(3*Sin[a - c + (b - d)*x])/(8*(b - d)) + Sin[3*a - c + (3*b - d)*x]/(8*(3* b - d)) + (3*Sin[a + c + (b + d)*x])/(8*(b + d)) + Sin[3*a + c + (3*b + d) *x]/(8*(3*b + d))
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]
Time = 3.74 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.93
method | result | size |
default | \(\frac {3 \sin \left (a -c +\left (b -d \right ) x \right )}{8 \left (b -d \right )}+\frac {3 \sin \left (a +c +\left (b +d \right ) x \right )}{8 \left (b +d \right )}+\frac {\sin \left (3 a -c +\left (3 b -d \right ) x \right )}{24 b -8 d}+\frac {\sin \left (3 a +c +\left (3 b +d \right ) x \right )}{24 b +8 d}\) | \(90\) |
parallelrisch | \(\frac {3 \left (b +\frac {d}{3}\right ) \left (b -d \right ) \left (b +d \right ) \sin \left (3 a -c +\left (3 b -d \right ) x \right )+27 \left (\left (b +\frac {d}{3}\right ) \left (b +d \right ) \sin \left (a -c +\left (b -d \right ) x \right )+\left (\left (\frac {b}{9}+\frac {d}{9}\right ) \sin \left (3 a +c +\left (3 b +d \right ) x \right )+\left (b +\frac {d}{3}\right ) \sin \left (a +c +\left (b +d \right ) x \right )\right ) \left (b -d \right )\right ) \left (b -\frac {d}{3}\right )}{72 b^{4}-80 b^{2} d^{2}+8 d^{4}}\) | \(129\) |
risch | \(\frac {27 \sin \left (b x -d x +a -c \right ) b^{3}}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}+\frac {27 \sin \left (b x -d x +a -c \right ) b^{2} d}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {3 \sin \left (b x -d x +a -c \right ) b \,d^{2}}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {3 \sin \left (b x -d x +a -c \right ) d^{3}}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}+\frac {27 \sin \left (b x +d x +a +c \right ) b^{3}}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {27 \sin \left (b x +d x +a +c \right ) b^{2} d}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {3 \sin \left (b x +d x +a +c \right ) b \,d^{2}}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}+\frac {3 \sin \left (b x +d x +a +c \right ) d^{3}}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}+\frac {3 \sin \left (3 b x -d x +3 a -c \right ) b^{3}}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}+\frac {\sin \left (3 b x -d x +3 a -c \right ) b^{2} d}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {3 \sin \left (3 b x -d x +3 a -c \right ) b \,d^{2}}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {\sin \left (3 b x -d x +3 a -c \right ) d^{3}}{8 \left (-3 b +d \right ) \left (-b +d \right ) \left (3 b +d \right ) \left (b +d \right )}+\frac {3 \sin \left (3 b x +d x +3 a +c \right ) b^{3}}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {\sin \left (3 b x +d x +3 a +c \right ) b^{2} d}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}-\frac {3 \sin \left (3 b x +d x +3 a +c \right ) b \,d^{2}}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}+\frac {\sin \left (3 b x +d x +3 a +c \right ) d^{3}}{8 \left (3 b -d \right ) \left (b -d \right ) \left (3 b +d \right ) \left (b +d \right )}\) | \(730\) |
orering | \(\text {Expression too large to display}\) | \(950\) |
Input:
int(cos(b*x+a)^3*cos(d*x+c),x,method=_RETURNVERBOSE)
Output:
3/8/(b-d)*sin(a-c+(b-d)*x)+3/8/(b+d)*sin(a+c+(b+d)*x)+1/8/(3*b-d)*sin(3*a- c+(3*b-d)*x)+1/8/(3*b+d)*sin(3*a+c+(3*b+d)*x)
Time = 0.08 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.04 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=\frac {3 \, {\left (2 \, b^{3} + {\left (b^{3} - b d^{2}\right )} \cos \left (b x + a\right )^{2}\right )} \cos \left (d x + c\right ) \sin \left (b x + a\right ) - {\left (6 \, b^{2} d \cos \left (b x + a\right ) + {\left (b^{2} d - d^{3}\right )} \cos \left (b x + a\right )^{3}\right )} \sin \left (d x + c\right )}{9 \, b^{4} - 10 \, b^{2} d^{2} + d^{4}} \] Input:
integrate(cos(b*x+a)^3*cos(d*x+c),x, algorithm="fricas")
Output:
(3*(2*b^3 + (b^3 - b*d^2)*cos(b*x + a)^2)*cos(d*x + c)*sin(b*x + a) - (6*b ^2*d*cos(b*x + a) + (b^2*d - d^3)*cos(b*x + a)^3)*sin(d*x + c))/(9*b^4 - 1 0*b^2*d^2 + d^4)
Leaf count of result is larger than twice the leaf count of optimal. 937 vs. \(2 (76) = 152\).
Time = 1.98 (sec) , antiderivative size = 937, normalized size of antiderivative = 9.66 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)**3*cos(d*x+c),x)
Output:
Piecewise((x*cos(a)**3*cos(c), Eq(b, 0) & Eq(d, 0)), (-3*x*sin(a - d*x)**3 *sin(c + d*x)/8 + 3*x*sin(a - d*x)**2*cos(a - d*x)*cos(c + d*x)/8 - 3*x*si n(a - d*x)*sin(c + d*x)*cos(a - d*x)**2/8 + 3*x*cos(a - d*x)**3*cos(c + d* x)/8 + 3*sin(a - d*x)**3*cos(c + d*x)/(8*d) + 3*sin(a - d*x)**2*sin(c + d* x)*cos(a - d*x)/(4*d) + 5*sin(c + d*x)*cos(a - d*x)**3/(8*d), Eq(b, -d)), (x*sin(a - d*x/3)**3*sin(c + d*x)/8 - 3*x*sin(a - d*x/3)**2*cos(a - d*x/3) *cos(c + d*x)/8 - 3*x*sin(a - d*x/3)*sin(c + d*x)*cos(a - d*x/3)**2/8 + x* cos(a - d*x/3)**3*cos(c + d*x)/8 + 3*sin(a - d*x/3)**3*cos(c + d*x)/(8*d) + 3*sin(a - d*x/3)**2*sin(c + d*x)*cos(a - d*x/3)/(4*d) + 7*sin(c + d*x)*c os(a - d*x/3)**3/(8*d), Eq(b, -d/3)), (-x*sin(a + d*x/3)**3*sin(c + d*x)/8 - 3*x*sin(a + d*x/3)**2*cos(a + d*x/3)*cos(c + d*x)/8 + 3*x*sin(a + d*x/3 )*sin(c + d*x)*cos(a + d*x/3)**2/8 + x*cos(a + d*x/3)**3*cos(c + d*x)/8 - 3*sin(a + d*x/3)**3*cos(c + d*x)/(8*d) + 3*sin(a + d*x/3)**2*sin(c + d*x)* cos(a + d*x/3)/(4*d) + 7*sin(c + d*x)*cos(a + d*x/3)**3/(8*d), Eq(b, d/3)) , (3*x*sin(a + d*x)**3*sin(c + d*x)/8 + 3*x*sin(a + d*x)**2*cos(a + d*x)*c os(c + d*x)/8 + 3*x*sin(a + d*x)*sin(c + d*x)*cos(a + d*x)**2/8 + 3*x*cos( a + d*x)**3*cos(c + d*x)/8 + 3*sin(a + d*x)**3*cos(c + d*x)/(8*d) + 3*sin( a + d*x)*cos(a + d*x)**2*cos(c + d*x)/(4*d) - sin(c + d*x)*cos(a + d*x)**3 /(8*d), Eq(b, d)), (6*b**3*sin(a + b*x)**3*cos(c + d*x)/(9*b**4 - 10*b**2* d**2 + d**4) + 9*b**3*sin(a + b*x)*cos(a + b*x)**2*cos(c + d*x)/(9*b**4...
Leaf count of result is larger than twice the leaf count of optimal. 787 vs. \(2 (89) = 178\).
Time = 0.08 (sec) , antiderivative size = 787, normalized size of antiderivative = 8.11 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^3*cos(d*x+c),x, algorithm="maxima")
Output:
-1/16*((3*b^3*sin(c) - b^2*d*sin(c) - 3*b*d^2*sin(c) + d^3*sin(c))*cos((3* b + d)*x + 3*a + 2*c) - (3*b^3*sin(c) - b^2*d*sin(c) - 3*b*d^2*sin(c) + d^ 3*sin(c))*cos((3*b + d)*x + 3*a) - (3*b^3*sin(c) + b^2*d*sin(c) - 3*b*d^2* sin(c) - d^3*sin(c))*cos(-(3*b - d)*x - 3*a + 2*c) + (3*b^3*sin(c) + b^2*d *sin(c) - 3*b*d^2*sin(c) - d^3*sin(c))*cos(-(3*b - d)*x - 3*a) + 3*(9*b^3* sin(c) - 9*b^2*d*sin(c) - b*d^2*sin(c) + d^3*sin(c))*cos((b + d)*x + a + 2 *c) - 3*(9*b^3*sin(c) - 9*b^2*d*sin(c) - b*d^2*sin(c) + d^3*sin(c))*cos((b + d)*x + a) - 3*(9*b^3*sin(c) + 9*b^2*d*sin(c) - b*d^2*sin(c) - d^3*sin(c ))*cos(-(b - d)*x - a + 2*c) + 3*(9*b^3*sin(c) + 9*b^2*d*sin(c) - b*d^2*si n(c) - d^3*sin(c))*cos(-(b - d)*x - a) - (3*b^3*cos(c) - b^2*d*cos(c) - 3* b*d^2*cos(c) + d^3*cos(c))*sin((3*b + d)*x + 3*a + 2*c) - (3*b^3*cos(c) - b^2*d*cos(c) - 3*b*d^2*cos(c) + d^3*cos(c))*sin((3*b + d)*x + 3*a) + (3*b^ 3*cos(c) + b^2*d*cos(c) - 3*b*d^2*cos(c) - d^3*cos(c))*sin(-(3*b - d)*x - 3*a + 2*c) + (3*b^3*cos(c) + b^2*d*cos(c) - 3*b*d^2*cos(c) - d^3*cos(c))*s in(-(3*b - d)*x - 3*a) - 3*(9*b^3*cos(c) - 9*b^2*d*cos(c) - b*d^2*cos(c) + d^3*cos(c))*sin((b + d)*x + a + 2*c) - 3*(9*b^3*cos(c) - 9*b^2*d*cos(c) - b*d^2*cos(c) + d^3*cos(c))*sin((b + d)*x + a) + 3*(9*b^3*cos(c) + 9*b^2*d *cos(c) - b*d^2*cos(c) - d^3*cos(c))*sin(-(b - d)*x - a + 2*c) + 3*(9*b^3* cos(c) + 9*b^2*d*cos(c) - b*d^2*cos(c) - d^3*cos(c))*sin(-(b - d)*x - a))/ (9*b^4*cos(c)^2 + 9*b^4*sin(c)^2 + (cos(c)^2 + sin(c)^2)*d^4 - 10*(b^2*...
Time = 0.13 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.92 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=\frac {\sin \left (3 \, b x + d x + 3 \, a + c\right )}{8 \, {\left (3 \, b + d\right )}} + \frac {\sin \left (3 \, b x - d x + 3 \, a - c\right )}{8 \, {\left (3 \, b - d\right )}} + \frac {3 \, \sin \left (b x + d x + a + c\right )}{8 \, {\left (b + d\right )}} + \frac {3 \, \sin \left (b x - d x + a - c\right )}{8 \, {\left (b - d\right )}} \] Input:
integrate(cos(b*x+a)^3*cos(d*x+c),x, algorithm="giac")
Output:
1/8*sin(3*b*x + d*x + 3*a + c)/(3*b + d) + 1/8*sin(3*b*x - d*x + 3*a - c)/ (3*b - d) + 3/8*sin(b*x + d*x + a + c)/(b + d) + 3/8*sin(b*x - d*x + a - c )/(b - d)
Time = 22.20 (sec) , antiderivative size = 495, normalized size of antiderivative = 5.10 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=-{\mathrm {e}}^{a\,3{}\mathrm {i}-c\,1{}\mathrm {i}+b\,x\,3{}\mathrm {i}-d\,x\,1{}\mathrm {i}}\,\left (\frac {-3\,b^3-b^2\,d+3\,b\,d^2+d^3}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,6{}\mathrm {i}-b\,x\,6{}\mathrm {i}}\,\left (-3\,b^3+b^2\,d+3\,b\,d^2-d^3\right )}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}+\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,\left (-27\,b^3-27\,b^2\,d+3\,b\,d^2+3\,d^3\right )}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,4{}\mathrm {i}-b\,x\,4{}\mathrm {i}}\,\left (-27\,b^3+27\,b^2\,d+3\,b\,d^2-3\,d^3\right )}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}\right )-{\mathrm {e}}^{a\,3{}\mathrm {i}+c\,1{}\mathrm {i}+b\,x\,3{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {-3\,b^3+b^2\,d+3\,b\,d^2-d^3}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,6{}\mathrm {i}-b\,x\,6{}\mathrm {i}}\,\left (-3\,b^3-b^2\,d+3\,b\,d^2+d^3\right )}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}+\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,\left (-27\,b^3+27\,b^2\,d+3\,b\,d^2-3\,d^3\right )}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,4{}\mathrm {i}-b\,x\,4{}\mathrm {i}}\,\left (-27\,b^3-27\,b^2\,d+3\,b\,d^2+3\,d^3\right )}{b^4\,144{}\mathrm {i}-b^2\,d^2\,160{}\mathrm {i}+d^4\,16{}\mathrm {i}}\right ) \] Input:
int(cos(a + b*x)^3*cos(c + d*x),x)
Output:
- exp(a*3i - c*1i + b*x*3i - d*x*1i)*((3*b*d^2 - b^2*d - 3*b^3 + d^3)/(b^4 *144i + d^4*16i - b^2*d^2*160i) - (exp(- a*6i - b*x*6i)*(3*b*d^2 + b^2*d - 3*b^3 - d^3))/(b^4*144i + d^4*16i - b^2*d^2*160i) + (exp(- a*2i - b*x*2i) *(3*b*d^2 - 27*b^2*d - 27*b^3 + 3*d^3))/(b^4*144i + d^4*16i - b^2*d^2*160i ) - (exp(- a*4i - b*x*4i)*(3*b*d^2 + 27*b^2*d - 27*b^3 - 3*d^3))/(b^4*144i + d^4*16i - b^2*d^2*160i)) - exp(a*3i + c*1i + b*x*3i + d*x*1i)*((3*b*d^2 + b^2*d - 3*b^3 - d^3)/(b^4*144i + d^4*16i - b^2*d^2*160i) - (exp(- a*6i - b*x*6i)*(3*b*d^2 - b^2*d - 3*b^3 + d^3))/(b^4*144i + d^4*16i - b^2*d^2*1 60i) + (exp(- a*2i - b*x*2i)*(3*b*d^2 + 27*b^2*d - 27*b^3 - 3*d^3))/(b^4*1 44i + d^4*16i - b^2*d^2*160i) - (exp(- a*4i - b*x*4i)*(3*b*d^2 - 27*b^2*d - 27*b^3 + 3*d^3))/(b^4*144i + d^4*16i - b^2*d^2*160i))
Time = 0.17 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.85 \[ \int \cos ^3(a+b x) \cos (c+d x) \, dx=\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )^{2} \sin \left (d x +c \right ) b^{2} d -\cos \left (b x +a \right ) \sin \left (b x +a \right )^{2} \sin \left (d x +c \right ) d^{3}-7 \cos \left (b x +a \right ) \sin \left (d x +c \right ) b^{2} d +\cos \left (b x +a \right ) \sin \left (d x +c \right ) d^{3}-3 \cos \left (d x +c \right ) \sin \left (b x +a \right )^{3} b^{3}+3 \cos \left (d x +c \right ) \sin \left (b x +a \right )^{3} b \,d^{2}+9 \cos \left (d x +c \right ) \sin \left (b x +a \right ) b^{3}-3 \cos \left (d x +c \right ) \sin \left (b x +a \right ) b \,d^{2}}{9 b^{4}-10 b^{2} d^{2}+d^{4}} \] Input:
int(cos(b*x+a)^3*cos(d*x+c),x)
Output:
(cos(a + b*x)*sin(a + b*x)**2*sin(c + d*x)*b**2*d - cos(a + b*x)*sin(a + b *x)**2*sin(c + d*x)*d**3 - 7*cos(a + b*x)*sin(c + d*x)*b**2*d + cos(a + b* x)*sin(c + d*x)*d**3 - 3*cos(c + d*x)*sin(a + b*x)**3*b**3 + 3*cos(c + d*x )*sin(a + b*x)**3*b*d**2 + 9*cos(c + d*x)*sin(a + b*x)*b**3 - 3*cos(c + d* x)*sin(a + b*x)*b*d**2)/(9*b**4 - 10*b**2*d**2 + d**4)