Integrand size = 23, antiderivative size = 110 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=\frac {5}{8} a^3 (4 c+3 d) x-\frac {4 a^3 (c+d) \cos (e+f x)}{f}+\frac {a^3 (c+3 d) \cos ^3(e+f x)}{3 f}-\frac {3 a^3 (4 c+5 d) \cos (e+f x) \sin (e+f x)}{8 f}-\frac {a^3 d \cos (e+f x) \sin ^3(e+f x)}{4 f} \] Output:
5/8*a^3*(4*c+3*d)*x-4*a^3*(c+d)*cos(f*x+e)/f+1/3*a^3*(c+3*d)*cos(f*x+e)^3/ f-3/8*a^3*(4*c+5*d)*cos(f*x+e)*sin(f*x+e)/f-1/4*a^3*d*cos(f*x+e)*sin(f*x+e )^3/f
Time = 0.58 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.09 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=-\frac {a^3 \cos (e+f x) \left (30 (4 c+3 d) \arcsin \left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )+\sqrt {\cos ^2(e+f x)} \left (88 c+72 d+9 (4 c+5 d) \sin (e+f x)+8 (c+3 d) \sin ^2(e+f x)+6 d \sin ^3(e+f x)\right )\right )}{24 f \sqrt {\cos ^2(e+f x)}} \] Input:
Integrate[(a + a*Sin[e + f*x])^3*(c + d*Sin[e + f*x]),x]
Output:
-1/24*(a^3*Cos[e + f*x]*(30*(4*c + 3*d)*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt [2]] + Sqrt[Cos[e + f*x]^2]*(88*c + 72*d + 9*(4*c + 5*d)*Sin[e + f*x] + 8* (c + 3*d)*Sin[e + f*x]^2 + 6*d*Sin[e + f*x]^3)))/(f*Sqrt[Cos[e + f*x]^2])
Time = 0.35 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.92, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 3230, 3042, 3124, 2009}
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+d \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^3 (c+d \sin (e+f x))dx\) |
\(\Big \downarrow \) 3230 |
\(\displaystyle \frac {1}{4} (4 c+3 d) \int (\sin (e+f x) a+a)^3dx-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^3}{4 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} (4 c+3 d) \int (\sin (e+f x) a+a)^3dx-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^3}{4 f}\) |
\(\Big \downarrow \) 3124 |
\(\displaystyle \frac {1}{4} (4 c+3 d) \int \left (\sin ^3(e+f x) a^3+3 \sin ^2(e+f x) a^3+3 \sin (e+f x) a^3+a^3\right )dx-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^3}{4 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{4} (4 c+3 d) \left (\frac {a^3 \cos ^3(e+f x)}{3 f}-\frac {4 a^3 \cos (e+f x)}{f}-\frac {3 a^3 \sin (e+f x) \cos (e+f x)}{2 f}+\frac {5 a^3 x}{2}\right )-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^3}{4 f}\) |
Input:
Int[(a + a*Sin[e + f*x])^3*(c + d*Sin[e + f*x]),x]
Output:
-1/4*(d*Cos[e + f*x]*(a + a*Sin[e + f*x])^3)/f + ((4*c + 3*d)*((5*a^3*x)/2 - (4*a^3*Cos[e + f*x])/f + (a^3*Cos[e + f*x]^3)/(3*f) - (3*a^3*Cos[e + f* x]*Sin[e + f*x])/(2*f)))/4
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandTri g[(a + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - b^2, 0] && IGtQ[n, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(b*(m + 1)) Int[(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)]
Time = 0.62 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.62
\[\frac {-\frac {a^{3} c \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+a^{3} d \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 )+3 a^{3} c \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} d \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )-3 \cos \left (f x +e \right ) a^{3} c +3 a^{3} d \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 \left (f x +e \right )-a^{3} d \cos \left (f x +e \right )}{f}\]
Input:
int((a+sin(f*x+e)*a)^3*(c+d*sin(f*x+e)),x)
Output:
1/f*(-1/3*a^3*c*(2+sin(f*x+e)^2)*cos(f*x+e)+a^3*d*(-1/4*(sin(f*x+e)^3+3/2* sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+3*a^3*c*(-1/2*cos(f*x+e)*sin(f*x+e)+ 1/2*f*x+1/2*e)-a^3*d*(2+sin(f*x+e)^2)*cos(f*x+e)-3*cos(f*x+e)*a^3*c+3*a^3* d*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)+a^3*c*(f*x+e)-a^3*d*cos(f*x+e ))
Time = 0.08 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.98 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=\frac {8 \, {\left (a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )^{3} + 15 \, {\left (4 \, a^{3} c + 3 \, a^{3} d\right )} f x - 96 \, {\left (a^{3} c + a^{3} d\right )} \cos \left (f x + e\right ) + 3 \, {\left (2 \, a^{3} d \cos \left (f x + e\right )^{3} - {\left (12 \, a^{3} c + 17 \, a^{3} d\right )} \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+d*sin(f*x+e)),x, algorithm="fricas")
Output:
1/24*(8*(a^3*c + 3*a^3*d)*cos(f*x + e)^3 + 15*(4*a^3*c + 3*a^3*d)*f*x - 96 *(a^3*c + a^3*d)*cos(f*x + e) + 3*(2*a^3*d*cos(f*x + e)^3 - (12*a^3*c + 17 *a^3*d)*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 371 vs. \(2 (104) = 208\).
Time = 0.20 (sec) , antiderivative size = 371, normalized size of antiderivative = 3.37 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=\begin {cases} \frac {3 a^{3} c x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {3 a^{3} c x \cos ^{2}{\left (e + f x \right )}}{2} + a^{3} c x - \frac {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 {\left (e + f x \right )}}{2 f} - \frac {2 a^{3} c \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {3 a^{3} c \cos {\left (e + f x \right )}}{f} + \frac {3 a^{3} d x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 a^{3} d x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 a^{3} d x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {3 a^{3} d x \cos ^{4}{\left (e + f x \right )}}{8} + \frac {3 a^{3} d x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {5 a^{3} d \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 a^{3} d \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a^{3} d \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {3 a^{3} d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 a^{3} d \cos ^{3}{\left (e + f x \right )}}{f} - \frac {a^{3} d \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (c + d \sin {\left (e \right )}\right ) \left (a \sin {\left (e \right )} + a\right )^{3} & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))**3*(c+d*sin(f*x+e)),x)
Output:
Piecewise((3*a**3*c*x*sin(e + f*x)**2/2 + 3*a**3*c*x*cos(e + f*x)**2/2 + a **3*c*x - a**3*c*sin(e + f*x)**2*cos(e + f*x)/f - 3*a**3*c*sin(e + f*x)*co s(e + f*x)/(2*f) - 2*a**3*c*cos(e + f*x)**3/(3*f) - 3*a**3*c*cos(e + f*x)/ f + 3*a**3*d*x*sin(e + f*x)**4/8 + 3*a**3*d*x*sin(e + f*x)**2*cos(e + f*x) **2/4 + 3*a**3*d*x*sin(e + f*x)**2/2 + 3*a**3*d*x*cos(e + f*x)**4/8 + 3*a* *3*d*x*cos(e + f*x)**2/2 - 5*a**3*d*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3 *a**3*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*a**3*d*sin(e + f*x)*cos(e + f*x )**3/(8*f) - 3*a**3*d*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*a**3*d*cos(e + f *x)**3/f - a**3*d*cos(e + f*x)/f, Ne(f, 0)), (x*(c + d*sin(e))*(a*sin(e) + a)**3, True))
Time = 0.04 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.55 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=\frac {32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c + 72 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c + 96 \, {\left (f x + e\right )} a^{3} c + 96 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} d + 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} d + 72 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} d - 288 \, a^{3} c \cos \left (f x + e\right ) - 96 \, a^{3} d \cos \left (f x + e\right )}{96 \, f} \] Input:
integrate((a+a*sin(f*x+e))^3*(c+d*sin(f*x+e)),x, algorithm="maxima")
Output:
1/96*(32*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*c + 72*(2*f*x + 2*e - sin(2 *f*x + 2*e))*a^3*c + 96*(f*x + e)*a^3*c + 96*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*d + 3*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^3 *d + 72*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^3*d - 288*a^3*c*cos(f*x + e) - 96*a^3*d*cos(f*x + e))/f
Time = 0.14 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.21 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=a^{3} c x - \frac {a^{3} d \cos \left (f x + e\right )}{f} + \frac {a^{3} d \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {3}{8} \, {\left (4 \, a^{3} c + 5 \, a^{3} d\right )} x + \frac {{\left (a^{3} c + 3 \, a^{3} d\right )} \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac {3 \, {\left (5 \, a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )}{4 \, f} - \frac {{\left (3 \, a^{3} c + 4 \, a^{3} d\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))^3*(c+d*sin(f*x+e)),x, algorithm="giac")
Output:
a^3*c*x - a^3*d*cos(f*x + e)/f + 1/32*a^3*d*sin(4*f*x + 4*e)/f + 3/8*(4*a^ 3*c + 5*a^3*d)*x + 1/12*(a^3*c + 3*a^3*d)*cos(3*f*x + 3*e)/f - 3/4*(5*a^3* c + 3*a^3*d)*cos(f*x + e)/f - 1/4*(3*a^3*c + 4*a^3*d)*sin(2*f*x + 2*e)/f
Time = 17.21 (sec) , antiderivative size = 330, normalized size of antiderivative = 3.00 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=\frac {5\,a^3\,\mathrm {atan}\left (\frac {5\,a^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,c+3\,d\right )}{4\,\left (5\,a^3\,c+\frac {15\,a^3\,d}{4}\right )}\right )\,\left (4\,c+3\,d\right )}{4\,f}-\frac {5\,a^3\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {f\,x}{2}\right )\,\left (4\,c+3\,d\right )}{4\,f}-\frac {\frac {22\,a^3\,c}{3}+6\,a^3\,d+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (3\,a^3\,c+\frac {15\,a^3\,d}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (6\,a^3\,c+2\,a^3\,d\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (3\,a^3\,c+\frac {15\,a^3\,d}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (3\,a^3\,c+\frac {23\,a^3\,d}{4}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (3\,a^3\,c+\frac {23\,a^3\,d}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (22\,a^3\,c+18\,a^3\,d\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {70\,a^3\,c}{3}+22\,a^3\,d\right )}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \] Input:
int((a + a*sin(e + f*x))^3*(c + d*sin(e + f*x)),x)
Output:
(5*a^3*atan((5*a^3*tan(e/2 + (f*x)/2)*(4*c + 3*d))/(4*(5*a^3*c + (15*a^3*d )/4)))*(4*c + 3*d))/(4*f) - (5*a^3*(atan(tan(e/2 + (f*x)/2)) - (f*x)/2)*(4 *c + 3*d))/(4*f) - ((22*a^3*c)/3 + 6*a^3*d + tan(e/2 + (f*x)/2)*(3*a^3*c + (15*a^3*d)/4) + tan(e/2 + (f*x)/2)^6*(6*a^3*c + 2*a^3*d) - tan(e/2 + (f*x )/2)^7*(3*a^3*c + (15*a^3*d)/4) + tan(e/2 + (f*x)/2)^3*(3*a^3*c + (23*a^3* d)/4) - tan(e/2 + (f*x)/2)^5*(3*a^3*c + (23*a^3*d)/4) + tan(e/2 + (f*x)/2) ^4*(22*a^3*c + 18*a^3*d) + tan(e/2 + (f*x)/2)^2*((70*a^3*c)/3 + 22*a^3*d)) /(f*(4*tan(e/2 + (f*x)/2)^2 + 6*tan(e/2 + (f*x)/2)^4 + 4*tan(e/2 + (f*x)/2 )^6 + tan(e/2 + (f*x)/2)^8 + 1))
Time = 0.18 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.13 \[ \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx=\frac {a^{3} \left (-6 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} d -8 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} c -24 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} d -36 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c -45 \cos \left (f x +e \right ) \sin \left (f x +e \right ) d -88 \cos \left (f x +e \right ) c -72 \cos \left (f x +e \right ) d +60 c f x +88 c +45 d f x +72 d \right )}{24 f} \] Input:
int((a+a*sin(f*x+e))^3*(c+d*sin(f*x+e)),x)
Output:
(a**3*( - 6*cos(e + f*x)*sin(e + f*x)**3*d - 8*cos(e + f*x)*sin(e + f*x)** 2*c - 24*cos(e + f*x)*sin(e + f*x)**2*d - 36*cos(e + f*x)*sin(e + f*x)*c - 45*cos(e + f*x)*sin(e + f*x)*d - 88*cos(e + f*x)*c - 72*cos(e + f*x)*d + 60*c*f*x + 88*c + 45*d*f*x + 72*d))/(24*f)