Integrand size = 17, antiderivative size = 66 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=\frac {1}{8} x (2+\cos (2 (a-c)))+\frac {\sin (2 a+2 b x)}{8 b}+\frac {\sin (2 c+2 b x)}{8 b}+\frac {\sin (2 (a+c)+4 b x)}{32 b} \] Output:
1/8*x*(2+cos(2*a-2*c))+1/8*sin(2*b*x+2*a)/b+1/8*sin(2*b*x+2*c)/b+1/32*sin( 4*b*x+2*a+2*c)/b
Time = 0.07 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.82 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=\frac {8 b x+4 b x \cos (2 (a-c))+4 \sin (2 (a+b x))+4 \sin (2 (c+b x))+\sin (2 (a+c+2 b x))}{32 b} \] Input:
Integrate[Cos[a + b*x]^2*Cos[c + b*x]^2,x]
Output:
(8*b*x + 4*b*x*Cos[2*(a - c)] + 4*Sin[2*(a + b*x)] + 4*Sin[2*(c + b*x)] + Sin[2*(a + c + 2*b*x)])/(32*b)
Time = 0.24 (sec) , antiderivative size = 66, 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 ^2(a+b x) \cos ^2(b x+c) \, dx\) |
\(\Big \downarrow \) 5081 |
\(\displaystyle \int \left (\frac {1}{8} \cos (2 (a+c)+4 b x)+\frac {1}{4} \cos (2 a+2 b x)+\frac {1}{8} \cos (2 a-2 c)+\frac {1}{4} \cos (2 b x+2 c)+\frac {1}{4}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sin (2 (a+c)+4 b x)}{32 b}+\frac {\sin (2 a+2 b x)}{8 b}+\frac {1}{8} x (\cos (2 (a-c))+2)+\frac {\sin (2 b x+2 c)}{8 b}\) |
Input:
Int[Cos[a + b*x]^2*Cos[c + b*x]^2,x]
Output:
(x*(2 + Cos[2*(a - c)]))/8 + Sin[2*a + 2*b*x]/(8*b) + Sin[2*c + 2*b*x]/(8* b) + Sin[2*(a + c) + 4*b*x]/(32*b)
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 = 1.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.92
method | result | size |
default | \(\frac {x}{4}+\frac {x \cos \left (2 a -2 c \right )}{8}+\frac {\sin \left (2 b x +2 a \right )}{8 b}+\frac {\sin \left (2 b x +2 c \right )}{8 b}+\frac {\sin \left (4 b x +2 a +2 c \right )}{32 b}\) | \(61\) |
risch | \(\frac {x}{4}+\frac {x \cos \left (2 a -2 c \right )}{8}+\frac {\sin \left (2 b x +2 a \right )}{8 b}+\frac {\sin \left (2 b x +2 c \right )}{8 b}+\frac {\sin \left (4 b x +2 a +2 c \right )}{32 b}\) | \(61\) |
parallelrisch | \(\frac {8 b x +4 b x \cos \left (2 a -2 c \right )+\sin \left (4 b x +2 a +2 c \right )-5 \sin \left (2 a -2 c \right )+4 \sin \left (2 b x +2 a \right )+4 \sin \left (2 b x +2 c \right )}{32 b}\) | \(67\) |
orering | \(x \cos \left (b x +a \right )^{2} \cos \left (b x +c \right )^{2}-\frac {5 \left (-2 \cos \left (b x +a \right ) \cos \left (b x +c \right )^{2} b \sin \left (b x +a \right )-2 \cos \left (b x +a \right )^{2} \cos \left (b x +c \right ) b \sin \left (b x +c \right )\right )}{16 b^{2}}+\frac {5 x \left (2 b^{2} \sin \left (b x +a \right )^{2} \cos \left (b x +c \right )^{2}+8 \sin \left (b x +c \right ) \cos \left (b x +a \right ) b^{2} \cos \left (b x +c \right ) \sin \left (b x +a \right )-4 \cos \left (b x +a \right )^{2} \cos \left (b x +c \right )^{2} b^{2}+2 \cos \left (b x +a \right )^{2} b^{2} \sin \left (b x +c \right )^{2}\right )}{16 b^{2}}-\frac {20 b^{3} \cos \left (b x +c \right )^{2} \cos \left (b x +a \right ) \sin \left (b x +a \right )-12 \sin \left (b x +c \right ) b^{3} \sin \left (b x +a \right )^{2} \cos \left (b x +c \right )-12 \sin \left (b x +c \right )^{2} \cos \left (b x +a \right ) b^{3} \sin \left (b x +a \right )+20 b^{3} \cos \left (b x +c \right ) \cos \left (b x +a \right )^{2} \sin \left (b x +c \right )}{64 b^{4}}+\frac {x \left (-128 b^{4} \cos \left (b x +c \right ) \cos \left (b x +a \right ) \sin \left (b x +a \right ) \sin \left (b x +c \right )-32 b^{4} \cos \left (b x +c \right )^{2} \sin \left (b x +a \right )^{2}+40 b^{4} \cos \left (b x +c \right )^{2} \cos \left (b x +a \right )^{2}+24 \sin \left (b x +c \right )^{2} b^{4} \sin \left (b x +a \right )^{2}-32 \sin \left (b x +c \right )^{2} \cos \left (b x +a \right )^{2} b^{4}\right )}{64 b^{4}}\) | \(397\) |
Input:
int(cos(b*x+a)^2*cos(b*x+c)^2,x,method=_RETURNVERBOSE)
Output:
1/4*x+1/8*x*cos(2*a-2*c)+1/8*sin(2*b*x+2*a)/b+1/8*sin(2*b*x+2*c)/b+1/32*si n(4*b*x+2*a+2*c)/b
Time = 0.08 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.42 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=-\frac {4 \, \cos \left (b x + c\right )^{4} \cos \left (-a + c\right ) \sin \left (-a + c\right ) - 2 \, b x \cos \left (-a + c\right )^{2} - b x - {\left (2 \, {\left (2 \, \cos \left (-a + c\right )^{2} - 1\right )} \cos \left (b x + c\right )^{3} + {\left (2 \, \cos \left (-a + c\right )^{2} + 1\right )} \cos \left (b x + c\right )\right )} \sin \left (b x + c\right )}{8 \, b} \] Input:
integrate(cos(b*x+a)^2*cos(b*x+c)^2,x, algorithm="fricas")
Output:
-1/8*(4*cos(b*x + c)^4*cos(-a + c)*sin(-a + c) - 2*b*x*cos(-a + c)^2 - b*x - (2*(2*cos(-a + c)^2 - 1)*cos(b*x + c)^3 + (2*cos(-a + c)^2 + 1)*cos(b*x + c))*sin(b*x + c))/b
Leaf count of result is larger than twice the leaf count of optimal. 204 vs. \(2 (56) = 112\).
Time = 0.84 (sec) , antiderivative size = 204, normalized size of antiderivative = 3.09 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=\begin {cases} \frac {3 x \sin ^{2}{\left (a + b x \right )} \sin ^{2}{\left (b x + c \right )}}{8} + \frac {x \sin ^{2}{\left (a + b x \right )} \cos ^{2}{\left (b x + c \right )}}{8} + \frac {x \sin {\left (a + b x \right )} \sin {\left (b x + c \right )} \cos {\left (a + b x \right )} \cos {\left (b x + c \right )}}{2} + \frac {x \sin ^{2}{\left (b x + c \right )} \cos ^{2}{\left (a + b x \right )}}{8} + \frac {3 x \cos ^{2}{\left (a + b x \right )} \cos ^{2}{\left (b x + c \right )}}{8} + \frac {\sin ^{2}{\left (a + b x \right )} \sin {\left (b x + c \right )} \cos {\left (b x + c \right )}}{2 b} - \frac {\sin {\left (a + b x \right )} \sin ^{2}{\left (b x + c \right )} \cos {\left (a + b x \right )}}{8 b} + \frac {5 \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} \cos ^{2}{\left (b x + c \right )}}{8 b} & \text {for}\: b \neq 0 \\x \cos ^{2}{\left (a \right )} \cos ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(b*x+a)**2*cos(b*x+c)**2,x)
Output:
Piecewise((3*x*sin(a + b*x)**2*sin(b*x + c)**2/8 + x*sin(a + b*x)**2*cos(b *x + c)**2/8 + x*sin(a + b*x)*sin(b*x + c)*cos(a + b*x)*cos(b*x + c)/2 + x *sin(b*x + c)**2*cos(a + b*x)**2/8 + 3*x*cos(a + b*x)**2*cos(b*x + c)**2/8 + sin(a + b*x)**2*sin(b*x + c)*cos(b*x + c)/(2*b) - sin(a + b*x)*sin(b*x + c)**2*cos(a + b*x)/(8*b) + 5*sin(a + b*x)*cos(a + b*x)*cos(b*x + c)**2/( 8*b), Ne(b, 0)), (x*cos(a)**2*cos(c)**2, True))
Time = 0.04 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.86 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=\frac {4 \, {\left (b \cos \left (-2 \, a + 2 \, c\right ) + 2 \, b\right )} x + \sin \left (4 \, b x + 2 \, a + 2 \, c\right ) + 4 \, \sin \left (2 \, b x + 2 \, a\right ) + 4 \, \sin \left (2 \, b x + 2 \, c\right )}{32 \, b} \] Input:
integrate(cos(b*x+a)^2*cos(b*x+c)^2,x, algorithm="maxima")
Output:
1/32*(4*(b*cos(-2*a + 2*c) + 2*b)*x + sin(4*b*x + 2*a + 2*c) + 4*sin(2*b*x + 2*a) + 4*sin(2*b*x + 2*c))/b
Time = 0.13 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.91 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=\frac {1}{8} \, x \cos \left (2 \, a - 2 \, c\right ) + \frac {1}{4} \, x + \frac {\sin \left (4 \, b x + 2 \, a + 2 \, c\right )}{32 \, b} + \frac {\sin \left (2 \, b x + 2 \, a\right )}{8 \, b} + \frac {\sin \left (2 \, b x + 2 \, c\right )}{8 \, b} \] Input:
integrate(cos(b*x+a)^2*cos(b*x+c)^2,x, algorithm="giac")
Output:
1/8*x*cos(2*a - 2*c) + 1/4*x + 1/32*sin(4*b*x + 2*a + 2*c)/b + 1/8*sin(2*b *x + 2*a)/b + 1/8*sin(2*b*x + 2*c)/b
Time = 19.16 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.80 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=\frac {\frac {\sin \left (2\,a+2\,c+4\,b\,x\right )}{4}+\sin \left (2\,a+2\,b\,x\right )+\sin \left (2\,c+2\,b\,x\right )+2\,b\,x+b\,x\,\cos \left (2\,a-2\,c\right )}{8\,b} \] Input:
int(cos(a + b*x)^2*cos(c + b*x)^2,x)
Output:
(sin(2*a + 2*c + 4*b*x)/4 + sin(2*a + 2*b*x) + sin(2*c + 2*b*x) + 2*b*x + b*x*cos(2*a - 2*c))/(8*b)
Time = 0.17 (sec) , antiderivative size = 182, normalized size of antiderivative = 2.76 \[ \int \cos ^2(a+b x) \cos ^2(c+b x) \, dx=\frac {12 \cos \left (b x +c \right ) \cos \left (b x +a \right ) \sin \left (b x +c \right ) \sin \left (b x +a \right ) b x -2 \cos \left (b x +c \right ) \sin \left (b x +c \right ) \sin \left (b x +a \right )^{2}+7 \cos \left (b x +c \right ) \sin \left (b x +c \right )-8 \cos \left (b x +c \right ) \sin \left (b x +a \right )-4 \cos \left (b x +a \right ) \sin \left (b x +c \right )^{2} \sin \left (b x +a \right )+8 \cos \left (b x +a \right ) \sin \left (b x +c \right )+8 \cos \left (b x +a \right ) \sin \left (b x +a \right )+12 \sin \left (b x +c \right )^{2} \sin \left (b x +a \right )^{2} b x -6 \sin \left (b x +c \right )^{2} b x -6 \sin \left (b x +a \right )^{2} b x +9 b x}{24 b} \] Input:
int(cos(b*x+a)^2*cos(b*x+c)^2,x)
Output:
(12*cos(b*x + c)*cos(a + b*x)*sin(b*x + c)*sin(a + b*x)*b*x - 2*cos(b*x + c)*sin(b*x + c)*sin(a + b*x)**2 + 7*cos(b*x + c)*sin(b*x + c) - 8*cos(b*x + c)*sin(a + b*x) - 4*cos(a + b*x)*sin(b*x + c)**2*sin(a + b*x) + 8*cos(a + b*x)*sin(b*x + c) + 8*cos(a + b*x)*sin(a + b*x) + 12*sin(b*x + c)**2*sin (a + b*x)**2*b*x - 6*sin(b*x + c)**2*b*x - 6*sin(a + b*x)**2*b*x + 9*b*x)/ (24*b)