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

Optimal. Leaf size=71 \[ -\frac {6 d^3 \sin (a+b x)}{b^4}+\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {(c+d x)^3 \cos (a+b x)}{b} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3296, 2637} \[ \frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {6 d^3 \sin (a+b x)}{b^4}-\frac {(c+d x)^3 \cos (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2637

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

Rule 3296

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

Rubi steps

\begin {align*} \int (c+d x)^3 \sin (a+b x) \, dx &=-\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {(3 d) \int (c+d x)^2 \cos (a+b x) \, dx}{b}\\ &=-\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {\left (6 d^2\right ) \int (c+d x) \sin (a+b x) \, dx}{b^2}\\ &=\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}-\frac {(c+d x)^3 \cos (a+b x)}{b}+\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {\left (6 d^3\right ) \int \cos (a+b x) \, dx}{b^3}\\ &=\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}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.22, size = 62, normalized size = 0.87 \[ \frac {3 d \sin (a+b x) \left (b^2 (c+d x)^2-2 d^2\right )-b (c+d x) \cos (a+b x) \left (b^2 (c+d x)^2-6 d^2\right )}{b^4} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-(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

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 110, normalized size = 1.55 \[ -\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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-((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

________________________________________________________________________________________

giac [A]  time = 1.61, size = 111, normalized size = 1.56 \[ -\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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(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

________________________________________________________________________________________

maple [B]  time = 0.02, size = 308, normalized size = 4.34 \[ \frac {\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}}-\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}}+\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 {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 {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 c^{2} d \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b}+\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 \,c^{2} d \cos \left (b x +a \right )}{b}-c^{3} \cos \left (b x +a \right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.43, size = 285, normalized size = 4.01 \[ -\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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(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

________________________________________________________________________________________

mupad [B]  time = 0.62, size = 147, normalized size = 2.07 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(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*cos(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

________________________________________________________________________________________

sympy [A]  time = 1.61, size = 202, normalized size = 2.85 \[ \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 {\relax (a )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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
*cos(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))

________________________________________________________________________________________