Integrand size = 27, antiderivative size = 91 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 x}{4}-\frac {2 a^2 \cos ^3(c+d x)}{3 d}+\frac {a^2 \cos ^5(c+d x)}{5 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{4 d}-\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{2 d} \] Output:
1/4*a^2*x-2/3*a^2*cos(d*x+c)^3/d+1/5*a^2*cos(d*x+c)^5/d+1/4*a^2*cos(d*x+c) *sin(d*x+c)/d-1/2*a^2*cos(d*x+c)^3*sin(d*x+c)/d
Time = 0.15 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.63 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 (-90 \cos (c+d x)-25 \cos (3 (c+d x))+3 (20 c+20 d x+\cos (5 (c+d x))-5 \sin (4 (c+d x))))}{240 d} \] Input:
Integrate[Cos[c + d*x]^2*Sin[c + d*x]*(a + a*Sin[c + d*x])^2,x]
Output:
(a^2*(-90*Cos[c + d*x] - 25*Cos[3*(c + d*x)] + 3*(20*c + 20*d*x + Cos[5*(c + d*x)] - 5*Sin[4*(c + d*x)])))/(240*d)
Time = 0.51 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.22, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3339, 3042, 3157, 3042, 3148, 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 \sin (c+d x) \cos ^2(c+d x) (a \sin (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x) \cos (c+d x)^2 (a \sin (c+d x)+a)^2dx\) |
\(\Big \downarrow \) 3339 |
\(\displaystyle \frac {2}{5} \int \cos ^2(c+d x) (\sin (c+d x) a+a)^2dx-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{5} \int \cos (c+d x)^2 (\sin (c+d x) a+a)^2dx-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3157 |
\(\displaystyle \frac {2}{5} \left (\frac {5}{4} a \int \cos ^2(c+d x) (\sin (c+d x) a+a)dx-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{5} \left (\frac {5}{4} a \int \cos (c+d x)^2 (\sin (c+d x) a+a)dx-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle \frac {2}{5} \left (\frac {5}{4} a \left (a \int \cos ^2(c+d x)dx-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{5} \left (\frac {5}{4} a \left (a \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {2}{5} \left (\frac {5}{4} a \left (a \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {2}{5} \left (\frac {5}{4} a \left (a \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
Input:
Int[Cos[c + d*x]^2*Sin[c + d*x]*(a + a*Sin[c + d*x])^2,x]
Output:
-1/5*(Cos[c + d*x]^3*(a + a*Sin[c + d*x])^2)/d + (2*(-1/4*(Cos[c + d*x]^3* (a^2 + a^2*Sin[c + d*x]))/d + (5*a*(-1/3*(a*Cos[c + d*x]^3)/d + a*(x/2 + ( Cos[c + d*x]*Sin[c + d*x])/(2*d))))/4))/5
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[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-b)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m - 1)/(f*g*(m + p))), x] + Simp[a*((2*m + p - 1)/(m + p)) Int[(g* Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, 0] && NeQ[m + p, 0] && Integers Q[2*m, 2*p]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* (g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S imp[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[ a^2 - b^2, 0] && NeQ[m + p + 1, 0]
Time = 8.99 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.62
method | result | size |
parallelrisch | \(-\frac {a^{2} \left (-60 d x +25 \cos \left (3 d x +3 c \right )+15 \sin \left (4 d x +4 c \right )+90 \cos \left (d x +c \right )-3 \cos \left (5 d x +5 c \right )+112\right )}{240 d}\) | \(56\) |
risch | \(\frac {a^{2} x}{4}-\frac {3 a^{2} \cos \left (d x +c \right )}{8 d}+\frac {a^{2} \cos \left (5 d x +5 c \right )}{80 d}-\frac {a^{2} \sin \left (4 d x +4 c \right )}{16 d}-\frac {5 a^{2} \cos \left (3 d x +3 c \right )}{48 d}\) | \(73\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{3}}{5}-\frac {2 \cos \left (d x +c \right )^{3}}{15}\right )+2 a^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}{4}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {a^{2} \cos \left (d x +c \right )^{3}}{3}}{d}\) | \(95\) |
default | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{3}}{5}-\frac {2 \cos \left (d x +c \right )^{3}}{15}\right )+2 a^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}{4}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {a^{2} \cos \left (d x +c \right )^{3}}{3}}{d}\) | \(95\) |
norman | \(\frac {\frac {a^{2} x}{4}-\frac {14 a^{2}}{15 d}-\frac {a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {3 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {3 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}+\frac {a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{2 d}+\frac {5 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{4}+\frac {5 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{2}+\frac {5 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{2}+\frac {5 a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{4}+\frac {a^{2} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{4}-\frac {4 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3 d}-\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}-\frac {8 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}-\frac {8 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}\) | \(267\) |
orering | \(\text {Expression too large to display}\) | \(1385\) |
Input:
int(cos(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
-1/240*a^2*(-60*d*x+25*cos(3*d*x+3*c)+15*sin(4*d*x+4*c)+90*cos(d*x+c)-3*co s(5*d*x+5*c)+112)/d
Time = 0.08 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.79 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {12 \, a^{2} \cos \left (d x + c\right )^{5} - 40 \, a^{2} \cos \left (d x + c\right )^{3} + 15 \, a^{2} d x - 15 \, {\left (2 \, a^{2} \cos \left (d x + c\right )^{3} - a^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{60 \, d} \] Input:
integrate(cos(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="fricas" )
Output:
1/60*(12*a^2*cos(d*x + c)^5 - 40*a^2*cos(d*x + c)^3 + 15*a^2*d*x - 15*(2*a ^2*cos(d*x + c)^3 - a^2*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (80) = 160\).
Time = 0.24 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.89 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=\begin {cases} \frac {a^{2} x \sin ^{4}{\left (c + d x \right )}}{4} + \frac {a^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{2} + \frac {a^{2} x \cos ^{4}{\left (c + d x \right )}}{4} + \frac {a^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{4 d} - \frac {a^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{4 d} - \frac {2 a^{2} \cos ^{5}{\left (c + d x \right )}}{15 d} - \frac {a^{2} \cos ^{3}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a \sin {\left (c \right )} + a\right )^{2} \sin {\left (c \right )} \cos ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**2*sin(d*x+c)*(a+a*sin(d*x+c))**2,x)
Output:
Piecewise((a**2*x*sin(c + d*x)**4/4 + a**2*x*sin(c + d*x)**2*cos(c + d*x)* *2/2 + a**2*x*cos(c + d*x)**4/4 + a**2*sin(c + d*x)**3*cos(c + d*x)/(4*d) - a**2*sin(c + d*x)**2*cos(c + d*x)**3/(3*d) - a**2*sin(c + d*x)*cos(c + d *x)**3/(4*d) - 2*a**2*cos(c + d*x)**5/(15*d) - a**2*cos(c + d*x)**3/(3*d), Ne(d, 0)), (x*(a*sin(c) + a)**2*sin(c)*cos(c)**2, True))
Time = 0.03 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.76 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {80 \, a^{2} \cos \left (d x + c\right )^{3} - 16 \, {\left (3 \, \cos \left (d x + c\right )^{5} - 5 \, \cos \left (d x + c\right )^{3}\right )} a^{2} - 15 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a^{2}}{240 \, d} \] Input:
integrate(cos(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="maxima" )
Output:
-1/240*(80*a^2*cos(d*x + c)^3 - 16*(3*cos(d*x + c)^5 - 5*cos(d*x + c)^3)*a ^2 - 15*(4*d*x + 4*c - sin(4*d*x + 4*c))*a^2)/d
Time = 0.16 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.79 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {1}{4} \, a^{2} x + \frac {a^{2} \cos \left (5 \, d x + 5 \, c\right )}{80 \, d} - \frac {5 \, a^{2} \cos \left (3 \, d x + 3 \, c\right )}{48 \, d} - \frac {3 \, a^{2} \cos \left (d x + c\right )}{8 \, d} - \frac {a^{2} \sin \left (4 \, d x + 4 \, c\right )}{16 \, d} \] Input:
integrate(cos(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/4*a^2*x + 1/80*a^2*cos(5*d*x + 5*c)/d - 5/48*a^2*cos(3*d*x + 3*c)/d - 3/ 8*a^2*cos(d*x + c)/d - 1/16*a^2*sin(4*d*x + 4*c)/d
Time = 20.17 (sec) , antiderivative size = 262, normalized size of antiderivative = 2.88 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2\,x}{4}-\frac {\frac {a^2\,\left (c+d\,x\right )}{4}-3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{2}-\frac {a^2\,\left (15\,c+15\,d\,x-56\right )}{60}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (\frac {5\,a^2\,\left (c+d\,x\right )}{4}-\frac {a^2\,\left (75\,c+75\,d\,x-120\right )}{60}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {5\,a^2\,\left (c+d\,x\right )}{4}-\frac {a^2\,\left (75\,c+75\,d\,x-160\right )}{60}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {5\,a^2\,\left (c+d\,x\right )}{2}-\frac {a^2\,\left (150\,c+150\,d\,x-80\right )}{60}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {5\,a^2\,\left (c+d\,x\right )}{2}-\frac {a^2\,\left (150\,c+150\,d\,x-480\right )}{60}\right )+\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^5} \] Input:
int(cos(c + d*x)^2*sin(c + d*x)*(a + a*sin(c + d*x))^2,x)
Output:
(a^2*x)/4 - ((a^2*(c + d*x))/4 - 3*a^2*tan(c/2 + (d*x)/2)^3 + 3*a^2*tan(c/ 2 + (d*x)/2)^7 - (a^2*tan(c/2 + (d*x)/2)^9)/2 - (a^2*(15*c + 15*d*x - 56)) /60 + tan(c/2 + (d*x)/2)^8*((5*a^2*(c + d*x))/4 - (a^2*(75*c + 75*d*x - 12 0))/60) + tan(c/2 + (d*x)/2)^2*((5*a^2*(c + d*x))/4 - (a^2*(75*c + 75*d*x - 160))/60) + tan(c/2 + (d*x)/2)^4*((5*a^2*(c + d*x))/2 - (a^2*(150*c + 15 0*d*x - 80))/60) + tan(c/2 + (d*x)/2)^6*((5*a^2*(c + d*x))/2 - (a^2*(150*c + 150*d*x - 480))/60) + (a^2*tan(c/2 + (d*x)/2))/2)/(d*(tan(c/2 + (d*x)/2 )^2 + 1)^5)
Time = 0.16 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.92 \[ \int \cos ^2(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^{2} \left (12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-15 \cos \left (d x +c \right ) \sin \left (d x +c \right )-28 \cos \left (d x +c \right )+15 d x +28\right )}{60 d} \] Input:
int(cos(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x)
Output:
(a**2*(12*cos(c + d*x)*sin(c + d*x)**4 + 30*cos(c + d*x)*sin(c + d*x)**3 + 16*cos(c + d*x)*sin(c + d*x)**2 - 15*cos(c + d*x)*sin(c + d*x) - 28*cos(c + d*x) + 15*d*x + 28))/(60*d)