Integrand size = 15, antiderivative size = 97 \[ \int \sin ^3(a+b x) \sin (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.34 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.94 \[ \int \sin ^3(a+b x) \sin (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[Sin[a + b*x]^3*Sin[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 = {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 ^3(a+b x) \sin (c+d x) \, dx\) |
\(\Big \downarrow \) 5080 |
\(\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[Sin[a + b*x]^3*Sin[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[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 = 3.94 (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 )}{8 \left (3 b -d \right )}+\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}}\) | \(130\) |
risch | \(\frac {27 \sin \left (b x -d x +a -c \right ) b^{3}}{8 \left (-b +d \right ) \left (-3 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 (-b +d \right ) \left (-3 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 (-b +d \right ) \left (-3 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 (-b +d \right ) \left (-3 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 (b -d \right ) \left (3 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 (b -d \right ) \left (3 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 (b -d \right ) \left (3 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 (b -d \right ) \left (3 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 (-b +d \right ) \left (-3 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 (-b +d \right ) \left (-3 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 (-b +d \right ) \left (-3 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 (-b +d \right ) \left (-3 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 (b -d \right ) \left (3 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 (b -d \right ) \left (3 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 (b -d \right ) \left (3 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 (b -d \right ) \left (3 b -d \right ) \left (3 b +d \right ) \left (b +d \right )}\) | \(730\) |
orering | \(\text {Expression too large to display}\) | \(950\) |
Input:
int(sin(b*x+a)^3*sin(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 = 115, normalized size of antiderivative = 1.19 \[ \int \sin ^3(a+b x) \sin (c+d x) \, dx=\frac {{\left (7 \, b^{2} d - d^{3} - {\left (b^{2} d - d^{3}\right )} \cos \left (b x + a\right )^{2}\right )} \cos \left (d x + c\right ) \sin \left (b x + a\right ) + 3 \, {\left ({\left (b^{3} - b d^{2}\right )} \cos \left (b x + a\right )^{3} - {\left (3 \, b^{3} - b d^{2}\right )} \cos \left (b x + a\right )\right )} \sin \left (d x + c\right )}{9 \, b^{4} - 10 \, b^{2} d^{2} + d^{4}} \] Input:
integrate(sin(b*x+a)^3*sin(d*x+c),x, algorithm="fricas")
Output:
((7*b^2*d - d^3 - (b^2*d - d^3)*cos(b*x + a)^2)*cos(d*x + c)*sin(b*x + a) + 3*((b^3 - b*d^2)*cos(b*x + a)^3 - (3*b^3 - b*d^2)*cos(b*x + a))*sin(d*x + c))/(9*b^4 - 10*b^2*d^2 + d^4)
Leaf count of result is larger than twice the leaf count of optimal. 933 vs. \(2 (76) = 152\).
Time = 2.05 (sec) , antiderivative size = 933, normalized size of antiderivative = 9.62 \[ \int \sin ^3(a+b x) \sin (c+d x) \, dx=\text {Too large to display} \] Input:
integrate(sin(b*x+a)**3*sin(d*x+c),x)
Output:
Piecewise((x*sin(a)**3*sin(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*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 + 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) + 3*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)*co s(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 - 9*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) - sin(c + d*x)*cos(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 - 9*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) + sin(c + d*x)*cos(a + d*x/3)**3/(8*d), Eq(b, d/3)), (3*x*s in(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*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 - 5*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) + 3*sin(c + d*x)*cos(a + d*x)**3/(8*d) , Eq(b, d)), (-9*b**3*sin(a + b*x)**2*sin(c + d*x)*cos(a + b*x)/(9*b**4 - 10*b**2*d**2 + d**4) - 6*b**3*sin(c + d*x)*cos(a + b*x)**3/(9*b**4 - 10...
Leaf count of result is larger than twice the leaf count of optimal. 789 vs. \(2 (89) = 178\).
Time = 0.08 (sec) , antiderivative size = 789, normalized size of antiderivative = 8.13 \[ \int \sin ^3(a+b x) \sin (c+d x) \, dx=\text {Too large to display} \] Input:
integrate(sin(b*x+a)^3*sin(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.12 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.92 \[ \int \sin ^3(a+b x) \sin (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(sin(b*x+a)^3*sin(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 = 17.85 (sec) , antiderivative size = 494, normalized size of antiderivative = 5.09 \[ \int \sin ^3(a+b x) \sin (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(sin(a + b*x)^3*sin(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*1 44i + 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*160 i) - (exp(- a*2i - b*x*2i)*(3*b*d^2 + 27*b^2*d - 27*b^3 - 3*d^3))/(b^4*144 i + 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.18 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.49 \[ \int \sin ^3(a+b x) \sin (c+d x) \, dx=\frac {-3 \cos \left (b x +a \right ) \sin \left (b x +a \right )^{2} \sin \left (d x +c \right ) b^{3}+3 \cos \left (b x +a \right ) \sin \left (b x +a \right )^{2} \sin \left (d x +c \right ) b \,d^{2}-6 \cos \left (b x +a \right ) \sin \left (d x +c \right ) b^{3}+\cos \left (d x +c \right ) \sin \left (b x +a \right )^{3} b^{2} d -\cos \left (d x +c \right ) \sin \left (b x +a \right )^{3} d^{3}+6 \cos \left (d x +c \right ) \sin \left (b x +a \right ) b^{2} d}{9 b^{4}-10 b^{2} d^{2}+d^{4}} \] Input:
int(sin(b*x+a)^3*sin(d*x+c),x)
Output:
( - 3*cos(a + b*x)*sin(a + b*x)**2*sin(c + d*x)*b**3 + 3*cos(a + b*x)*sin( a + b*x)**2*sin(c + d*x)*b*d**2 - 6*cos(a + b*x)*sin(c + d*x)*b**3 + cos(c + d*x)*sin(a + b*x)**3*b**2*d - cos(c + d*x)*sin(a + b*x)**3*d**3 + 6*cos (c + d*x)*sin(a + b*x)*b**2*d)/(9*b**4 - 10*b**2*d**2 + d**4)