Integrand size = 24, antiderivative size = 82 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=\frac {5}{8} a^3 c x-\frac {5 a^3 c \cos ^3(e+f x)}{12 f}+\frac {5 a^3 c \cos (e+f x) \sin (e+f x)}{8 f}-\frac {c \cos ^3(e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{4 f} \] Output:
5/8*a^3*c*x-5/12*a^3*c*cos(f*x+e)^3/f+5/8*a^3*c*cos(f*x+e)*sin(f*x+e)/f-1/ 4*c*cos(f*x+e)^3*(a^3+a^3*sin(f*x+e))/f
Time = 0.99 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.66 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=\frac {a^3 c (60 f x-48 \cos (e+f x)-16 \cos (3 (e+f x))+24 \sin (2 (e+f x))-3 \sin (4 (e+f x)))}{96 f} \] Input:
Integrate[(a + a*Sin[e + f*x])^3*(c - c*Sin[e + f*x]),x]
Output:
(a^3*c*(60*f*x - 48*Cos[e + f*x] - 16*Cos[3*(e + f*x)] + 24*Sin[2*(e + f*x )] - 3*Sin[4*(e + f*x)]))/(96*f)
Time = 0.44 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3042, 3215, 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 (a \sin (e+f x)+a)^3 (c-c \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^3 (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)^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \int \cos (e+f x)^2 (\sin (e+f x) a+a)^2dx\) |
\(\Big \downarrow \) 3157 |
\(\displaystyle a c \left (\frac {5}{4} a \int \cos ^2(e+f x) (\sin (e+f x) a+a)dx-\frac {\cos ^3(e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {5}{4} a \int \cos (e+f x)^2 (\sin (e+f x) a+a)dx-\frac {\cos ^3(e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a c \left (\frac {5}{4} a \left (a \int \cos ^2(e+f x)dx-\frac {a \cos ^3(e+f x)}{3 f}\right )-\frac {\cos ^3(e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {5}{4} a \left (a \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx-\frac {a \cos ^3(e+f x)}{3 f}\right )-\frac {\cos ^3(e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a c \left (\frac {5}{4} a \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 )-\frac {\cos ^3(e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{4 f}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a c \left (\frac {5}{4} a \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 )-\frac {\cos ^3(e+f x) \left (a^2 \sin (e+f x)+a^2\right )}{4 f}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])^3*(c - c*Sin[e + f*x]),x]
Output:
a*c*(-1/4*(Cos[e + f*x]^3*(a^2 + a^2*Sin[e + f*x]))/f + (5*a*(-1/3*(a*Cos[ e + f*x]^3)/f + a*(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[(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[((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 = 0.50 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.09
\[\frac {-a^{3} c \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 a^{3} c \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}-2 \cos \left (f x +e \right ) a^{3} c +a^{3} c \left (f x +e \right )}{f}\]
Input:
int((a+sin(f*x+e)*a)^3*(c-c*sin(f*x+e)),x)
Output:
1/f*(-a^3*c*(-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*a^3*c*(2+sin(f*x+e)^2)*cos(f*x+e)-2*cos(f*x+e)*a^3*c+a^3*c*(f*x+e))
Time = 0.09 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.77 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=-\frac {16 \, a^{3} c \cos \left (f x + e\right )^{3} - 15 \, a^{3} c f x + 3 \, {\left (2 \, a^{3} c \cos \left (f x + e\right )^{3} - 5 \, a^{3} c \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \] Input:
integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e)),x, algorithm="fricas")
Output:
-1/24*(16*a^3*c*cos(f*x + e)^3 - 15*a^3*c*f*x + 3*(2*a^3*c*cos(f*x + e)^3 - 5*a^3*c*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (78) = 156\).
Time = 0.17 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.39 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=\begin {cases} - \frac {3 a^{3} c x \sin ^{4}{\left (e + f x \right )}}{8} - \frac {3 a^{3} c x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - \frac {3 a^{3} c x \cos ^{4}{\left (e + f x \right )}}{8} + a^{3} c x + \frac {5 a^{3} c \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} + \frac {2 a^{3} c \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {3 a^{3} c \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} + \frac {4 a^{3} c \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 a^{3} c \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 ) & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))**3*(c-c*sin(f*x+e)),x)
Output:
Piecewise((-3*a**3*c*x*sin(e + f*x)**4/8 - 3*a**3*c*x*sin(e + f*x)**2*cos( e + f*x)**2/4 - 3*a**3*c*x*cos(e + f*x)**4/8 + a**3*c*x + 5*a**3*c*sin(e + f*x)**3*cos(e + f*x)/(8*f) + 2*a**3*c*sin(e + f*x)**2*cos(e + f*x)/f + 3* a**3*c*sin(e + f*x)*cos(e + f*x)**3/(8*f) + 4*a**3*c*cos(e + f*x)**3/(3*f) - 2*a**3*c*cos(e + f*x)/f, Ne(f, 0)), (x*(a*sin(e) + a)**3*(-c*sin(e) + c ), True))
Time = 0.03 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.05 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=-\frac {64 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c + 3 \, {\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 - 96 \, {\left (f x + e\right )} a^{3} c + 192 \, a^{3} c \cos \left (f x + e\right )}{96 \, f} \] Input:
integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e)),x, algorithm="maxima")
Output:
-1/96*(64*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*c + 3*(12*f*x + 12*e + sin (4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^3*c - 96*(f*x + e)*a^3*c + 192*a^3*c *cos(f*x + e))/f
Time = 0.13 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.94 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=\frac {5}{8} \, a^{3} c x - \frac {a^{3} c \cos \left (3 \, f x + 3 \, e\right )}{6 \, f} - \frac {a^{3} c \cos \left (f x + e\right )}{2 \, f} - \frac {a^{3} c \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a^{3} c \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)),x, algorithm="giac")
Output:
5/8*a^3*c*x - 1/6*a^3*c*cos(3*f*x + 3*e)/f - 1/2*a^3*c*cos(f*x + e)/f - 1/ 32*a^3*c*sin(4*f*x + 4*e)/f + 1/4*a^3*c*sin(2*f*x + 2*e)/f
Time = 18.16 (sec) , antiderivative size = 250, normalized size of antiderivative = 3.05 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=\frac {5\,a^3\,c\,x}{8}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a^3\,c\,\left (60\,e+60\,f\,x-32\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a^3\,c\,\left (60\,e+60\,f\,x-96\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{4}-\frac {a^3\,c\,\left (90\,e+90\,f\,x-96\right )}{24}\right )-\frac {3\,a^3\,c\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}-\frac {11\,a^3\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}+\frac {11\,a^3\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+\frac {3\,a^3\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}+\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{24}-\frac {a^3\,c\,\left (15\,e+15\,f\,x-32\right )}{24}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^4} \] Input:
int((a + a*sin(e + f*x))^3*(c - c*sin(e + f*x)),x)
Output:
(5*a^3*c*x)/8 - (tan(e/2 + (f*x)/2)^2*((a^3*c*(15*e + 15*f*x))/6 - (a^3*c* (60*e + 60*f*x - 32))/24) + tan(e/2 + (f*x)/2)^6*((a^3*c*(15*e + 15*f*x))/ 6 - (a^3*c*(60*e + 60*f*x - 96))/24) + tan(e/2 + (f*x)/2)^4*((a^3*c*(15*e + 15*f*x))/4 - (a^3*c*(90*e + 90*f*x - 96))/24) - (3*a^3*c*tan(e/2 + (f*x) /2))/4 - (11*a^3*c*tan(e/2 + (f*x)/2)^3)/4 + (11*a^3*c*tan(e/2 + (f*x)/2)^ 5)/4 + (3*a^3*c*tan(e/2 + (f*x)/2)^7)/4 + (a^3*c*(15*e + 15*f*x))/24 - (a^ 3*c*(15*e + 15*f*x - 32))/24)/(f*(tan(e/2 + (f*x)/2)^2 + 1)^4)
Time = 0.16 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.84 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx=\frac {a^{3} c \left (6 \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}+9 \cos \left (f x +e \right ) \sin \left (f x +e \right )-16 \cos \left (f x +e \right )+15 f x +16\right )}{24 f} \] Input:
int((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e)),x)
Output:
(a**3*c*(6*cos(e + f*x)*sin(e + f*x)**3 + 16*cos(e + f*x)*sin(e + f*x)**2 + 9*cos(e + f*x)*sin(e + f*x) - 16*cos(e + f*x) + 15*f*x + 16))/(24*f)