Integrand size = 12, antiderivative size = 73 \[ \int x^2 \sin ^2(a+b x) \, dx=-\frac {x}{4 b^2}+\frac {x^3}{6}+\frac {\cos (a+b x) \sin (a+b x)}{4 b^3}-\frac {x^2 \cos (a+b x) \sin (a+b x)}{2 b}+\frac {x \sin ^2(a+b x)}{2 b^2} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3392, 30, 2715, 8} \[ \int x^2 \sin ^2(a+b x) \, dx=\frac {\sin (a+b x) \cos (a+b x)}{4 b^3}+\frac {x \sin ^2(a+b x)}{2 b^2}-\frac {x^2 \sin (a+b x) \cos (a+b x)}{2 b}-\frac {x}{4 b^2}+\frac {x^3}{6} \]
[In]
[Out]
Rule 8
Rule 30
Rule 2715
Rule 3392
Rubi steps \begin{align*} \text {integral}& = -\frac {x^2 \cos (a+b x) \sin (a+b x)}{2 b}+\frac {x \sin ^2(a+b x)}{2 b^2}+\frac {\int x^2 \, dx}{2}-\frac {\int \sin ^2(a+b x) \, dx}{2 b^2} \\ & = \frac {x^3}{6}+\frac {\cos (a+b x) \sin (a+b x)}{4 b^3}-\frac {x^2 \cos (a+b x) \sin (a+b x)}{2 b}+\frac {x \sin ^2(a+b x)}{2 b^2}-\frac {\int 1 \, dx}{4 b^2} \\ & = -\frac {x}{4 b^2}+\frac {x^3}{6}+\frac {\cos (a+b x) \sin (a+b x)}{4 b^3}-\frac {x^2 \cos (a+b x) \sin (a+b x)}{2 b}+\frac {x \sin ^2(a+b x)}{2 b^2} \\ \end{align*}
Time = 0.11 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.64 \[ \int x^2 \sin ^2(a+b x) \, dx=\frac {4 b^3 x^3-6 b x \cos (2 (a+b x))+\left (3-6 b^2 x^2\right ) \sin (2 (a+b x))}{24 b^3} \]
[In]
[Out]
Time = 0.24 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.63
method | result | size |
risch | \(\frac {x^{3}}{6}-\frac {x \cos \left (2 b x +2 a \right )}{4 b^{2}}-\frac {\left (2 x^{2} b^{2}-1\right ) \sin \left (2 b x +2 a \right )}{8 b^{3}}\) | \(46\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-2 a \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 {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )+\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 ) \left (\cos ^{2}\left (b x +a \right )\right )}{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}}{b^{3}}\) | \(158\) |
default | \(\frac {a^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-2 a \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 {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )+\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 ) \left (\cos ^{2}\left (b x +a \right )\right )}{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}}{b^{3}}\) | \(158\) |
norman | \(\frac {\frac {x^{2} \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {x^{3}}{6}+\frac {\tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b^{3}}-\frac {\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b^{3}}-\frac {x}{4 b^{2}}+\frac {x^{3} \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3}+\frac {x^{3} \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{6}+\frac {3 x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b^{2}}-\frac {x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b^{2}}-\frac {x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{2}}\) | \(160\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.74 \[ \int x^2 \sin ^2(a+b x) \, dx=\frac {2 \, b^{3} x^{3} - 6 \, b x \cos \left (b x + a\right )^{2} - 3 \, {\left (2 \, b^{2} x^{2} - 1\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 3 \, b x}{12 \, b^{3}} \]
[In]
[Out]
Time = 0.36 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.44 \[ \int x^2 \sin ^2(a+b x) \, dx=\begin {cases} \frac {x^{3} \sin ^{2}{\left (a + b x \right )}}{6} + \frac {x^{3} \cos ^{2}{\left (a + b x \right )}}{6} - \frac {x^{2} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} + \frac {x \sin ^{2}{\left (a + b x \right )}}{4 b^{2}} - \frac {x \cos ^{2}{\left (a + b x \right )}}{4 b^{2}} + \frac {\sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{4 b^{3}} & \text {for}\: b \neq 0 \\\frac {x^{3} \sin ^{2}{\left (a \right )}}{3} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.60 \[ \int x^2 \sin ^2(a+b x) \, dx=\frac {4 \, {\left (b x + a\right )}^{3} + 6 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} a^{2} - 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 - 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 )}{24 \, b^{3}} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.62 \[ \int x^2 \sin ^2(a+b x) \, dx=\frac {1}{6} \, x^{3} - \frac {x \cos \left (2 \, b x + 2 \, a\right )}{4 \, b^{2}} - \frac {{\left (2 \, b^{2} x^{2} - 1\right )} \sin \left (2 \, b x + 2 \, a\right )}{8 \, b^{3}} \]
[In]
[Out]
Time = 0.15 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.71 \[ \int x^2 \sin ^2(a+b x) \, dx=\frac {x^3}{6}+\frac {\sin \left (2\,a+2\,b\,x\right )}{8\,b^3}-\frac {x\,\cos \left (2\,a+2\,b\,x\right )}{4\,b^2}-\frac {x^2\,\sin \left (2\,a+2\,b\,x\right )}{4\,b} \]
[In]
[Out]