\(\int (c+d x)^3 \sin (a+b x) \, dx\) [2]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 71 \[ \int (c+d x)^3 \sin (a+b x) \, dx=\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}-\frac {(c+d x)^3 \cos (a+b x)}{b}-\frac {6 d^3 \sin (a+b x)}{b^4}+\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2} \] Output:

6*d^2*(d*x+c)*cos(b*x+a)/b^3-(d*x+c)^3*cos(b*x+a)/b-6*d^3*sin(b*x+a)/b^4+3 
*d*(d*x+c)^2*sin(b*x+a)/b^2
 

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.87 \[ \int (c+d x)^3 \sin (a+b x) \, dx=\frac {-b (c+d x) \left (-6 d^2+b^2 (c+d x)^2\right ) \cos (a+b x)+3 d \left (-2 d^2+b^2 (c+d x)^2\right ) \sin (a+b x)}{b^4} \] Input:

Integrate[(c + d*x)^3*Sin[a + b*x],x]
 

Output:

(-(b*(c + d*x)*(-6*d^2 + b^2*(c + d*x)^2)*Cos[a + b*x]) + 3*d*(-2*d^2 + b^ 
2*(c + d*x)^2)*Sin[a + b*x])/b^4
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.08, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.643, Rules used = {3042, 3777, 3042, 3777, 25, 3042, 3777, 3042, 3117}

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 (c+d x)^3 \sin (a+b x) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x)^3 \sin (a+b x)dx\)

\(\Big \downarrow \) 3777

