Integrand size = 16, antiderivative size = 98 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=-\frac {3}{16} (1+2 x)^2+\frac {1}{16} (1+2 x)^4+\frac {3}{8} (1+2 x) \cos (1+2 x) \sin (1+2 x)-\frac {1}{4} (1+2 x)^3 \cos (1+2 x) \sin (1+2 x)-\frac {3}{16} \sin ^2(1+2 x)+\frac {3}{8} (1+2 x)^2 \sin ^2(1+2 x) \] Output:
-3/16*(1+2*x)^2+1/16*(1+2*x)^4+3/8*(1+2*x)*cos(1+2*x)*sin(1+2*x)-1/4*(1+2* x)^3*cos(1+2*x)*sin(1+2*x)-3/16*sin(1+2*x)^2+3/8*(1+2*x)^2*sin(1+2*x)^2
Time = 0.14 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.56 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=\frac {1}{32} \left (-3 \left (1+8 x+8 x^2\right ) \cos (2+4 x)+2 (1+2 x) \left ((1+2 x)^3+\left (1-8 x-8 x^2\right ) \sin (2+4 x)\right )\right ) \] Input:
Integrate[(1 + 2*x)^3*Sin[1 + 2*x]^2,x]
Output:
(-3*(1 + 8*x + 8*x^2)*Cos[2 + 4*x] + 2*(1 + 2*x)*((1 + 2*x)^3 + (1 - 8*x - 8*x^2)*Sin[2 + 4*x]))/32
Time = 0.32 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.05, 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, 3791, 17}
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 (2 x+1)^3 \sin ^2(2 x+1) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (2 x+1)^3 \sin (2 x+1)^2dx\) |
\(\Big \downarrow \) 3792 |
\(\displaystyle \frac {1}{2} \int (2 x+1)^3dx-\frac {3}{2} \int (2 x+1) \sin ^2(2 x+1)dx+\frac {3}{8} (2 x+1)^2 \sin ^2(2 x+1)-\frac {1}{4} (2 x+1)^3 \sin (2 x+1) \cos (2 x+1)\) |
\(\Big \downarrow \) 17 |
\(\displaystyle -\frac {3}{2} \int (2 x+1) \sin ^2(2 x+1)dx+\frac {1}{16} (2 x+1)^4+\frac {3}{8} (2 x+1)^2 \sin ^2(2 x+1)-\frac {1}{4} (2 x+1)^3 \sin (2 x+1) \cos (2 x+1)\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3}{2} \int (2 x+1) \sin (2 x+1)^2dx+\frac {1}{16} (2 x+1)^4+\frac {3}{8} (2 x+1)^2 \sin ^2(2 x+1)-\frac {1}{4} (2 x+1)^3 \sin (2 x+1) \cos (2 x+1)\) |
\(\Big \downarrow \) 3791 |
\(\displaystyle -\frac {3}{2} \left (\frac {1}{2} \int (2 x+1)dx+\frac {1}{8} \sin ^2(2 x+1)-\frac {1}{4} (2 x+1) \sin (2 x+1) \cos (2 x+1)\right )+\frac {1}{16} (2 x+1)^4+\frac {3}{8} (2 x+1)^2 \sin ^2(2 x+1)-\frac {1}{4} (2 x+1)^3 \sin (2 x+1) \cos (2 x+1)\) |
\(\Big \downarrow \) 17 |
\(\displaystyle \frac {1}{16} (2 x+1)^4+\frac {3}{8} (2 x+1)^2 \sin ^2(2 x+1)-\frac {3}{2} \left (\frac {1}{8} (2 x+1)^2+\frac {1}{8} \sin ^2(2 x+1)-\frac {1}{4} (2 x+1) \sin (2 x+1) \cos (2 x+1)\right )-\frac {1}{4} (2 x+1)^3 \sin (2 x+1) \cos (2 x+1)\) |
Input:
Int[(1 + 2*x)^3*Sin[1 + 2*x]^2,x]
Output:
(1 + 2*x)^4/16 - ((1 + 2*x)^3*Cos[1 + 2*x]*Sin[1 + 2*x])/4 + (3*(1 + 2*x)^ 2*Sin[1 + 2*x]^2)/8 - (3*((1 + 2*x)^2/8 - ((1 + 2*x)*Cos[1 + 2*x]*Sin[1 + 2*x])/4 + Sin[1 + 2*x]^2/8))/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[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*((b*Sin[e + f*x])^n/(f^2*n^2)), x] + (-Simp[b*(c + d*x)*Cos[e + f*x ]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x] + Simp[b^2*((n - 1)/n) Int[(c + d* x)*(b*Sin[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]
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.52 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.61
method | result | size |
risch | \(x^{4}+2 x^{3}+\frac {3 x^{2}}{2}+\frac {x}{2}+\frac {1}{16}-\frac {3 \left (8 x^{2}+8 x +1\right ) \cos \left (2+4 x \right )}{32}-\frac {\left (16 x^{3}+24 x^{2}+6 x -1\right ) \sin \left (2+4 x \right )}{16}\) | \(60\) |
derivativedivides | \(\frac {\left (1+2 x \right )^{3} \left (-\frac {\cos \left (1+2 x \right ) \sin \left (1+2 x \right )}{2}+\frac {1}{2}+x \right )}{2}-\frac {3 \left (1+2 x \right )^{2} \cos \left (1+2 x \right )^{2}}{8}+\frac {3 \left (1+2 x \right ) \left (\frac {\cos \left (1+2 x \right ) \sin \left (1+2 x \right )}{2}+\frac {1}{2}+x \right )}{4}-\frac {3 \left (1+2 x \right )^{2}}{16}-\frac {3 \sin \left (1+2 x \right )^{2}}{16}-\frac {3 \left (1+2 x \right )^{4}}{16}\) | \(97\) |
default | \(\frac {\left (1+2 x \right )^{3} \left (-\frac {\cos \left (1+2 x \right ) \sin \left (1+2 x \right )}{2}+\frac {1}{2}+x \right )}{2}-\frac {3 \left (1+2 x \right )^{2} \cos \left (1+2 x \right )^{2}}{8}+\frac {3 \left (1+2 x \right ) \left (\frac {\cos \left (1+2 x \right ) \sin \left (1+2 x \right )}{2}+\frac {1}{2}+x \right )}{4}-\frac {3 \left (1+2 x \right )^{2}}{16}-\frac {3 \sin \left (1+2 x \right )^{2}}{16}-\frac {3 \left (1+2 x \right )^{4}}{16}\) | \(97\) |
norman | \(\frac {x^{4}+x^{4} \tan \left (\frac {1}{2}+x \right )^{4}+\frac {3 \tan \left (\frac {1}{2}+x \right )^{2}}{4}-\frac {x}{4}+\frac {3 x^{2}}{4}+2 x^{3}-\frac {\tan \left (\frac {1}{2}+x \right )^{3}}{4}-\frac {3 x \tan \left (\frac {1}{2}+x \right )}{2}+\frac {11 x \tan \left (\frac {1}{2}+x \right )^{2}}{2}+\frac {3 x \tan \left (\frac {1}{2}+x \right )^{3}}{2}-\frac {x \tan \left (\frac {1}{2}+x \right )^{4}}{4}-6 x^{2} \tan \left (\frac {1}{2}+x \right )+\frac {15 x^{2} \tan \left (\frac {1}{2}+x \right )^{2}}{2}+6 x^{2} \tan \left (\frac {1}{2}+x \right )^{3}+\frac {3 x^{2} \tan \left (\frac {1}{2}+x \right )^{4}}{4}-4 x^{3} \tan \left (\frac {1}{2}+x \right )+4 x^{3} \tan \left (\frac {1}{2}+x \right )^{2}+4 x^{3} \tan \left (\frac {1}{2}+x \right )^{3}+2 x^{3} \tan \left (\frac {1}{2}+x \right )^{4}+2 x^{4} \tan \left (\frac {1}{2}+x \right )^{2}+\frac {\tan \left (\frac {1}{2}+x \right )}{4}}{\left (1+\tan \left (\frac {1}{2}+x \right )^{2}\right )^{2}}\) | \(190\) |
orering | \(\frac {x \left (8 x^{5}+24 x^{4}+42 x^{3}+44 x^{2}+19 x +1\right ) \sin \left (1+2 x \right )^{2}}{\left (1+2 x \right )^{2}}-\frac {\left (80 x^{4}+160 x^{3}+72 x^{2}-8 x -1\right ) \left (6 \left (1+2 x \right )^{2} \sin \left (1+2 x \right )^{2}+4 \left (1+2 x \right )^{3} \cos \left (1+2 x \right ) \sin \left (1+2 x \right )\right )}{32 \left (1+2 x \right )^{4}}+\frac {x \left (4 x^{3}+8 x^{2}+3 x -1\right ) \left (24 \left (1+2 x \right ) \sin \left (1+2 x \right )^{2}+48 \left (1+2 x \right )^{2} \sin \left (1+2 x \right ) \cos \left (1+2 x \right )-8 \left (1+2 x \right )^{3} \sin \left (1+2 x \right )^{2}+8 \left (1+2 x \right )^{3} \cos \left (1+2 x \right )^{2}\right )}{32 \left (1+2 x \right )^{3}}\) | \(208\) |
Input:
int((1+2*x)^3*sin(1+2*x)^2,x,method=_RETURNVERBOSE)
Output:
x^4+2*x^3+3/2*x^2+1/2*x+1/16-3/32*(8*x^2+8*x+1)*cos(2+4*x)-1/16*(16*x^3+24 *x^2+6*x-1)*sin(2+4*x)
Time = 0.07 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.67 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=x^{4} + 2 \, x^{3} - \frac {3}{16} \, {\left (8 \, x^{2} + 8 \, x + 1\right )} \cos \left (2 \, x + 1\right )^{2} - \frac {1}{8} \, {\left (16 \, x^{3} + 24 \, x^{2} + 6 \, x - 1\right )} \cos \left (2 \, x + 1\right ) \sin \left (2 \, x + 1\right ) + \frac {9}{4} \, x^{2} + \frac {5}{4} \, x \] Input:
integrate((1+2*x)^3*sin(1+2*x)^2,x, algorithm="fricas")
Output:
x^4 + 2*x^3 - 3/16*(8*x^2 + 8*x + 1)*cos(2*x + 1)^2 - 1/8*(16*x^3 + 24*x^2 + 6*x - 1)*cos(2*x + 1)*sin(2*x + 1) + 9/4*x^2 + 5/4*x
Leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (92) = 184\).
Time = 0.19 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.93 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=x^{4} \sin ^{2}{\left (2 x + 1 \right )} + x^{4} \cos ^{2}{\left (2 x + 1 \right )} + 2 x^{3} \sin ^{2}{\left (2 x + 1 \right )} - 2 x^{3} \sin {\left (2 x + 1 \right )} \cos {\left (2 x + 1 \right )} + 2 x^{3} \cos ^{2}{\left (2 x + 1 \right )} + \frac {9 x^{2} \sin ^{2}{\left (2 x + 1 \right )}}{4} - 3 x^{2} \sin {\left (2 x + 1 \right )} \cos {\left (2 x + 1 \right )} + \frac {3 x^{2} \cos ^{2}{\left (2 x + 1 \right )}}{4} + \frac {5 x \sin ^{2}{\left (2 x + 1 \right )}}{4} - \frac {3 x \sin {\left (2 x + 1 \right )} \cos {\left (2 x + 1 \right )}}{4} - \frac {x \cos ^{2}{\left (2 x + 1 \right )}}{4} + \frac {3 \sin ^{2}{\left (2 x + 1 \right )}}{16} + \frac {\sin {\left (2 x + 1 \right )} \cos {\left (2 x + 1 \right )}}{8} \] Input:
integrate((1+2*x)**3*sin(1+2*x)**2,x)
Output:
x**4*sin(2*x + 1)**2 + x**4*cos(2*x + 1)**2 + 2*x**3*sin(2*x + 1)**2 - 2*x **3*sin(2*x + 1)*cos(2*x + 1) + 2*x**3*cos(2*x + 1)**2 + 9*x**2*sin(2*x + 1)**2/4 - 3*x**2*sin(2*x + 1)*cos(2*x + 1) + 3*x**2*cos(2*x + 1)**2/4 + 5* x*sin(2*x + 1)**2/4 - 3*x*sin(2*x + 1)*cos(2*x + 1)/4 - x*cos(2*x + 1)**2/ 4 + 3*sin(2*x + 1)**2/16 + sin(2*x + 1)*cos(2*x + 1)/8
Time = 0.03 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.52 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=\frac {1}{16} \, {\left (2 \, x + 1\right )}^{4} - \frac {3}{32} \, {\left (2 \, {\left (2 \, x + 1\right )}^{2} - 1\right )} \cos \left (4 \, x + 2\right ) - \frac {1}{16} \, {\left (2 \, {\left (2 \, x + 1\right )}^{3} - 6 \, x - 3\right )} \sin \left (4 \, x + 2\right ) \] Input:
integrate((1+2*x)^3*sin(1+2*x)^2,x, algorithm="maxima")
Output:
1/16*(2*x + 1)^4 - 3/32*(2*(2*x + 1)^2 - 1)*cos(4*x + 2) - 1/16*(2*(2*x + 1)^3 - 6*x - 3)*sin(4*x + 2)
Time = 0.16 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.59 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=x^{4} + 2 \, x^{3} + \frac {3}{2} \, x^{2} - \frac {3}{32} \, {\left (8 \, x^{2} + 8 \, x + 1\right )} \cos \left (4 \, x + 2\right ) - \frac {1}{16} \, {\left (16 \, x^{3} + 24 \, x^{2} + 6 \, x - 1\right )} \sin \left (4 \, x + 2\right ) + \frac {1}{2} \, x \] Input:
integrate((1+2*x)^3*sin(1+2*x)^2,x, algorithm="giac")
Output:
x^4 + 2*x^3 + 3/2*x^2 - 3/32*(8*x^2 + 8*x + 1)*cos(4*x + 2) - 1/16*(16*x^3 + 24*x^2 + 6*x - 1)*sin(4*x + 2) + 1/2*x
Time = 15.43 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.70 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=\frac {3\,\sin \left (4\,x+2\right )\,\left (2\,x+1\right )}{16}-\frac {3\,{\sin \left (2\,x+1\right )}^2}{16}+\frac {{\left (2\,x+1\right )}^4}{16}-\frac {\sin \left (4\,x+2\right )\,{\left (2\,x+1\right )}^3}{8}+\frac {3\,{\left (2\,x+1\right )}^2\,\left (2\,{\sin \left (2\,x+1\right )}^2-1\right )}{16} \] Input:
int(sin(2*x + 1)^2*(2*x + 1)^3,x)
Output:
(3*sin(4*x + 2)*(2*x + 1))/16 - (3*sin(2*x + 1)^2)/16 + (2*x + 1)^4/16 - ( sin(4*x + 2)*(2*x + 1)^3)/8 + (3*(2*x + 1)^2*(2*sin(2*x + 1)^2 - 1))/16
Time = 0.17 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.17 \[ \int (1+2 x)^3 \sin ^2(1+2 x) \, dx=-2 \cos \left (2 x +1\right ) \sin \left (2 x +1\right ) x^{3}-3 \cos \left (2 x +1\right ) \sin \left (2 x +1\right ) x^{2}-\frac {3 \cos \left (2 x +1\right ) \sin \left (2 x +1\right ) x}{4}+\frac {\cos \left (2 x +1\right ) \sin \left (2 x +1\right )}{8}+\frac {3 \sin \left (2 x +1\right )^{2} x^{2}}{2}+\frac {3 \sin \left (2 x +1\right )^{2} x}{2}+\frac {3 \sin \left (2 x +1\right )^{2}}{16}+x^{4}+2 x^{3}+\frac {3 x^{2}}{4}-\frac {x}{4}+1 \] Input:
int((1+2*x)^3*sin(1+2*x)^2,x)
Output:
( - 32*cos(2*x + 1)*sin(2*x + 1)*x**3 - 48*cos(2*x + 1)*sin(2*x + 1)*x**2 - 12*cos(2*x + 1)*sin(2*x + 1)*x + 2*cos(2*x + 1)*sin(2*x + 1) + 24*sin(2* x + 1)**2*x**2 + 24*sin(2*x + 1)**2*x + 3*sin(2*x + 1)**2 + 16*x**4 + 32*x **3 + 12*x**2 - 4*x + 16)/16