Integrand size = 26, antiderivative size = 64 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\frac {3}{8} a^2 c^2 x+\frac {3 a^2 c^2 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a^2 c^2 \cos ^3(e+f x) \sin (e+f x)}{4 f} \] Output:
3/8*a^2*c^2*x+3/8*a^2*c^2*cos(f*x+e)*sin(f*x+e)/f+1/4*a^2*c^2*cos(f*x+e)^3 *sin(f*x+e)/f
Time = 0.06 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.61 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\frac {a^2 c^2 (12 (e+f x)+8 \sin (2 (e+f x))+\sin (4 (e+f x)))}{32 f} \] Input:
Integrate[(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x])^2,x]
Output:
(a^2*c^2*(12*(e + f*x) + 8*Sin[2*(e + f*x)] + Sin[4*(e + f*x)]))/(32*f)
Time = 0.33 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.91, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3042, 3215, 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 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^2 (c-c \sin (e+f x))^2dx\) |
\(\Big \downarrow \) 3215 |
\(\displaystyle a^2 c^2 \int \cos ^4(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \sin \left (e+f x+\frac {\pi }{2}\right )^4dx\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a^2 c^2 \left (\frac {3}{4} \int \cos ^2(e+f x)dx+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \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 )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a^2 c^2 \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 )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a^2 c^2 \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 )\) |
Input:
Int[(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x])^2,x]
Output:
a^2*c^2*((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[((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]))
Time = 14.44 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.58
method | result | size |
parallelrisch | \(\frac {c^{2} a^{2} \left (12 f x +\sin \left (4 f x +4 e \right )+8 \sin \left (2 f x +2 e \right )\right )}{32 f}\) | \(37\) |
risch | \(\frac {3 a^{2} c^{2} x}{8}+\frac {c^{2} a^{2} \sin \left (4 f x +4 e \right )}{32 f}+\frac {c^{2} a^{2} \sin \left (2 f x +2 e \right )}{4 f}\) | \(51\) |
parts | \(a^{2} c^{2} x +\frac {c^{2} a^{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 )}{f}-\frac {2 c^{2} a^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) | \(86\) |
derivativedivides | \(\frac {c^{2} a^{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 c^{2} a^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+c^{2} a^{2} \left (f x +e \right )}{f}\) | \(88\) |
default | \(\frac {c^{2} a^{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 c^{2} a^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+c^{2} a^{2} \left (f x +e \right )}{f}\) | \(88\) |
norman | \(\frac {\frac {3 a^{2} c^{2} x}{8}+\frac {3 a^{2} c^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2}+\frac {9 a^{2} c^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{4}+\frac {3 a^{2} c^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{2}+\frac {3 a^{2} c^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{8}+\frac {5 c^{2} a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}-\frac {3 c^{2} a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{4 f}+\frac {3 c^{2} a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{4 f}-\frac {5 c^{2} a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{4 f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{4}}\) | \(193\) |
Input:
int((a+sin(f*x+e)*a)^2*(c-c*sin(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
1/32*c^2*a^2*(12*f*x+sin(4*f*x+4*e)+8*sin(2*f*x+2*e))/f
Time = 0.08 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.84 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\frac {3 \, a^{2} c^{2} f x + {\left (2 \, a^{2} c^{2} \cos \left (f x + e\right )^{3} + 3 \, a^{2} c^{2} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^2,x, algorithm="fricas")
Output:
1/8*(3*a^2*c^2*f*x + (2*a^2*c^2*cos(f*x + e)^3 + 3*a^2*c^2*cos(f*x + e))*s in(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (61) = 122\).
Time = 0.18 (sec) , antiderivative size = 206, normalized size of antiderivative = 3.22 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\begin {cases} \frac {3 a^{2} c^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 a^{2} c^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - a^{2} c^{2} x \sin ^{2}{\left (e + f x \right )} + \frac {3 a^{2} c^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - a^{2} c^{2} x \cos ^{2}{\left (e + f x \right )} + a^{2} c^{2} x - \frac {5 a^{2} c^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 a^{2} c^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} + \frac {a^{2} c^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \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*(c-c*sin(f*x+e))**2,x)
Output:
Piecewise((3*a**2*c**2*x*sin(e + f*x)**4/8 + 3*a**2*c**2*x*sin(e + f*x)**2 *cos(e + f*x)**2/4 - a**2*c**2*x*sin(e + f*x)**2 + 3*a**2*c**2*x*cos(e + f *x)**4/8 - a**2*c**2*x*cos(e + f*x)**2 + a**2*c**2*x - 5*a**2*c**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*a**2*c**2*sin(e + f*x)*cos(e + f*x)**3/(8* f) + a**2*c**2*sin(e + f*x)*cos(e + f*x)/f, Ne(f, 0)), (x*(a*sin(e) + a)** 2*(-c*sin(e) + c)**2, True))
Time = 0.03 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.27 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\frac {{\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^{2} c^{2} - 16 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{2} + 32 \, {\left (f x + e\right )} a^{2} c^{2}}{32 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^2,x, algorithm="maxima")
Output:
1/32*((12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^2*c^2 - 16 *(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^2 + 32*(f*x + e)*a^2*c^2)/f
Time = 0.13 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.78 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\frac {3}{8} \, a^{2} c^{2} x + \frac {a^{2} c^{2} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a^{2} c^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^2,x, algorithm="giac")
Output:
3/8*a^2*c^2*x + 1/32*a^2*c^2*sin(4*f*x + 4*e)/f + 1/4*a^2*c^2*sin(2*f*x + 2*e)/f
Time = 18.38 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.56 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\frac {a^2\,c^2\,\left (8\,\sin \left (2\,e+2\,f\,x\right )+\sin \left (4\,e+4\,f\,x\right )+12\,f\,x\right )}{32\,f} \] Input:
int((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x))^2,x)
Output:
(a^2*c^2*(8*sin(2*e + 2*f*x) + sin(4*e + 4*f*x) + 12*f*x))/(32*f)
Time = 0.16 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.72 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x))^2 \, dx=\frac {a^{2} c^{2} \left (-2 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3}+5 \cos \left (f x +e \right ) \sin \left (f x +e \right )+3 f x \right )}{8 f} \] Input:
int((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e))^2,x)
Output:
(a**2*c**2*( - 2*cos(e + f*x)*sin(e + f*x)**3 + 5*cos(e + f*x)*sin(e + f*x ) + 3*f*x))/(8*f)