\(\displaystyle \frac {3 d \int (c+d x)^2 \cos (a+b x)dx}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {3 d \int (c+d x)^2 \sin \left (a+b x+\frac {\pi }{2}\right )dx}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

\(\Big \downarrow \) 3777

\(\displaystyle \frac {3 d \left (\frac {2 d \int -((c+d x) \sin (a+b x))dx}{b}+\frac {(c+d x)^2 \sin (a+b x)}{b}\right )}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {3 d \left (\frac {(c+d x)^2 \sin (a+b x)}{b}-\frac {2 d \int (c+d x) \sin (a+b x)dx}{b}\right )}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {3 d \left (\frac {(c+d x)^2 \sin (a+b x)}{b}-\frac {2 d \int (c+d x) \sin (a+b x)dx}{b}\right )}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

\(\Big \downarrow \) 3777

\(\displaystyle \frac {3 d \left (\frac {(c+d x)^2 \sin (a+b x)}{b}-\frac {2 d \left (\frac {d \int \cos (a+b x)dx}{b}-\frac {(c+d x) \cos (a+b x)}{b}\right )}{b}\right )}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {3 d \left (\frac {(c+d x)^2 \sin (a+b x)}{b}-\frac {2 d \left (\frac {d \int \sin \left (a+b x+\frac {\pi }{2}\right )dx}{b}-\frac {(c+d x) \cos (a+b x)}{b}\right )}{b}\right )}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

\(\Big \downarrow \) 3117

\(\displaystyle \frac {3 d \left (\frac {(c+d x)^2 \sin (a+b x)}{b}-\frac {2 d \left (\frac {d \sin (a+b x)}{b^2}-\frac {(c+d x) \cos (a+b x)}{b}\right )}{b}\right )}{b}-\frac {(c+d x)^3 \cos (a+b x)}{b}\)

Input:

Int[(c + d*x)^3*Sin[a + b*x],x]
 

Output:

-(((c + d*x)^3*Cos[a + b*x])/b) + (3*d*(((c + d*x)^2*Sin[a + b*x])/b - (2* 
d*(-(((c + d*x)*Cos[a + b*x])/b) + (d*Sin[a + b*x])/b^2))/b))/b
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3117
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; 
 FreeQ[{c, d}, x]
 

rule 3777
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( 
-(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f)   Int[(c + d*x)^(m - 1)*C 
os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
 
Maple [A] (verified)

Time = 0.87 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.52

method result size
risch \(-\frac {\left (b^{2} d^{3} x^{3}+3 b^{2} c \,d^{2} x^{2}+3 b^{2} c^{2} d x +b^{2} c^{3}-6 d^{3} x -6 c \,d^{2}\right ) \cos \left (b x +a \right )}{b^{3}}+\frac {3 d \left (x^{2} d^{2} b^{2}+2 b^{2} c d x +b^{2} c^{2}-2 d^{2}\right ) \sin \left (b x +a \right )}{b^{4}}\) \(108\)
orering \(\frac {6 d \left (x^{2} d^{2} b^{2}+2 b^{2} c d x +b^{2} c^{2}-4 d^{2}\right ) \sin \left (b x +a \right )}{b^{4}}-\frac {\left (x^{2} d^{2} b^{2}+2 b^{2} c d x +b^{2} c^{2}-6 d^{2}\right ) \left (3 \left (d x +c \right )^{2} \sin \left (b x +a \right ) d +\left (d x +c \right )^{3} b \cos \left (b x +a \right )\right )}{\left (d x +c \right )^{2} b^{4}}\) \(120\)
parallelrisch \(\frac {3 d b x \left (\left (\frac {1}{3} x^{2} d^{2}+c d x +c^{2}\right ) b^{2}-2 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}+6 d \left (\left (d x +c \right )^{2} b^{2}-2 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )-2 \left (\frac {d x}{2}+c \right ) \left (\left (x^{2} d^{2}+c d x +c^{2}\right ) b^{2}-6 d^{2}\right ) b}{b^{4} \left (1+\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}\right )}\) \(126\)
parts \(-\frac {\cos \left (b x +a \right ) d^{3} x^{3}}{b}-\frac {3 \cos \left (b x +a \right ) c \,d^{2} x^{2}}{b}-\frac {3 \cos \left (b x +a \right ) c^{2} d x}{b}-\frac {\cos \left (b x +a \right ) c^{3}}{b}+\frac {3 d \left (\frac {a^{2} d^{2} \sin \left (b x +a \right )}{b^{2}}-\frac {2 a c d \sin \left (b x +a \right )}{b}-\frac {2 a \,d^{2} \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{2}}+c^{2} \sin \left (b x +a \right )+\frac {2 c d \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b}+\frac {d^{2} \left (\left (b x +a \right )^{2} \sin \left (b x +a \right )-2 \sin \left (b x +a \right )+2 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{2}}\right )}{b^{2}}\) \(211\)
norman \(\frac {\frac {\left (2 b^{2} c^{3}-12 c \,d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{b^{3}}+\frac {d^{3} x^{3} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{b}-\frac {d^{3} x^{3}}{b}-\frac {3 d \left (b^{2} c^{2}-2 d^{2}\right ) x}{b^{3}}-\frac {3 c \,d^{2} x^{2}}{b}+\frac {6 d \left (b^{2} c^{2}-2 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b^{4}}+\frac {6 d^{3} x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}}+\frac {3 d \left (b^{2} c^{2}-2 d^{2}\right ) x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{b^{3}}+\frac {3 c \,d^{2} x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{b}+\frac {12 c \,d^{2} x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}}}{1+\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}\) \(233\)
derivativedivides \(\frac {\frac {a^{3} d^{3} \cos \left (b x +a \right )}{b^{3}}-\frac {3 a^{2} c \,d^{2} \cos \left (b x +a \right )}{b^{2}}+\frac {3 a^{2} d^{3} \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{3}}+\frac {3 a \,c^{2} d \cos \left (b x +a \right )}{b}-\frac {6 a c \,d^{2} \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{2}}-\frac {3 a \,d^{3} \left (-\left (b x +a \right )^{2} \cos \left (b x +a \right )+2 \cos \left (b x +a \right )+2 \left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{3}}-c^{3} \cos \left (b x +a \right )+\frac {3 c^{2} d \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b}+\frac {3 c \,d^{2} \left (-\left (b x +a \right )^{2} \cos \left (b x +a \right )+2 \cos \left (b x +a \right )+2 \left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{2}}+\frac {d^{3} \left (-\left (b x +a \right )^{3} \cos \left (b x +a \right )+3 \left (b x +a \right )^{2} \sin \left (b x +a \right )-6 \sin \left (b x +a \right )+6 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{3}}}{b}\) \(308\)
default \(\frac {\frac {a^{3} d^{3} \cos \left (b x +a \right )}{b^{3}}-\frac {3 a^{2} c \,d^{2} \cos \left (b x +a \right )}{b^{2}}+\frac {3 a^{2} d^{3} \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{3}}+\frac {3 a \,c^{2} d \cos \left (b x +a \right )}{b}-\frac {6 a c \,d^{2} \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{2}}-\frac {3 a \,d^{3} \left (-\left (b x +a \right )^{2} \cos \left (b x +a \right )+2 \cos \left (b x +a \right )+2 \left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{3}}-c^{3} \cos \left (b x +a \right )+\frac {3 c^{2} d \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b}+\frac {3 c \,d^{2} \left (-\left (b x +a \right )^{2} \cos \left (b x +a \right )+2 \cos \left (b x +a \right )+2 \left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{2}}+\frac {d^{3} \left (-\left (b x +a \right )^{3} \cos \left (b x +a \right )+3 \left (b x +a \right )^{2} \sin \left (b x +a \right )-6 \sin \left (b x +a \right )+6 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{3}}}{b}\) \(308\)
meijerg \(\frac {8 d^{3} \sin \left (a \right ) \sqrt {\pi }\, \left (\frac {3}{4 \sqrt {\pi }}-\frac {\left (-\frac {3 x^{2} b^{2}}{2}+3\right ) \cos \left (b x \right )}{4 \sqrt {\pi }}-\frac {x b \left (-\frac {x^{2} b^{2}}{2}+3\right ) \sin \left (b x \right )}{4 \sqrt {\pi }}\right )}{b^{4}}+\frac {8 d^{3} \cos \left (a \right ) \sqrt {\pi }\, \left (\frac {x b \left (-\frac {5 x^{2} b^{2}}{2}+15\right ) \cos \left (b x \right )}{20 \sqrt {\pi }}-\frac {\left (-\frac {15 x^{2} b^{2}}{2}+15\right ) \sin \left (b x \right )}{20 \sqrt {\pi }}\right )}{b^{4}}+\frac {12 c \,d^{2} \sin \left (a \right ) \sqrt {\pi }\, \left (\frac {x \left (b^{2}\right )^{\frac {3}{2}} \cos \left (b x \right )}{2 \sqrt {\pi }\, b^{2}}-\frac {\left (b^{2}\right )^{\frac {3}{2}} \left (-\frac {3 x^{2} b^{2}}{2}+3\right ) \sin \left (b x \right )}{6 \sqrt {\pi }\, b^{3}}\right )}{b^{2} \sqrt {b^{2}}}+\frac {12 c \,d^{2} \cos \left (a \right ) \sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\left (-\frac {x^{2} b^{2}}{2}+1\right ) \cos \left (b x \right )}{2 \sqrt {\pi }}+\frac {x b \sin \left (b x \right )}{2 \sqrt {\pi }}\right )}{b^{3}}+\frac {6 d \,c^{2} \sin \left (a \right ) \sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (b x \right )}{2 \sqrt {\pi }}+\frac {x b \sin \left (b x \right )}{2 \sqrt {\pi }}\right )}{b^{2}}+\frac {6 d \,c^{2} \cos \left (a \right ) \sqrt {\pi }\, \left (-\frac {x b \cos \left (b x \right )}{2 \sqrt {\pi }}+\frac {\sin \left (b x \right )}{2 \sqrt {\pi }}\right )}{b^{2}}+\frac {c^{3} \sin \left (a \right ) \sin \left (b x \right )}{b}+\frac {c^{3} \cos \left (a \right ) \sqrt {\pi }\, \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (b x \right )}{\sqrt {\pi }}\right )}{b}\) \(343\)

Input:

int((d*x+c)^3*sin(b*x+a),x,method=_RETURNVERBOSE)
 

Output:

-1/b^3*(b^2*d^3*x^3+3*b^2*c*d^2*x^2+3*b^2*c^2*d*x+b^2*c^3-6*d^3*x-6*c*d^2) 
*cos(b*x+a)+3*d*(b^2*d^2*x^2+2*b^2*c*d*x+b^2*c^2-2*d^2)/b^4*sin(b*x+a)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.55 \[ \int (c+d x)^3 \sin (a+b x) \, dx=-\frac {{\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + b^{3} c^{3} - 6 \, b c d^{2} + 3 \, {\left (b^{3} c^{2} d - 2 \, b d^{3}\right )} x\right )} \cos \left (b x + a\right ) - 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d - 2 \, d^{3}\right )} \sin \left (b x + a\right )}{b^{4}} \] Input:

integrate((d*x+c)^3*sin(b*x+a),x, algorithm="fricas")
 

Output:

-((b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + b^3*c^3 - 6*b*c*d^2 + 3*(b^3*c^2*d - 2* 
b*d^3)*x)*cos(b*x + a) - 3*(b^2*d^3*x^2 + 2*b^2*c*d^2*x + b^2*c^2*d - 2*d^ 
3)*sin(b*x + a))/b^4
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (70) = 140\).

Time = 0.28 (sec) , antiderivative size = 202, normalized size of antiderivative = 2.85 \[ \int (c+d x)^3 \sin (a+b x) \, dx=\begin {cases} - \frac {c^{3} \cos {\left (a + b x \right )}}{b} - \frac {3 c^{2} d x \cos {\left (a + b x \right )}}{b} - \frac {3 c d^{2} x^{2} \cos {\left (a + b x \right )}}{b} - \frac {d^{3} x^{3} \cos {\left (a + b x \right )}}{b} + \frac {3 c^{2} d \sin {\left (a + b x \right )}}{b^{2}} + \frac {6 c d^{2} x \sin {\left (a + b x \right )}}{b^{2}} + \frac {3 d^{3} x^{2} \sin {\left (a + b x \right )}}{b^{2}} + \frac {6 c d^{2} \cos {\left (a + b x \right )}}{b^{3}} + \frac {6 d^{3} x \cos {\left (a + b x \right )}}{b^{3}} - \frac {6 d^{3} \sin {\left (a + b x \right )}}{b^{4}} & \text {for}\: b \neq 0 \\\left (c^{3} x + \frac {3 c^{2} d x^{2}}{2} + c d^{2} x^{3} + \frac {d^{3} x^{4}}{4}\right ) \sin {\left (a \right )} & \text {otherwise} \end {cases} \] Input:

integrate((d*x+c)**3*sin(b*x+a),x)
 

Output:

Piecewise((-c**3*cos(a + b*x)/b - 3*c**2*d*x*cos(a + b*x)/b - 3*c*d**2*x** 
2*cos(a + b*x)/b - d**3*x**3*cos(a + b*x)/b + 3*c**2*d*sin(a + b*x)/b**2 + 
 6*c*d**2*x*sin(a + b*x)/b**2 + 3*d**3*x**2*sin(a + b*x)/b**2 + 6*c*d**2*c 
os(a + b*x)/b**3 + 6*d**3*x*cos(a + b*x)/b**3 - 6*d**3*sin(a + b*x)/b**4, 
Ne(b, 0)), ((c**3*x + 3*c**2*d*x**2/2 + c*d**2*x**3 + d**3*x**4/4)*sin(a), 
 True))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 285 vs. \(2 (71) = 142\).

Time = 0.05 (sec) , antiderivative size = 285, normalized size of antiderivative = 4.01 \[ \int (c+d x)^3 \sin (a+b x) \, dx=-\frac {c^{3} \cos \left (b x + a\right ) - \frac {3 \, a c^{2} d \cos \left (b x + a\right )}{b} + \frac {3 \, a^{2} c d^{2} \cos \left (b x + a\right )}{b^{2}} - \frac {a^{3} d^{3} \cos \left (b x + a\right )}{b^{3}} + \frac {3 \, {\left ({\left (b x + a\right )} \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right )} c^{2} d}{b} - \frac {6 \, {\left ({\left (b x + a\right )} \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right )} a c d^{2}}{b^{2}} + \frac {3 \, {\left ({\left (b x + a\right )} \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right )} a^{2} d^{3}}{b^{3}} + \frac {3 \, {\left ({\left ({\left (b x + a\right )}^{2} - 2\right )} \cos \left (b x + a\right ) - 2 \, {\left (b x + a\right )} \sin \left (b x + a\right )\right )} c d^{2}}{b^{2}} - \frac {3 \, {\left ({\left ({\left (b x + a\right )}^{2} - 2\right )} \cos \left (b x + a\right ) - 2 \, {\left (b x + a\right )} \sin \left (b x + a\right )\right )} a d^{3}}{b^{3}} + \frac {{\left ({\left ({\left (b x + a\right )}^{3} - 6 \, b x - 6 \, a\right )} \cos \left (b x + a\right ) - 3 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} d^{3}}{b^{3}}}{b} \] Input:

integrate((d*x+c)^3*sin(b*x+a),x, algorithm="maxima")
 

Output:

-(c^3*cos(b*x + a) - 3*a*c^2*d*cos(b*x + a)/b + 3*a^2*c*d^2*cos(b*x + a)/b 
^2 - a^3*d^3*cos(b*x + a)/b^3 + 3*((b*x + a)*cos(b*x + a) - sin(b*x + a))* 
c^2*d/b - 6*((b*x + a)*cos(b*x + a) - sin(b*x + a))*a*c*d^2/b^2 + 3*((b*x 
+ a)*cos(b*x + a) - sin(b*x + a))*a^2*d^3/b^3 + 3*(((b*x + a)^2 - 2)*cos(b 
*x + a) - 2*(b*x + a)*sin(b*x + a))*c*d^2/b^2 - 3*(((b*x + a)^2 - 2)*cos(b 
*x + a) - 2*(b*x + a)*sin(b*x + a))*a*d^3/b^3 + (((b*x + a)^3 - 6*b*x - 6* 
a)*cos(b*x + a) - 3*((b*x + a)^2 - 2)*sin(b*x + a))*d^3/b^3)/b
 

Giac [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.56 \[ \int (c+d x)^3 \sin (a+b x) \, dx=-\frac {{\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3} - 6 \, b d^{3} x - 6 \, b c d^{2}\right )} \cos \left (b x + a\right )}{b^{4}} + \frac {3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d - 2 \, d^{3}\right )} \sin \left (b x + a\right )}{b^{4}} \] Input:

integrate((d*x+c)^3*sin(b*x+a),x, algorithm="giac")
 

Output:

-(b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c^2*d*x + b^3*c^3 - 6*b*d^3*x - 6* 
b*c*d^2)*cos(b*x + a)/b^4 + 3*(b^2*d^3*x^2 + 2*b^2*c*d^2*x + b^2*c^2*d - 2 
*d^3)*sin(b*x + a)/b^4
 

Mupad [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 147, normalized size of antiderivative = 2.07 \[ \int (c+d x)^3 \sin (a+b x) \, dx=\frac {\cos \left (a+b\,x\right )\,\left (6\,c\,d^2-b^2\,c^3\right )}{b^3}-\frac {3\,\sin \left (a+b\,x\right )\,\left (2\,d^3-b^2\,c^2\,d\right )}{b^4}-\frac {d^3\,x^3\,\cos \left (a+b\,x\right )}{b}+\frac {3\,d^3\,x^2\,\sin \left (a+b\,x\right )}{b^2}+\frac {3\,x\,\cos \left (a+b\,x\right )\,\left (2\,d^3-b^2\,c^2\,d\right )}{b^3}+\frac {6\,c\,d^2\,x\,\sin \left (a+b\,x\right )}{b^2}-\frac {3\,c\,d^2\,x^2\,\cos \left (a+b\,x\right )}{b} \] Input:

int(sin(a + b*x)*(c + d*x)^3,x)
 

Output:

(cos(a + b*x)*(6*c*d^2 - b^2*c^3))/b^3 - (3*sin(a + b*x)*(2*d^3 - b^2*c^2* 
d))/b^4 - (d^3*x^3*cos(a + b*x))/b + (3*d^3*x^2*sin(a + b*x))/b^2 + (3*x*c 
os(a + b*x)*(2*d^3 - b^2*c^2*d))/b^3 + (6*c*d^2*x*sin(a + b*x))/b^2 - (3*c 
*d^2*x^2*cos(a + b*x))/b
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 155, normalized size of antiderivative = 2.18 \[ \int (c+d x)^3 \sin (a+b x) \, dx=\frac {-\cos \left (b x +a \right ) b^{3} c^{3}-3 \cos \left (b x +a \right ) b^{3} c^{2} d x -3 \cos \left (b x +a \right ) b^{3} c \,d^{2} x^{2}-\cos \left (b x +a \right ) b^{3} d^{3} x^{3}+6 \cos \left (b x +a \right ) b c \,d^{2}+6 \cos \left (b x +a \right ) b \,d^{3} x +3 \sin \left (b x +a \right ) b^{2} c^{2} d +6 \sin \left (b x +a \right ) b^{2} c \,d^{2} x +3 \sin \left (b x +a \right ) b^{2} d^{3} x^{2}-6 \sin \left (b x +a \right ) d^{3}}{b^{4}} \] Input:

int((d*x+c)^3*sin(b*x+a),x)
 

Output:

( - cos(a + b*x)*b**3*c**3 - 3*cos(a + b*x)*b**3*c**2*d*x - 3*cos(a + b*x) 
*b**3*c*d**2*x**2 - cos(a + b*x)*b**3*d**3*x**3 + 6*cos(a + b*x)*b*c*d**2 
+ 6*cos(a + b*x)*b*d**3*x + 3*sin(a + b*x)*b**2*c**2*d + 6*sin(a + b*x)*b* 
*2*c*d**2*x + 3*sin(a + b*x)*b**2*d**3*x**2 - 6*sin(a + b*x)*d**3)/b**4