Integrand size = 15, antiderivative size = 91 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx=\frac {\sin (a-3 c+(b-3 d) x)}{8 (b-3 d)}+\frac {3 \sin (a-c+(b-d) x)}{8 (b-d)}+\frac {3 \sin (a+c+(b+d) x)}{8 (b+d)}+\frac {\sin (a+3 c+(b+3 d) x)}{8 (b+3 d)} \] Output:
sin(a-3*c+(b-3*d)*x)/(8*b-24*d)+3*sin(a-c+(b-d)*x)/(8*b-8*d)+3*sin(a+c+(b+ d)*x)/(8*b+8*d)+sin(a+3*c+(b+3*d)*x)/(8*b+24*d)
Time = 0.34 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.93 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx=\frac {1}{8} \left (\frac {\sin (a-3 c+b x-3 d x)}{b-3 d}+\frac {3 \sin (a-c+b x-d x)}{b-d}+\frac {\sin (a+3 c+b x+3 d x)}{b+3 d}+\frac {3 \sin (a+c+(b+d) x)}{b+d}\right ) \] Input:
Integrate[Cos[a + b*x]*Cos[c + d*x]^3,x]
Output:
(Sin[a - 3*c + b*x - 3*d*x]/(b - 3*d) + (3*Sin[a - c + b*x - d*x])/(b - d) + Sin[a + 3*c + b*x + 3*d*x]/(b + 3*d) + (3*Sin[a + c + (b + d)*x])/(b + d))/8
Time = 0.26 (sec) , antiderivative size = 91, 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 (a+b x) \cos ^3(c+d x) \, dx\) |
\(\Big \downarrow \) 5081 |
\(\displaystyle \int \left (\frac {1}{8} \cos (a+x (b-3 d)-3 c)+\frac {3}{8} \cos (a+x (b-d)-c)+\frac {3}{8} \cos (a+x (b+d)+c)+\frac {1}{8} \cos (a+x (b+3 d)+3 c)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sin (a+x (b-3 d)-3 c)}{8 (b-3 d)}+\frac {3 \sin (a+x (b-d)-c)}{8 (b-d)}+\frac {3 \sin (a+x (b+d)+c)}{8 (b+d)}+\frac {\sin (a+x (b+3 d)+3 c)}{8 (b+3 d)}\) |
Input:
Int[Cos[a + b*x]*Cos[c + d*x]^3,x]
Output:
Sin[a - 3*c + (b - 3*d)*x]/(8*(b - 3*d)) + (3*Sin[a - c + (b - d)*x])/(8*( b - d)) + (3*Sin[a + c + (b + d)*x])/(8*(b + d)) + Sin[a + 3*c + (b + 3*d) *x]/(8*(b + 3*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.94 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.92
method | result | size |
default | \(\frac {\sin \left (a -3 c +\left (b -3 d \right ) x \right )}{8 b -24 d}+\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 (a +3 c +\left (b +3 d \right ) x \right )}{8 b +24 d}\) | \(84\) |
risch | \(\frac {\sin \left (b x -3 d x +a -3 c \right ) b}{8 \left (b -3 d \right ) \left (b +3 d \right )}+\frac {3 \sin \left (b x -3 d x +a -3 c \right ) d}{8 \left (b -3 d \right ) \left (b +3 d \right )}+\frac {3 \sin \left (b x -d x +a -c \right ) b}{8 \left (b -d \right ) \left (b +d \right )}+\frac {3 \sin \left (b x -d x +a -c \right ) d}{8 \left (b -d \right ) \left (b +d \right )}+\frac {3 \sin \left (b x +d x +a +c \right ) b}{8 \left (b -d \right ) \left (b +d \right )}-\frac {3 \sin \left (b x +d x +a +c \right ) d}{8 \left (b -d \right ) \left (b +d \right )}+\frac {\sin \left (b x +3 d x +a +3 c \right ) b}{8 \left (b -3 d \right ) \left (b +3 d \right )}-\frac {3 \sin \left (b x +3 d x +a +3 c \right ) d}{8 \left (b -3 d \right ) \left (b +3 d \right )}\) | \(228\) |
parallelrisch | \(\frac {-2 b \tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \left (b^{2}-7 d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+6 d \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )-1\right ) \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )+1\right ) \left (b^{2}-3 d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+6 b \tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \left (b^{2}+d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-12 d \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )-1\right ) \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )+1\right ) \left (b^{2}+d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-6 b \tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \left (b^{2}+d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+6 d \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )-1\right ) \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )+1\right ) \left (b^{2}-3 d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b \tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \left (b^{2}-7 d^{2}\right )}{\left (b -d \right ) \left (b +d \right ) \left (b +3 d \right ) \left (b -3 d \right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (1+\tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}\right )}\) | \(303\) |
orering | \(\text {Expression too large to display}\) | \(950\) |
Input:
int(cos(b*x+a)*cos(d*x+c)^3,x,method=_RETURNVERBOSE)
Output:
1/8*sin(a-3*c+(b-3*d)*x)/(b-3*d)+3/8/(b-d)*sin(a-c+(b-d)*x)+3/8/(b+d)*sin( a+c+(b+d)*x)+1/8/(b+3*d)*sin(a+3*c+(b+3*d)*x)
Time = 0.08 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.20 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx=-\frac {{\left (6 \, b d^{2} \cos \left (d x + c\right ) - {\left (b^{3} - b d^{2}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (b x + a\right ) - 3 \, {\left (2 \, d^{3} \cos \left (b x + a\right ) - {\left (b^{2} d - d^{3}\right )} \cos \left (b x + a\right ) \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{b^{4} - 10 \, b^{2} d^{2} + 9 \, d^{4}} \] Input:
integrate(cos(b*x+a)*cos(d*x+c)^3,x, algorithm="fricas")
Output:
-((6*b*d^2*cos(d*x + c) - (b^3 - b*d^2)*cos(d*x + c)^3)*sin(b*x + a) - 3*( 2*d^3*cos(b*x + a) - (b^2*d - d^3)*cos(b*x + a)*cos(d*x + c)^2)*sin(d*x + c))/(b^4 - 10*b^2*d^2 + 9*d^4)
Leaf count of result is larger than twice the leaf count of optimal. 918 vs. \(2 (76) = 152\).
Time = 1.94 (sec) , antiderivative size = 918, normalized size of antiderivative = 10.09 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)*cos(d*x+c)**3,x)
Output:
Piecewise((x*cos(a)*cos(c)**3, Eq(b, 0) & Eq(d, 0)), (x*sin(a - 3*d*x)*sin (c + d*x)**3/8 - 3*x*sin(a - 3*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 - 3*x*s in(c + d*x)**2*cos(a - 3*d*x)*cos(c + d*x)/8 + x*cos(a - 3*d*x)*cos(c + d* x)**3/8 - 3*sin(a - 3*d*x)*cos(c + d*x)**3/(8*d) - sin(c + d*x)**3*cos(a - 3*d*x)/(24*d) - sin(c + d*x)*cos(a - 3*d*x)*cos(c + d*x)**2/(4*d), Eq(b, -3*d)), (-3*x*sin(a - d*x)*sin(c + d*x)**3/8 - 3*x*sin(a - d*x)*sin(c + d* x)*cos(c + d*x)**2/8 + 3*x*sin(c + d*x)**2*cos(a - d*x)*cos(c + d*x)/8 + 3 *x*cos(a - d*x)*cos(c + d*x)**3/8 + sin(a - d*x)*cos(c + d*x)**3/(8*d) + 3 *sin(c + d*x)**3*cos(a - d*x)/(8*d) + 3*sin(c + d*x)*cos(a - d*x)*cos(c + d*x)**2/(4*d), Eq(b, -d)), (3*x*sin(a + d*x)*sin(c + d*x)**3/8 + 3*x*sin(a + d*x)*sin(c + d*x)*cos(c + d*x)**2/8 + 3*x*sin(c + d*x)**2*cos(a + d*x)* cos(c + d*x)/8 + 3*x*cos(a + d*x)*cos(c + d*x)**3/8 - sin(a + d*x)*cos(c + d*x)**3/(8*d) + 3*sin(c + d*x)**3*cos(a + d*x)/(8*d) + 3*sin(c + d*x)*cos (a + d*x)*cos(c + d*x)**2/(4*d), Eq(b, d)), (-x*sin(a + 3*d*x)*sin(c + d*x )**3/8 + 3*x*sin(a + 3*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 - 3*x*sin(c + d *x)**2*cos(a + 3*d*x)*cos(c + d*x)/8 + x*cos(a + 3*d*x)*cos(c + d*x)**3/8 + 3*sin(a + 3*d*x)*cos(c + d*x)**3/(8*d) - sin(c + d*x)**3*cos(a + 3*d*x)/ (24*d) - sin(c + d*x)*cos(a + 3*d*x)*cos(c + d*x)**2/(4*d), Eq(b, 3*d)), ( b**3*sin(a + b*x)*cos(c + d*x)**3/(b**4 - 10*b**2*d**2 + 9*d**4) - 3*b**2* d*sin(c + d*x)*cos(a + b*x)*cos(c + d*x)**2/(b**4 - 10*b**2*d**2 + 9*d*...
Leaf count of result is larger than twice the leaf count of optimal. 914 vs. \(2 (83) = 166\).
Time = 0.09 (sec) , antiderivative size = 914, normalized size of antiderivative = 10.04 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)*cos(d*x+c)^3,x, algorithm="maxima")
Output:
-1/16*((b^3*sin(3*c) - 3*b^2*d*sin(3*c) - b*d^2*sin(3*c) + 3*d^3*sin(3*c)) *cos((b + 3*d)*x + a + 6*c) - (b^3*sin(3*c) - 3*b^2*d*sin(3*c) - b*d^2*sin (3*c) + 3*d^3*sin(3*c))*cos((b + 3*d)*x + a) + 3*(b^3*sin(3*c) - b^2*d*sin (3*c) - 9*b*d^2*sin(3*c) + 9*d^3*sin(3*c))*cos((b + d)*x + a + 4*c) - 3*(b ^3*sin(3*c) - b^2*d*sin(3*c) - 9*b*d^2*sin(3*c) + 9*d^3*sin(3*c))*cos((b + d)*x + a - 2*c) - 3*(b^3*sin(3*c) + b^2*d*sin(3*c) - 9*b*d^2*sin(3*c) - 9 *d^3*sin(3*c))*cos(-(b - d)*x - a + 4*c) + 3*(b^3*sin(3*c) + b^2*d*sin(3*c ) - 9*b*d^2*sin(3*c) - 9*d^3*sin(3*c))*cos(-(b - d)*x - a - 2*c) - (b^3*si n(3*c) + 3*b^2*d*sin(3*c) - b*d^2*sin(3*c) - 3*d^3*sin(3*c))*cos(-(b - 3*d )*x - a + 6*c) + (b^3*sin(3*c) + 3*b^2*d*sin(3*c) - b*d^2*sin(3*c) - 3*d^3 *sin(3*c))*cos(-(b - 3*d)*x - a) - (b^3*cos(3*c) - 3*b^2*d*cos(3*c) - b*d^ 2*cos(3*c) + 3*d^3*cos(3*c))*sin((b + 3*d)*x + a + 6*c) - (b^3*cos(3*c) - 3*b^2*d*cos(3*c) - b*d^2*cos(3*c) + 3*d^3*cos(3*c))*sin((b + 3*d)*x + a) - 3*(b^3*cos(3*c) - b^2*d*cos(3*c) - 9*b*d^2*cos(3*c) + 9*d^3*cos(3*c))*sin ((b + d)*x + a + 4*c) - 3*(b^3*cos(3*c) - b^2*d*cos(3*c) - 9*b*d^2*cos(3*c ) + 9*d^3*cos(3*c))*sin((b + d)*x + a - 2*c) + 3*(b^3*cos(3*c) + b^2*d*cos (3*c) - 9*b*d^2*cos(3*c) - 9*d^3*cos(3*c))*sin(-(b - d)*x - a + 4*c) + 3*( b^3*cos(3*c) + b^2*d*cos(3*c) - 9*b*d^2*cos(3*c) - 9*d^3*cos(3*c))*sin(-(b - d)*x - a - 2*c) + (b^3*cos(3*c) + 3*b^2*d*cos(3*c) - b*d^2*cos(3*c) - 3 *d^3*cos(3*c))*sin(-(b - 3*d)*x - a + 6*c) + (b^3*cos(3*c) + 3*b^2*d*co...
Time = 0.14 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.92 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx=\frac {\sin \left (b x + 3 \, d x + a + 3 \, c\right )}{8 \, {\left (b + 3 \, 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 )}} + \frac {\sin \left (b x - 3 \, d x + a - 3 \, c\right )}{8 \, {\left (b - 3 \, d\right )}} \] Input:
integrate(cos(b*x+a)*cos(d*x+c)^3,x, algorithm="giac")
Output:
1/8*sin(b*x + 3*d*x + a + 3*c)/(b + 3*d) + 3/8*sin(b*x + d*x + a + c)/(b + d) + 3/8*sin(b*x - d*x + a - c)/(b - d) + 1/8*sin(b*x - 3*d*x + a - 3*c)/ (b - 3*d)
Time = 21.03 (sec) , antiderivative size = 313, normalized size of antiderivative = 3.44 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx={\mathrm {e}}^{a\,1{}\mathrm {i}-c\,3{}\mathrm {i}+b\,x\,1{}\mathrm {i}-d\,x\,3{}\mathrm {i}}\,\left (\frac {b+3\,d}{b^2\,16{}\mathrm {i}-d^2\,144{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,\left (b-3\,d\right )}{b^2\,16{}\mathrm {i}-d^2\,144{}\mathrm {i}}\right )+{\mathrm {e}}^{a\,1{}\mathrm {i}+c\,3{}\mathrm {i}+b\,x\,1{}\mathrm {i}+d\,x\,3{}\mathrm {i}}\,\left (\frac {b-3\,d}{b^2\,16{}\mathrm {i}-d^2\,144{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,\left (b+3\,d\right )}{b^2\,16{}\mathrm {i}-d^2\,144{}\mathrm {i}}\right )+{\mathrm {e}}^{a\,1{}\mathrm {i}-c\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}\,\left (\frac {3\,b+3\,d}{b^2\,16{}\mathrm {i}-d^2\,16{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,\left (3\,b-3\,d\right )}{b^2\,16{}\mathrm {i}-d^2\,16{}\mathrm {i}}\right )+{\mathrm {e}}^{a\,1{}\mathrm {i}+c\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {3\,b-3\,d}{b^2\,16{}\mathrm {i}-d^2\,16{}\mathrm {i}}-\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,\left (3\,b+3\,d\right )}{b^2\,16{}\mathrm {i}-d^2\,16{}\mathrm {i}}\right ) \] Input:
int(cos(a + b*x)*cos(c + d*x)^3,x)
Output:
exp(a*1i - c*3i + b*x*1i - d*x*3i)*((b + 3*d)/(b^2*16i - d^2*144i) - (exp( - a*2i - b*x*2i)*(b - 3*d))/(b^2*16i - d^2*144i)) + exp(a*1i + c*3i + b*x* 1i + d*x*3i)*((b - 3*d)/(b^2*16i - d^2*144i) - (exp(- a*2i - b*x*2i)*(b + 3*d))/(b^2*16i - d^2*144i)) + exp(a*1i - c*1i + b*x*1i - d*x*1i)*((3*b + 3 *d)/(b^2*16i - d^2*16i) - (exp(- a*2i - b*x*2i)*(3*b - 3*d))/(b^2*16i - d^ 2*16i)) + exp(a*1i + c*1i + b*x*1i + d*x*1i)*((3*b - 3*d)/(b^2*16i - d^2*1 6i) - (exp(- a*2i - b*x*2i)*(3*b + 3*d))/(b^2*16i - d^2*16i))
Time = 0.19 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.97 \[ \int \cos (a+b x) \cos ^3(c+d x) \, dx=\frac {3 \cos \left (b x +a \right ) \sin \left (d x +c \right )^{3} b^{2} d -3 \cos \left (b x +a \right ) \sin \left (d x +c \right )^{3} d^{3}-3 \cos \left (b x +a \right ) \sin \left (d x +c \right ) b^{2} d +9 \cos \left (b x +a \right ) \sin \left (d x +c \right ) d^{3}-\cos \left (d x +c \right ) \sin \left (b x +a \right ) \sin \left (d x +c \right )^{2} b^{3}+\cos \left (d x +c \right ) \sin \left (b x +a \right ) \sin \left (d x +c \right )^{2} b \,d^{2}+\cos \left (d x +c \right ) \sin \left (b x +a \right ) b^{3}-7 \cos \left (d x +c \right ) \sin \left (b x +a \right ) b \,d^{2}}{b^{4}-10 b^{2} d^{2}+9 d^{4}} \] Input:
int(cos(b*x+a)*cos(d*x+c)^3,x)
Output:
(3*cos(a + b*x)*sin(c + d*x)**3*b**2*d - 3*cos(a + b*x)*sin(c + d*x)**3*d* *3 - 3*cos(a + b*x)*sin(c + d*x)*b**2*d + 9*cos(a + b*x)*sin(c + d*x)*d**3 - cos(c + d*x)*sin(a + b*x)*sin(c + d*x)**2*b**3 + cos(c + d*x)*sin(a + b *x)*sin(c + d*x)**2*b*d**2 + cos(c + d*x)*sin(a + b*x)*b**3 - 7*cos(c + d* x)*sin(a + b*x)*b*d**2)/(b**4 - 10*b**2*d**2 + 9*d**4)