Integrand size = 17, antiderivative size = 66 \[ \int \sin ^2(a+b x) \sin ^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.08 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.82 \[ \int \sin ^2(a+b x) \sin ^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[Sin[a + b*x]^2*Sin[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 = {5080, 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 \sin ^2(a+b x) \sin ^2(b x+c) \, dx\) |
\(\Big \downarrow \) 5080 |
\(\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[Sin[a + b*x]^2*Sin[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[Sin[v_]^(p_.)*Sin[w_]^(q_.), x_Symbol] :> Int[ExpandTrigReduce[Sin[v]^p *Sin[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.38 (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 )+3 \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 \sin \left (b x +a \right )^{2} \sin \left (b x +c \right )^{2}-\frac {5 \left (2 \sin \left (b x +c \right )^{2} \cos \left (b x +a \right ) b \sin \left (b x +a \right )+2 b \sin \left (b x +a \right )^{2} \cos \left (b x +c \right ) \sin \left (b x +c \right )\right )}{16 b^{2}}+\frac {5 x \left (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 \sin \left (b x +c \right )^{2} b^{2} \sin \left (b x +a \right )^{2}+2 \sin \left (b x +c \right )^{2} \cos \left (b x +a \right )^{2} b^{2}+2 b^{2} \sin \left (b x +a \right )^{2} \cos \left (b x +c \right )^{2}\right )}{16 b^{2}}-\frac {12 b^{3} \cos \left (b x +c \right )^{2} \cos \left (b x +a \right ) \sin \left (b x +a \right )-20 \sin \left (b x +c \right ) b^{3} \sin \left (b x +a \right )^{2} \cos \left (b x +c \right )-20 \sin \left (b x +c \right )^{2} \cos \left (b x +a \right ) b^{3} \sin \left (b x +a \right )+12 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}+24 b^{4} \cos \left (b x +c \right )^{2} \cos \left (b x +a \right )^{2}+40 \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(sin(b*x+a)^2*sin(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 = 111, normalized size of antiderivative = 1.68 \[ \int \sin ^2(a+b x) \sin ^2(c+b x) \, dx=\frac {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 (6 \, \cos \left (-a + c\right )^{2} - 1\right )} \cos \left (b x + c\right )\right )} \sin \left (b x + c\right ) - 4 \, {\left (\cos \left (b x + c\right )^{4} \cos \left (-a + c\right ) - 2 \, \cos \left (b x + c\right )^{2} \cos \left (-a + c\right )\right )} \sin \left (-a + c\right )}{8 \, b} \] Input:
integrate(sin(b*x+a)^2*sin(b*x+c)^2,x, algorithm="fricas")
Output:
1/8*(2*b*x*cos(-a + c)^2 + b*x + (2*(2*cos(-a + c)^2 - 1)*cos(b*x + c)^3 - (6*cos(-a + c)^2 - 1)*cos(b*x + c))*sin(b*x + c) - 4*(cos(b*x + c)^4*cos( -a + c) - 2*cos(b*x + c)^2*cos(-a + c))*sin(-a + c))/b
Leaf count of result is larger than twice the leaf count of optimal. 204 vs. \(2 (56) = 112\).
Time = 0.92 (sec) , antiderivative size = 204, normalized size of antiderivative = 3.09 \[ \int \sin ^2(a+b x) \sin ^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 )}}{8 b} - \frac {\sin {\left (a + b x \right )} \sin ^{2}{\left (b x + c \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {3 \sin {\left (b x + c \right )} \cos ^{2}{\left (a + b x \right )} \cos {\left (b x + c \right )}}{8 b} & \text {for}\: b \neq 0 \\x \sin ^{2}{\left (a \right )} \sin ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(sin(b*x+a)**2*sin(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)/(8*b) - sin(a + b*x)*sin(b*x + c)**2*cos(a + b*x)/(2*b) - 3*sin(b*x + c)*cos(a + b*x)**2*cos(b*x + c)/( 8*b), Ne(b, 0)), (x*sin(a)**2*sin(c)**2, True))
Time = 0.04 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.86 \[ \int \sin ^2(a+b x) \sin ^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(sin(b*x+a)^2*sin(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.11 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.91 \[ \int \sin ^2(a+b x) \sin ^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(sin(b*x+a)^2*sin(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 = 18.14 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.86 \[ \int \sin ^2(a+b x) \sin ^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(sin(a + b*x)^2*sin(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.16 (sec) , antiderivative size = 182, normalized size of antiderivative = 2.76 \[ \int \sin ^2(a+b x) \sin ^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 -10 \cos \left (b x +c \right ) \sin \left (b x +c \right ) \sin \left (b x +a \right )^{2}-\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(sin(b*x+a)^2*sin(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 - 10*cos(b*x + c)*sin(b*x + c)*sin(a + b*x)**2 - 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)