Integrand size = 36, antiderivative size = 89 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {3}{8} a^2 A c^2 x-\frac {a^2 B c^2 \cos ^5(e+f x)}{5 f}+\frac {3 a^2 A c^2 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a^2 A c^2 \cos ^3(e+f x) \sin (e+f x)}{4 f} \] Output:
3/8*a^2*A*c^2*x-1/5*a^2*B*c^2*cos(f*x+e)^5/f+3/8*a^2*A*c^2*cos(f*x+e)*sin( f*x+e)/f+1/4*a^2*A*c^2*cos(f*x+e)^3*sin(f*x+e)/f
Time = 0.31 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.61 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {a^2 c^2 \left (-32 B \cos ^5(e+f x)+5 A (12 (e+f x)+8 \sin (2 (e+f x))+\sin (4 (e+f x)))\right )}{160 f} \] Input:
Integrate[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x]) ^2,x]
Output:
(a^2*c^2*(-32*B*Cos[e + f*x]^5 + 5*A*(12*(e + f*x) + 8*Sin[2*(e + f*x)] + Sin[4*(e + f*x)])))/(160*f)
Time = 0.46 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.87, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3446, 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)^2 (c-c \sin (e+f x))^2 (A+B \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^2 (c-c \sin (e+f x))^2 (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a^2 c^2 \int \cos ^4(e+f x) (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \cos (e+f x)^4 (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a^2 c^2 \left (A \int \cos ^4(e+f x)dx-\frac {B \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 {B \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 {B \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 {B \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 {B \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 {B \cos ^5(e+f x)}{5 f}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^2,x]
Output:
a^2*c^2*(-1/5*(B*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_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[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. \(165\) vs. \(2(81)=162\).
Time = 0.06 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.87
\[\frac {a^{2} A \,c^{2} \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 )-2 a^{2} A \,c^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {a^{2} B \,c^{2} \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}+\frac {2 a^{2} B \,c^{2} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+a^{2} A \,c^{2} \left (f x +e \right )-a^{2} B \,c^{2} \cos \left (f x +e \right )}{f}\]
Input:
int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2,x)
Output:
1/f*(a^2*A*c^2*(-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*a^2*A*c^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/5*a^2*B*c^2*(8 /3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+2/3*a^2*B*c^2*(2+sin(f*x+e)^2 )*cos(f*x+e)+a^2*A*c^2*(f*x+e)-a^2*B*c^2*cos(f*x+e))
Time = 0.08 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.84 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=-\frac {8 \, B a^{2} c^{2} \cos \left (f x + e\right )^{5} - 15 \, A a^{2} c^{2} f x - 5 \, {\left (2 \, A a^{2} c^{2} \cos \left (f x + e\right )^{3} + 3 \, A a^{2} 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))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2,x, algori thm="fricas")
Output:
-1/40*(8*B*a^2*c^2*cos(f*x + e)^5 - 15*A*a^2*c^2*f*x - 5*(2*A*a^2*c^2*cos( f*x + e)^3 + 3*A*a^2*c^2*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 372 vs. \(2 (87) = 174\).
Time = 0.29 (sec) , antiderivative size = 372, normalized size of antiderivative = 4.18 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\begin {cases} \frac {3 A a^{2} c^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 A a^{2} c^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - A a^{2} c^{2} x \sin ^{2}{\left (e + f x \right )} + \frac {3 A a^{2} c^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - A a^{2} c^{2} x \cos ^{2}{\left (e + f x \right )} + A a^{2} c^{2} x - \frac {5 A a^{2} c^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 A a^{2} c^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} + \frac {A a^{2} c^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {B a^{2} c^{2} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 B a^{2} c^{2} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {2 B a^{2} c^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {8 B a^{2} c^{2} \cos ^{5}{\left (e + f x \right )}}{15 f} + \frac {4 B a^{2} c^{2} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {B a^{2} c^{2} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (A + B \sin {\left (e \right )}\right ) \left (a \sin {\left (e \right )} + a\right )^{2} \left (- c \sin {\left (e \right )} + c\right )^{2} & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))**2,x)
Output:
Piecewise((3*A*a**2*c**2*x*sin(e + f*x)**4/8 + 3*A*a**2*c**2*x*sin(e + f*x )**2*cos(e + f*x)**2/4 - A*a**2*c**2*x*sin(e + f*x)**2 + 3*A*a**2*c**2*x*c os(e + f*x)**4/8 - A*a**2*c**2*x*cos(e + f*x)**2 + A*a**2*c**2*x - 5*A*a** 2*c**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*A*a**2*c**2*sin(e + f*x)*cos (e + f*x)**3/(8*f) + A*a**2*c**2*sin(e + f*x)*cos(e + f*x)/f - B*a**2*c**2 *sin(e + f*x)**4*cos(e + f*x)/f - 4*B*a**2*c**2*sin(e + f*x)**2*cos(e + f* x)**3/(3*f) + 2*B*a**2*c**2*sin(e + f*x)**2*cos(e + f*x)/f - 8*B*a**2*c**2 *cos(e + f*x)**5/(15*f) + 4*B*a**2*c**2*cos(e + f*x)**3/(3*f) - B*a**2*c** 2*cos(e + f*x)/f, Ne(f, 0)), (x*(A + B*sin(e))*(a*sin(e) + a)**2*(-c*sin(e ) + c)**2, True))
Leaf count of result is larger than twice the leaf count of optimal. 164 vs. \(2 (81) = 162\).
Time = 0.04 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.84 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {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 a^{2} c^{2} - 240 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{2} + 480 \, {\left (f x + e\right )} A a^{2} c^{2} - 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 )} B a^{2} c^{2} - 320 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c^{2} - 480 \, B a^{2} c^{2} \cos \left (f x + e\right )}{480 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2,x, algori thm="maxima")
Output:
1/480*(15*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^2*c^ 2 - 240*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^2 + 480*(f*x + e)*A*a^2*c ^2 - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*c^2 - 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*c^2 - 480*B*a^2*c^2*cos(f*x + e))/f
Time = 0.22 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.27 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {3}{8} \, A a^{2} c^{2} x - \frac {B a^{2} c^{2} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} - \frac {B a^{2} c^{2} \cos \left (3 \, f x + 3 \, e\right )}{16 \, f} - \frac {B a^{2} c^{2} \cos \left (f x + e\right )}{8 \, f} + \frac {A a^{2} c^{2} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {A a^{2} c^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2,x, algori thm="giac")
Output:
3/8*A*a^2*c^2*x - 1/80*B*a^2*c^2*cos(5*f*x + 5*e)/f - 1/16*B*a^2*c^2*cos(3 *f*x + 3*e)/f - 1/8*B*a^2*c^2*cos(f*x + e)/f + 1/32*A*a^2*c^2*sin(4*f*x + 4*e)/f + 1/4*A*a^2*c^2*sin(2*f*x + 2*e)/f
Time = 36.94 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.67 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {3\,A\,a^2\,c^2\,x}{8}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (\frac {a^2\,c^2\,\left (80\,B-75\,A\,\left (e+f\,x\right )\right )}{40}+\frac {15\,A\,a^2\,c^2\,\left (e+f\,x\right )}{8}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a^2\,c^2\,\left (160\,B-150\,A\,\left (e+f\,x\right )\right )}{40}+\frac {15\,A\,a^2\,c^2\,\left (e+f\,x\right )}{4}\right )+\frac {a^2\,c^2\,\left (16\,B-15\,A\,\left (e+f\,x\right )\right )}{40}+\frac {3\,A\,a^2\,c^2\,\left (e+f\,x\right )}{8}-\frac {A\,a^2\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{2}+\frac {A\,a^2\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{2}+\frac {5\,A\,a^2\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{4}-\frac {5\,A\,a^2\,c^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^5} \] Input:
int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^2*(c - c*sin(e + f*x))^2,x)
Output:
(3*A*a^2*c^2*x)/8 - (tan(e/2 + (f*x)/2)^8*((a^2*c^2*(80*B - 75*A*(e + f*x) ))/40 + (15*A*a^2*c^2*(e + f*x))/8) + tan(e/2 + (f*x)/2)^4*((a^2*c^2*(160* B - 150*A*(e + f*x)))/40 + (15*A*a^2*c^2*(e + f*x))/4) + (a^2*c^2*(16*B - 15*A*(e + f*x)))/40 + (3*A*a^2*c^2*(e + f*x))/8 - (A*a^2*c^2*tan(e/2 + (f* x)/2)^3)/2 + (A*a^2*c^2*tan(e/2 + (f*x)/2)^7)/2 + (5*A*a^2*c^2*tan(e/2 + ( f*x)/2)^9)/4 - (5*A*a^2*c^2*tan(e/2 + (f*x)/2))/4)/(f*(tan(e/2 + (f*x)/2)^ 2 + 1)^5)
Time = 0.17 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.07 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx=\frac {a^{2} c^{2} \left (-8 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} b -10 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} a +16 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b +25 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a -8 \cos \left (f x +e \right ) b +15 a f x +8 b \right )}{40 f} \] Input:
int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2,x)
Output:
(a**2*c**2*( - 8*cos(e + f*x)*sin(e + f*x)**4*b - 10*cos(e + f*x)*sin(e + f*x)**3*a + 16*cos(e + f*x)*sin(e + f*x)**2*b + 25*cos(e + f*x)*sin(e + f* x)*a - 8*cos(e + f*x)*b + 15*a*f*x + 8*b))/(40*f)