Integrand size = 26, antiderivative size = 85 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=\frac {3}{8} a^3 c^2 x-\frac {a^3 c^2 \cos ^5(e+f x)}{5 f}+\frac {3 a^3 c^2 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a^3 c^2 \cos ^3(e+f x) \sin (e+f x)}{4 f} \] Output:
3/8*a^3*c^2*x-1/5*a^3*c^2*cos(f*x+e)^5/f+3/8*a^3*c^2*cos(f*x+e)*sin(f*x+e) /f+1/4*a^3*c^2*cos(f*x+e)^3*sin(f*x+e)/f
Time = 8.75 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.81 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=\frac {a^3 c^2 (60 e+60 f x-20 \cos (e+f x)-10 \cos (3 (e+f x))-2 \cos (5 (e+f x))+40 \sin (2 (e+f x))+5 \sin (4 (e+f x)))}{160 f} \] Input:
Integrate[(a + a*Sin[e + f*x])^3*(c - c*Sin[e + f*x])^2,x]
Output:
(a^3*c^2*(60*e + 60*f*x - 20*Cos[e + f*x] - 10*Cos[3*(e + f*x)] - 2*Cos[5* (e + f*x)] + 40*Sin[2*(e + f*x)] + 5*Sin[4*(e + f*x)]))/(160*f)
Time = 0.42 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.91, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {3042, 3215, 3042, 3148, 3042, 3115, 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 (a \sin (e+f x)+a)^3 (c-c \sin (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^3 (c-c \sin (e+f x))^2dx\) |
\(\Big \downarrow \) 3215 |
\(\displaystyle a^2 c^2 \int \cos ^4(e+f x) (\sin (e+f x) a+a)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \cos (e+f x)^4 (\sin (e+f x) a+a)dx\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a^2 c^2 \left (a \int \cos ^4(e+f x)dx-\frac {a \cos ^5(e+f x)}{5 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (a \int \sin \left (e+f x+\frac {\pi }{2}\right )^4dx-\frac {a \cos ^5(e+f x)}{5 f}\right )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a^2 c^2 \left (a \left (\frac {3}{4} \int \cos ^2(e+f x)dx+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )-\frac {a \cos ^5(e+f x)}{5 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (a \left (\frac {3}{4} \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )-\frac {a \cos ^5(e+f x)}{5 f}\right )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a^2 c^2 \left (a \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )-\frac {a \cos ^5(e+f x)}{5 f}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a^2 c^2 \left (a \left (\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}+\frac {3}{4} \left (\frac {\sin (e+f x) \cos (e+f x)}{2 f}+\frac {x}{2}\right )\right )-\frac {a \cos ^5(e+f x)}{5 f}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])^3*(c - c*Sin[e + f*x])^2,x]
Output:
a^2*c^2*(-1/5*(a*Cos[e + f*x]^5)/f + a*((Cos[e + f*x]^3*Sin[e + f*x])/(4*f ) + (3*(x/2 + (Cos[e + f*x]*Sin[e + f*x])/(2*f)))/4))
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[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((Lt Q[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Leaf count of result is larger than twice the leaf count of optimal. \(159\) vs. \(2(77)=154\).
Time = 0.72 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.88
\[\frac {-\frac {c^{2} a^{3} \left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )}{5}+c^{2} a^{3} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+\frac {2 c^{2} a^{3} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}-2 c^{2} a^{3} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a^{3} c^{2} \cos \left (f x +e \right )+c^{2} a^{3} \left (f x +e \right )}{f}\]
Input:
int((a+sin(f*x+e)*a)^3*(c-c*sin(f*x+e))^2,x)
Output:
1/f*(-1/5*c^2*a^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+c^2*a^3*( -1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+2/3*c^2*a^3*( 2+sin(f*x+e)^2)*cos(f*x+e)-2*c^2*a^3*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1 /2*e)-a^3*c^2*cos(f*x+e)+c^2*a^3*(f*x+e))
Time = 0.08 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.84 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=-\frac {8 \, a^{3} c^{2} \cos \left (f x + e\right )^{5} - 15 \, a^{3} c^{2} f x - 5 \, {\left (2 \, a^{3} c^{2} \cos \left (f x + e\right )^{3} + 3 \, a^{3} c^{2} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{40 \, f} \] Input:
integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^2,x, algorithm="fricas")
Output:
-1/40*(8*a^3*c^2*cos(f*x + e)^5 - 15*a^3*c^2*f*x - 5*(2*a^3*c^2*cos(f*x + e)^3 + 3*a^3*c^2*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 340 vs. \(2 (80) = 160\).
Time = 0.27 (sec) , antiderivative size = 340, normalized size of antiderivative = 4.00 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=\begin {cases} \frac {3 a^{3} c^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 a^{3} c^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - a^{3} c^{2} x \sin ^{2}{\left (e + f x \right )} + \frac {3 a^{3} c^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - a^{3} c^{2} x \cos ^{2}{\left (e + f x \right )} + a^{3} c^{2} x - \frac {a^{3} c^{2} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {5 a^{3} c^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {4 a^{3} c^{2} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {2 a^{3} c^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a^{3} c^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} + \frac {a^{3} c^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {8 a^{3} c^{2} \cos ^{5}{\left (e + f x \right )}}{15 f} + \frac {4 a^{3} c^{2} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {a^{3} c^{2} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sin {\left (e \right )} + a\right )^{3} \left (- c \sin {\left (e \right )} + c\right )^{2} & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))**3*(c-c*sin(f*x+e))**2,x)
Output:
Piecewise((3*a**3*c**2*x*sin(e + f*x)**4/8 + 3*a**3*c**2*x*sin(e + f*x)**2 *cos(e + f*x)**2/4 - a**3*c**2*x*sin(e + f*x)**2 + 3*a**3*c**2*x*cos(e + f *x)**4/8 - a**3*c**2*x*cos(e + f*x)**2 + a**3*c**2*x - a**3*c**2*sin(e + f *x)**4*cos(e + f*x)/f - 5*a**3*c**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 4 *a**3*c**2*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) + 2*a**3*c**2*sin(e + f*x )**2*cos(e + f*x)/f - 3*a**3*c**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) + a** 3*c**2*sin(e + f*x)*cos(e + f*x)/f - 8*a**3*c**2*cos(e + f*x)**5/(15*f) + 4*a**3*c**2*cos(e + f*x)**3/(3*f) - a**3*c**2*cos(e + f*x)/f, Ne(f, 0)), ( x*(a*sin(e) + a)**3*(-c*sin(e) + c)**2, True))
Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (77) = 154\).
Time = 0.03 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.86 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=-\frac {32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a^{3} c^{2} + 320 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c^{2} - 15 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c^{2} + 240 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c^{2} - 480 \, {\left (f x + e\right )} a^{3} c^{2} + 480 \, a^{3} c^{2} \cos \left (f x + e\right )}{480 \, f} \] Input:
integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^2,x, algorithm="maxima")
Output:
-1/480*(32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*a^3*c^ 2 + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*c^2 - 15*(12*f*x + 12*e + si n(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^3*c^2 + 240*(2*f*x + 2*e - sin(2*f* x + 2*e))*a^3*c^2 - 480*(f*x + e)*a^3*c^2 + 480*a^3*c^2*cos(f*x + e))/f
Time = 0.13 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.26 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=\frac {3}{8} \, a^{3} c^{2} x - \frac {a^{3} c^{2} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} - \frac {a^{3} c^{2} \cos \left (3 \, f x + 3 \, e\right )}{16 \, f} - \frac {a^{3} c^{2} \cos \left (f x + e\right )}{8 \, f} + \frac {a^{3} c^{2} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a^{3} c^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^2,x, algorithm="giac")
Output:
3/8*a^3*c^2*x - 1/80*a^3*c^2*cos(5*f*x + 5*e)/f - 1/16*a^3*c^2*cos(3*f*x + 3*e)/f - 1/8*a^3*c^2*cos(f*x + e)/f + 1/32*a^3*c^2*sin(4*f*x + 4*e)/f + 1 /4*a^3*c^2*sin(2*f*x + 2*e)/f
Time = 20.10 (sec) , antiderivative size = 220, normalized size of antiderivative = 2.59 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=\frac {3\,a^3\,c^2\,x}{8}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (\frac {a^3\,c^2\,\left (75\,e+75\,f\,x-80\right )}{40}-\frac {15\,a^3\,c^2\,\left (e+f\,x\right )}{8}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a^3\,c^2\,\left (150\,e+150\,f\,x-160\right )}{40}-\frac {15\,a^3\,c^2\,\left (e+f\,x\right )}{4}\right )+\frac {a^3\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{2}-\frac {a^3\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{2}-\frac {5\,a^3\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{4}+\frac {a^3\,c^2\,\left (15\,e+15\,f\,x-16\right )}{40}+\frac {5\,a^3\,c^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}-\frac {3\,a^3\,c^2\,\left (e+f\,x\right )}{8}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^5} \] Input:
int((a + a*sin(e + f*x))^3*(c - c*sin(e + f*x))^2,x)
Output:
(3*a^3*c^2*x)/8 + (tan(e/2 + (f*x)/2)^8*((a^3*c^2*(75*e + 75*f*x - 80))/40 - (15*a^3*c^2*(e + f*x))/8) + tan(e/2 + (f*x)/2)^4*((a^3*c^2*(150*e + 150 *f*x - 160))/40 - (15*a^3*c^2*(e + f*x))/4) + (a^3*c^2*tan(e/2 + (f*x)/2)^ 3)/2 - (a^3*c^2*tan(e/2 + (f*x)/2)^7)/2 - (5*a^3*c^2*tan(e/2 + (f*x)/2)^9) /4 + (a^3*c^2*(15*e + 15*f*x - 16))/40 + (5*a^3*c^2*tan(e/2 + (f*x)/2))/4 - (3*a^3*c^2*(e + f*x))/8)/(f*(tan(e/2 + (f*x)/2)^2 + 1)^5)
Time = 0.18 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.02 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^2 \, dx=\frac {a^{3} c^{2} \left (-8 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4}-10 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3}+16 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2}+25 \cos \left (f x +e \right ) \sin \left (f x +e \right )-8 \cos \left (f x +e \right )+15 f x +8\right )}{40 f} \] Input:
int((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^2,x)
Output:
(a**3*c**2*( - 8*cos(e + f*x)*sin(e + f*x)**4 - 10*cos(e + f*x)*sin(e + f* x)**3 + 16*cos(e + f*x)*sin(e + f*x)**2 + 25*cos(e + f*x)*sin(e + f*x) - 8 *cos(e + f*x) + 15*f*x + 8))/(40*f)