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} \]
-1/4*x/b^2+1/6*x^3+1/4*cos(b*x+a)*sin(b*x+a)/b^3-1/2*x^2*cos(b*x+a)*sin(b* x+a)/b+1/2*x*sin(b*x+a)^2/b^2
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} \]
Time = 0.26 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.07, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 3792, 15, 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 x^2 \sin ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int x^2 \sin (a+b x)^2dx\) |
\(\Big \downarrow \) 3792 |
\(\displaystyle -\frac {\int \sin ^2(a+b x)dx}{2 b^2}+\frac {\int x^2dx}{2}+\frac {x \sin ^2(a+b x)}{2 b^2}-\frac {x^2 \sin (a+b x) \cos (a+b x)}{2 b}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle -\frac {\int \sin ^2(a+b x)dx}{2 b^2}+\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^3}{6}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \sin (a+b x)^2dx}{2 b^2}+\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^3}{6}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle -\frac {\frac {\int 1dx}{2}-\frac {\sin (a+b x) \cos (a+b x)}{2 b}}{2 b^2}+\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^3}{6}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {x \sin ^2(a+b x)}{2 b^2}-\frac {\frac {x}{2}-\frac {\sin (a+b x) \cos (a+b x)}{2 b}}{2 b^2}-\frac {x^2 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {x^3}{6}\) |
x^3/6 - (x^2*Cos[a + b*x]*Sin[a + b*x])/(2*b) + (x*Sin[a + b*x]^2)/(2*b^2) - (x/2 - (Cos[a + b*x]*Sin[a + b*x])/(2*b))/(2*b^2)
3.2.24.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, 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 = 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\) |
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}} \]
1/12*(2*b^3*x^3 - 6*b*x*cos(b*x + a)^2 - 3*(2*b^2*x^2 - 1)*cos(b*x + a)*si n(b*x + a) + 3*b*x)/b^3
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} \]
Piecewise((x**3*sin(a + b*x)**2/6 + x**3*cos(a + b*x)**2/6 - x**2*sin(a + b*x)*cos(a + b*x)/(2*b) + x*sin(a + b*x)**2/(4*b**2) - x*cos(a + b*x)**2/( 4*b**2) + sin(a + b*x)*cos(a + b*x)/(4*b**3), Ne(b, 0)), (x**3*sin(a)**2/3 , True))
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}} \]
1/24*(4*(b*x + a)^3 + 6*(2*b*x + 2*a - sin(2*b*x + 2*a))*a^2 - 6*(2*(b*x + a)^2 - 2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a))*a - 6*(b*x + a)*c os(2*b*x + 2*a) - 3*(2*(b*x + a)^2 - 1)*sin(2*b*x + 2*a))/b^3
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}} \]
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} \]
x^3/6 + sin(2*a + 2*b*x)/(8*b^3) - (x*cos(2*a + 2*b*x))/(4*b^2) - (x^2*sin (2*a + 2*b*x))/(4*b)
Time = 0.00 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.92 \[ \int x^2 \sin ^2(a+b x) \, dx=\frac {-6 \cos \left (b x +a \right ) \sin \left (b x +a \right ) b^{2} x^{2}+3 \cos \left (b x +a \right ) \sin \left (b x +a \right )+6 \sin \left (b x +a \right )^{2} b x +9 a +2 b^{3} x^{3}-3 b x}{12 b^{3}} \]