Integrand size = 24, antiderivative size = 52 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {1}{2} a^2 c x-\frac {a^2 c \cos ^3(e+f x)}{3 f}+\frac {a^2 c \cos (e+f x) \sin (e+f x)}{2 f} \] Output:
1/2*a^2*c*x-1/3*a^2*c*cos(f*x+e)^3/f+1/2*a^2*c*cos(f*x+e)*sin(f*x+e)/f
Time = 0.18 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.83 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=-\frac {a^2 c (3 \cos (e+f x)+\cos (3 (e+f x))-3 (2 f x+\sin (2 (e+f x))))}{12 f} \] Input:
Integrate[(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]
Output:
-1/12*(a^2*c*(3*Cos[e + f*x] + Cos[3*(e + f*x)] - 3*(2*f*x + Sin[2*(e + f* x)])))/f
Time = 0.31 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {3042, 3215, 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 (a \sin (e+f x)+a)^2 (c-c \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^2 (c-c \sin (e+f x))dx\) |
\(\Big \downarrow \) 3215 |
\(\displaystyle a c \int \cos ^2(e+f x) (\sin (e+f x) a+a)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \int \cos (e+f x)^2 (\sin (e+f x) a+a)dx\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a c \left (a \int \cos ^2(e+f x)dx-\frac {a \cos ^3(e+f x)}{3 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (a \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx-\frac {a \cos ^3(e+f x)}{3 f}\right )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a c \left (a \left (\frac {\int 1dx}{2}+\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {a \cos ^3(e+f x)}{3 f}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a c \left (a \left (\frac {\sin (e+f x) \cos (e+f x)}{2 f}+\frac {x}{2}\right )-\frac {a \cos ^3(e+f x)}{3 f}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]
Output:
a*c*(-1/3*(a*Cos[e + f*x]^3)/f + a*(x/2 + (Cos[e + f*x]*Sin[e + f*x])/(2*f )))
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]))
Time = 11.34 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.85
method | result | size |
parallelrisch | \(-\frac {a^{2} c \left (-6 f x +3 \cos \left (f x +e \right )+\cos \left (3 f x +3 e \right )-3 \sin \left (2 f x +2 e \right )+4\right )}{12 f}\) | \(44\) |
risch | \(\frac {a^{2} c x}{2}-\frac {a^{2} c \cos \left (f x +e \right )}{4 f}-\frac {a^{2} c \cos \left (3 f x +3 e \right )}{12 f}+\frac {a^{2} c \sin \left (2 f x +2 e \right )}{4 f}\) | \(60\) |
derivativedivides | \(\frac {\frac {a^{2} c \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}-a^{2} c \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\cos \left (f x +e \right ) a^{2} c +a^{2} c \left (f x +e \right )}{f}\) | \(78\) |
default | \(\frac {\frac {a^{2} c \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}-a^{2} c \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\cos \left (f x +e \right ) a^{2} c +a^{2} c \left (f x +e \right )}{f}\) | \(78\) |
parts | \(a^{2} c x -\frac {a^{2} c \cos \left (f x +e \right )}{f}-\frac {a^{2} c \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {a^{2} c \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3 f}\) | \(79\) |
norman | \(\frac {\frac {a^{2} c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {2 a^{2} c}{3 f}+\frac {a^{2} c x}{2}-\frac {2 a^{2} c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{f}-\frac {a^{2} c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{f}+\frac {3 a^{2} c x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2}+\frac {3 a^{2} c x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{2}+\frac {a^{2} c x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{2}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{3}}\) | \(145\) |
Input:
int((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x,method=_RETURNVERBOSE)
Output:
-1/12*a^2*c*(-6*f*x+3*cos(f*x+e)+cos(3*f*x+3*e)-3*sin(2*f*x+2*e)+4)/f
Time = 0.09 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.88 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=-\frac {2 \, a^{2} c \cos \left (f x + e\right )^{3} - 3 \, a^{2} c f x - 3 \, a^{2} c \cos \left (f x + e\right ) \sin \left (f x + e\right )}{6 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="fricas")
Output:
-1/6*(2*a^2*c*cos(f*x + e)^3 - 3*a^2*c*f*x - 3*a^2*c*cos(f*x + e)*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 133 vs. \(2 (46) = 92\).
Time = 0.14 (sec) , antiderivative size = 133, normalized size of antiderivative = 2.56 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\begin {cases} - \frac {a^{2} c x \sin ^{2}{\left (e + f x \right )}}{2} - \frac {a^{2} c x \cos ^{2}{\left (e + f x \right )}}{2} + a^{2} c x + \frac {a^{2} c \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {a^{2} c \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} c \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {a^{2} c \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 ) & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))**2*(c-c*sin(f*x+e)),x)
Output:
Piecewise((-a**2*c*x*sin(e + f*x)**2/2 - a**2*c*x*cos(e + f*x)**2/2 + a**2 *c*x + a**2*c*sin(e + f*x)**2*cos(e + f*x)/f + a**2*c*sin(e + f*x)*cos(e + f*x)/(2*f) + 2*a**2*c*cos(e + f*x)**3/(3*f) - a**2*c*cos(e + f*x)/f, Ne(f , 0)), (x*(a*sin(e) + a)**2*(-c*sin(e) + c), True))
Time = 0.04 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.48 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=-\frac {4 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c + 3 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c - 12 \, {\left (f x + e\right )} a^{2} c + 12 \, a^{2} c \cos \left (f x + e\right )}{12 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="maxima")
Output:
-1/12*(4*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^2*c + 3*(2*f*x + 2*e - sin(2* f*x + 2*e))*a^2*c - 12*(f*x + e)*a^2*c + 12*a^2*c*cos(f*x + e))/f
Time = 0.32 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.13 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {1}{2} \, a^{2} c x - \frac {a^{2} c \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac {a^{2} c \cos \left (f x + e\right )}{4 \, f} + \frac {a^{2} c \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)),x, algorithm="giac")
Output:
1/2*a^2*c*x - 1/12*a^2*c*cos(3*f*x + 3*e)/f - 1/4*a^2*c*cos(f*x + e)/f + 1 /4*a^2*c*sin(2*f*x + 2*e)/f
Time = 37.50 (sec) , antiderivative size = 125, normalized size of antiderivative = 2.40 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {a^2\,c\,x}{2}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {3\,a^2\,c\,\left (e+f\,x\right )}{2}-\frac {a^2\,c\,\left (9\,e+9\,f\,x-12\right )}{6}\right )-a^2\,c\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+\frac {a^2\,c\,\left (e+f\,x\right )}{2}+a^2\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5-\frac {a^2\,c\,\left (3\,e+3\,f\,x-4\right )}{6}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^3} \] Input:
int((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x)),x)
Output:
(a^2*c*x)/2 - (tan(e/2 + (f*x)/2)^4*((3*a^2*c*(e + f*x))/2 - (a^2*c*(9*e + 9*f*x - 12))/6) - a^2*c*tan(e/2 + (f*x)/2) + (a^2*c*(e + f*x))/2 + a^2*c* tan(e/2 + (f*x)/2)^5 - (a^2*c*(3*e + 3*f*x - 4))/6)/(f*(tan(e/2 + (f*x)/2) ^2 + 1)^3)
Time = 0.20 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.02 \[ \int (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {a^{2} c \left (2 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2}+3 \cos \left (f x +e \right ) \sin \left (f x +e \right )-2 \cos \left (f x +e \right )+3 f x +2\right )}{6 f} \] Input:
int((a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x)
Output:
(a**2*c*(2*cos(e + f*x)*sin(e + f*x)**2 + 3*cos(e + f*x)*sin(e + f*x) - 2* cos(e + f*x) + 3*f*x + 2))/(6*f)