Integrand size = 16, antiderivative size = 95 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=-\frac {d^2 x}{4 b^2}+\frac {(c+d x)^3}{6 d}+\frac {d^2 \cos (a+b x) \sin (a+b x)}{4 b^3}-\frac {(c+d x)^2 \cos (a+b x) \sin (a+b x)}{2 b}+\frac {d (c+d x) \sin ^2(a+b x)}{2 b^2} \] Output:
-1/4*d^2*x/b^2+1/6*(d*x+c)^3/d+1/4*d^2*cos(b*x+a)*sin(b*x+a)/b^3-1/2*(d*x+ c)^2*cos(b*x+a)*sin(b*x+a)/b+1/2*d*(d*x+c)*sin(b*x+a)^2/b^2
Time = 0.35 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.81 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=\frac {4 b^3 x \left (3 c^2+3 c d x+d^2 x^2\right )-6 b d (c+d x) \cos (2 (a+b x))-3 \left (-d^2+2 b^2 (c+d x)^2\right ) \sin (2 (a+b x))}{24 b^3} \] Input:
Integrate[(c + d*x)^2*Sin[a + b*x]^2,x]
Output:
(4*b^3*x*(3*c^2 + 3*c*d*x + d^2*x^2) - 6*b*d*(c + d*x)*Cos[2*(a + b*x)] - 3*(-d^2 + 2*b^2*(c + d*x)^2)*Sin[2*(a + b*x)])/(24*b^3)
Time = 0.32 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.02, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3042, 3792, 17, 3042, 3115, 24}
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)^2 \sin ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^2 \sin (a+b x)^2dx\) |
\(\Big \downarrow \) 3792 |
\(\displaystyle -\frac {d^2 \int \sin ^2(a+b x)dx}{2 b^2}+\frac {1}{2} \int (c+d x)^2dx+\frac {d (c+d x) \sin ^2(a+b x)}{2 b^2}-\frac {(c+d x)^2 \sin (a+b x) \cos (a+b x)}{2 b}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle -\frac {d^2 \int \sin ^2(a+b x)dx}{2 b^2}+\frac {d (c+d x) \sin ^2(a+b x)}{2 b^2}-\frac {(c+d x)^2 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^3}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {d^2 \int \sin (a+b x)^2dx}{2 b^2}+\frac {d (c+d x) \sin ^2(a+b x)}{2 b^2}-\frac {(c+d x)^2 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^3}{6 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle -\frac {d^2 \left (\frac {\int 1dx}{2}-\frac {\sin (a+b x) \cos (a+b x)}{2 b}\right )}{2 b^2}+\frac {d (c+d x) \sin ^2(a+b x)}{2 b^2}-\frac {(c+d x)^2 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^3}{6 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {d (c+d x) \sin ^2(a+b x)}{2 b^2}-\frac {d^2 \left (\frac {x}{2}-\frac {\sin (a+b x) \cos (a+b x)}{2 b}\right )}{2 b^2}-\frac {(c+d x)^2 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^3}{6 d}\) |
Input:
Int[(c + d*x)^2*Sin[a + b*x]^2,x]
Output:
(c + d*x)^3/(6*d) - ((c + d*x)^2*Cos[a + b*x]*Sin[a + b*x])/(2*b) + (d*(c + d*x)*Sin[a + b*x]^2)/(2*b^2) - (d^2*(x/2 - (Cos[a + b*x]*Sin[a + b*x])/( 2*b)))/(2*b^2)
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 )/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbo l] :> Simp[d*m*(c + d*x)^(m - 1)*((b*Sin[e + f*x])^n/(f^2*n^2)), x] + (-Sim p[b*(c + d*x)^m*Cos[e + f*x]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x] + Simp[b^ 2*((n - 1)/n) Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[d^2 *m*((m - 1)/(f^2*n^2)) Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]
Time = 1.09 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.83
method | result | size |
parallelrisch | \(\frac {\left (-2 \left (d x +c \right )^{2} b^{2}+d^{2}\right ) \sin \left (2 b x +2 a \right )+4 b \left (-\frac {d \left (d x +c \right ) \cos \left (2 b x +2 a \right )}{2}+x \left (\frac {1}{3} x^{2} d^{2}+c d x +c^{2}\right ) b^{2}+\frac {c d}{2}\right )}{8 b^{3}}\) | \(79\) |
risch | \(\frac {d^{2} x^{3}}{6}+\frac {c d \,x^{2}}{2}+\frac {c^{2} x}{2}+\frac {c^{3}}{6 d}-\frac {d \left (d x +c \right ) \cos \left (2 b x +2 a \right )}{4 b^{2}}-\frac {\left (2 x^{2} d^{2} b^{2}+4 b^{2} c d x +2 b^{2} c^{2}-d^{2}\right ) \sin \left (2 b x +2 a \right )}{8 b^{3}}\) | \(98\) |
derivativedivides | \(\frac {\frac {a^{2} d^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}}-\frac {2 a c d \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b}-\frac {2 a \,d^{2} \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\sin \left (b x +a \right )^{2}}{4}\right )}{b^{2}}+c^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )+\frac {2 c d \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\sin \left (b x +a \right )^{2}}{4}\right )}{b}+\frac {d^{2} \left (\left (b x +a \right )^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right ) \cos \left (b x +a \right )^{2}}{2}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}-\frac {\left (b x +a \right )^{3}}{3}\right )}{b^{2}}}{b}\) | \(289\) |
default | \(\frac {\frac {a^{2} d^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}}-\frac {2 a c d \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b}-\frac {2 a \,d^{2} \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\sin \left (b x +a \right )^{2}}{4}\right )}{b^{2}}+c^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )+\frac {2 c d \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\sin \left (b x +a \right )^{2}}{4}\right )}{b}+\frac {d^{2} \left (\left (b x +a \right )^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right ) \cos \left (b x +a \right )^{2}}{2}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}-\frac {\left (b x +a \right )^{3}}{3}\right )}{b^{2}}}{b}\) | \(289\) |
norman | \(\frac {c d \,x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}+\frac {d^{2} x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{3}}{b}+\frac {d^{2} x^{3}}{6}+\frac {c d \,x^{2}}{2}+\frac {d^{2} x^{3} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{3}+\frac {d^{2} x^{3} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{4}}{6}-\frac {\left (2 b^{2} c^{2}-d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b^{3}}+\frac {\left (2 b^{2} c^{2}-d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{3}}{2 b^{3}}+\frac {\left (2 b^{2} c^{2}-d^{2}\right ) x}{4 b^{2}}+\frac {2 c d \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{b^{2}}+\frac {c d \,x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{4}}{2}-\frac {d^{2} x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}+\frac {\left (2 b^{2} c^{2}-d^{2}\right ) x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{4}}{4 b^{2}}+\frac {\left (2 b^{2} c^{2}+3 d^{2}\right ) x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{2 b^{2}}-\frac {2 c d x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}+\frac {2 c d x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{3}}{b}}{\left (1+\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}\right )^{2}}\) | \(341\) |
orering | \(\frac {\left (4 b^{4} d^{4} x^{5}+20 b^{4} c \,d^{3} x^{4}+40 b^{4} c^{2} d^{2} x^{3}+36 b^{4} c^{3} d \,x^{2}+12 b^{4} c^{4} x +12 b^{2} d^{4} x^{3}+42 b^{2} c \,d^{3} x^{2}+48 b^{2} c^{2} d^{2} x +12 b^{2} c^{3} d -12 d^{4} x -3 d^{3} c \right ) \sin \left (b x +a \right )^{2}}{12 \left (d x +c \right )^{2} b^{4}}-\frac {\left (14 b^{2} d^{3} x^{3}+42 b^{2} c \,d^{2} x^{2}+42 b^{2} c^{2} d x +6 b^{2} c^{3}-15 d^{3} x -3 c \,d^{2}\right ) \left (2 \left (d x +c \right ) \sin \left (b x +a \right )^{2} d +2 \left (d x +c \right )^{2} \sin \left (b x +a \right ) b \cos \left (b x +a \right )\right )}{24 b^{4} \left (d x +c \right )^{3}}+\frac {x \left (2 x^{2} d^{2} b^{2}+6 b^{2} c d x +6 b^{2} c^{2}-3 d^{2}\right ) \left (2 d^{2} \sin \left (b x +a \right )^{2}+8 \left (d x +c \right ) \sin \left (b x +a \right ) d b \cos \left (b x +a \right )+2 \left (d x +c \right )^{2} b^{2} \cos \left (b x +a \right )^{2}-2 \left (d x +c \right )^{2} \sin \left (b x +a \right )^{2} b^{2}\right )}{24 b^{4} \left (d x +c \right )^{2}}\) | \(363\) |
Input:
int((d*x+c)^2*sin(b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
1/8*((-2*(d*x+c)^2*b^2+d^2)*sin(2*b*x+2*a)+4*b*(-1/2*d*(d*x+c)*cos(2*b*x+2 *a)+x*(1/3*x^2*d^2+c*d*x+c^2)*b^2+1/2*c*d))/b^3
Time = 0.08 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.18 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=\frac {2 \, b^{3} d^{2} x^{3} + 6 \, b^{3} c d x^{2} - 6 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )^{2} - 3 \, {\left (2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + 2 \, b^{2} c^{2} - d^{2}\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 3 \, {\left (2 \, b^{3} c^{2} + b d^{2}\right )} x}{12 \, b^{3}} \] Input:
integrate((d*x+c)^2*sin(b*x+a)^2,x, algorithm="fricas")
Output:
1/12*(2*b^3*d^2*x^3 + 6*b^3*c*d*x^2 - 6*(b*d^2*x + b*c*d)*cos(b*x + a)^2 - 3*(2*b^2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 - d^2)*cos(b*x + a)*sin(b*x + a) + 3*(2*b^3*c^2 + b*d^2)*x)/b^3
Leaf count of result is larger than twice the leaf count of optimal. 264 vs. \(2 (85) = 170\).
Time = 0.27 (sec) , antiderivative size = 264, normalized size of antiderivative = 2.78 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=\begin {cases} \frac {c^{2} x \sin ^{2}{\left (a + b x \right )}}{2} + \frac {c^{2} x \cos ^{2}{\left (a + b x \right )}}{2} + \frac {c d x^{2} \sin ^{2}{\left (a + b x \right )}}{2} + \frac {c d x^{2} \cos ^{2}{\left (a + b x \right )}}{2} + \frac {d^{2} x^{3} \sin ^{2}{\left (a + b x \right )}}{6} + \frac {d^{2} x^{3} \cos ^{2}{\left (a + b x \right )}}{6} - \frac {c^{2} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {c d x \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{b} - \frac {d^{2} x^{2} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} + \frac {c d \sin ^{2}{\left (a + b x \right )}}{2 b^{2}} + \frac {d^{2} x \sin ^{2}{\left (a + b x \right )}}{4 b^{2}} - \frac {d^{2} x \cos ^{2}{\left (a + b x \right )}}{4 b^{2}} + \frac {d^{2} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{4 b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \sin ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \] Input:
integrate((d*x+c)**2*sin(b*x+a)**2,x)
Output:
Piecewise((c**2*x*sin(a + b*x)**2/2 + c**2*x*cos(a + b*x)**2/2 + c*d*x**2* sin(a + b*x)**2/2 + c*d*x**2*cos(a + b*x)**2/2 + d**2*x**3*sin(a + b*x)**2 /6 + d**2*x**3*cos(a + b*x)**2/6 - c**2*sin(a + b*x)*cos(a + b*x)/(2*b) - c*d*x*sin(a + b*x)*cos(a + b*x)/b - d**2*x**2*sin(a + b*x)*cos(a + b*x)/(2 *b) + c*d*sin(a + b*x)**2/(2*b**2) + d**2*x*sin(a + b*x)**2/(4*b**2) - d** 2*x*cos(a + b*x)**2/(4*b**2) + d**2*sin(a + b*x)*cos(a + b*x)/(4*b**3), Ne (b, 0)), ((c**2*x + c*d*x**2 + d**2*x**3/3)*sin(a)**2, True))
Leaf count of result is larger than twice the leaf count of optimal. 232 vs. \(2 (85) = 170\).
Time = 0.04 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.44 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=\frac {6 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} c^{2} - \frac {12 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} a c d}{b} + \frac {6 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} a^{2} d^{2}}{b^{2}} + \frac {6 \, {\left (2 \, {\left (b x + a\right )}^{2} - 2 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right ) - \cos \left (2 \, b x + 2 \, a\right )\right )} c d}{b} - \frac {6 \, {\left (2 \, {\left (b x + a\right )}^{2} - 2 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right ) - \cos \left (2 \, b x + 2 \, a\right )\right )} a d^{2}}{b^{2}} + \frac {{\left (4 \, {\left (b x + a\right )}^{3} - 6 \, {\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) - 3 \, {\left (2 \, {\left (b x + a\right )}^{2} - 1\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d^{2}}{b^{2}}}{24 \, b} \] Input:
integrate((d*x+c)^2*sin(b*x+a)^2,x, algorithm="maxima")
Output:
1/24*(6*(2*b*x + 2*a - sin(2*b*x + 2*a))*c^2 - 12*(2*b*x + 2*a - sin(2*b*x + 2*a))*a*c*d/b + 6*(2*b*x + 2*a - sin(2*b*x + 2*a))*a^2*d^2/b^2 + 6*(2*( b*x + a)^2 - 2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a))*c*d/b - 6*(2 *(b*x + a)^2 - 2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a))*a*d^2/b^2 + (4*(b*x + a)^3 - 6*(b*x + a)*cos(2*b*x + 2*a) - 3*(2*(b*x + a)^2 - 1)*si n(2*b*x + 2*a))*d^2/b^2)/b
Time = 0.36 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.99 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=\frac {1}{6} \, d^{2} x^{3} + \frac {1}{2} \, c d x^{2} + \frac {1}{2} \, c^{2} x - \frac {{\left (b d^{2} x + b c d\right )} \cos \left (2 \, b x + 2 \, a\right )}{4 \, b^{3}} - \frac {{\left (2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + 2 \, b^{2} c^{2} - d^{2}\right )} \sin \left (2 \, b x + 2 \, a\right )}{8 \, b^{3}} \] Input:
integrate((d*x+c)^2*sin(b*x+a)^2,x, algorithm="giac")
Output:
1/6*d^2*x^3 + 1/2*c*d*x^2 + 1/2*c^2*x - 1/4*(b*d^2*x + b*c*d)*cos(2*b*x + 2*a)/b^3 - 1/8*(2*b^2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 - d^2)*sin(2*b*x + 2*a)/b^3
Time = 35.10 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.88 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=x\,\left (\frac {c^2}{4}-\frac {d^2}{8\,b^2}\right )+x\,\left (\frac {c^2}{4}+\frac {d^2}{8\,b^2}\right )+\frac {d^2\,x^3}{6}+\frac {\sin \left (2\,a+2\,b\,x\right )\,\left (d^2-2\,b^2\,c^2\right )}{8\,b^3}+\frac {x\,\cos \left (2\,a+2\,b\,x\right )\,\left (\frac {c^2}{2}-\frac {d^2}{4\,b^2}\right )}{2}-\frac {x\,\cos \left (2\,a+2\,b\,x\right )\,\left (\frac {c^2}{2}+\frac {d^2}{4\,b^2}\right )}{2}+\frac {c\,d\,x^2}{2}-\frac {d^2\,x^2\,\sin \left (2\,a+2\,b\,x\right )}{4\,b}-\frac {c\,d\,\cos \left (2\,a+2\,b\,x\right )}{4\,b^2}-\frac {c\,d\,x\,\sin \left (2\,a+2\,b\,x\right )}{2\,b} \] Input:
int(sin(a + b*x)^2*(c + d*x)^2,x)
Output:
x*(c^2/4 - d^2/(8*b^2)) + x*(c^2/4 + d^2/(8*b^2)) + (d^2*x^3)/6 + (sin(2*a + 2*b*x)*(d^2 - 2*b^2*c^2))/(8*b^3) + (x*cos(2*a + 2*b*x)*(c^2/2 - d^2/(4 *b^2)))/2 - (x*cos(2*a + 2*b*x)*(c^2/2 + d^2/(4*b^2)))/2 + (c*d*x^2)/2 - ( d^2*x^2*sin(2*a + 2*b*x))/(4*b) - (c*d*cos(2*a + 2*b*x))/(4*b^2) - (c*d*x* sin(2*a + 2*b*x))/(2*b)
Time = 0.17 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.80 \[ \int (c+d x)^2 \sin ^2(a+b x) \, dx=\frac {-6 \cos \left (b x +a \right ) \sin \left (b x +a \right ) b^{2} c^{2}-12 \cos \left (b x +a \right ) \sin \left (b x +a \right ) b^{2} c d x -6 \cos \left (b x +a \right ) \sin \left (b x +a \right ) b^{2} d^{2} x^{2}+3 \cos \left (b x +a \right ) \sin \left (b x +a \right ) d^{2}+6 \sin \left (b x +a \right )^{2} b c d +6 \sin \left (b x +a \right )^{2} b \,d^{2} x +6 a \,b^{2} c^{2}+9 a \,d^{2}+6 b^{3} c^{2} x +6 b^{3} c d \,x^{2}+2 b^{3} d^{2} x^{3}-12 b c d -3 b \,d^{2} x}{12 b^{3}} \] Input:
int((d*x+c)^2*sin(b*x+a)^2,x)
Output:
( - 6*cos(a + b*x)*sin(a + b*x)*b**2*c**2 - 12*cos(a + b*x)*sin(a + b*x)*b **2*c*d*x - 6*cos(a + b*x)*sin(a + b*x)*b**2*d**2*x**2 + 3*cos(a + b*x)*si n(a + b*x)*d**2 + 6*sin(a + b*x)**2*b*c*d + 6*sin(a + b*x)**2*b*d**2*x + 6 *a*b**2*c**2 + 9*a*d**2 + 6*b**3*c**2*x + 6*b**3*c*d*x**2 + 2*b**3*d**2*x* *3 - 12*b*c*d - 3*b*d**2*x)/(12*b**3)