Integrand size = 31, antiderivative size = 111 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {1}{2} a (B (c+d)+A (2 c+d)) x-\frac {a (3 A (c+d)+B (3 c+d)) \cos (e+f x)}{3 f}-\frac {a (3 B c+3 A d-B d) \cos (e+f x) \sin (e+f x)}{6 f}-\frac {B d \cos (e+f x) (a+a \sin (e+f x))^2}{3 a f} \] Output:
1/2*a*(B*(c+d)+A*(2*c+d))*x-1/3*a*(3*A*(c+d)+B*(3*c+d))*cos(f*x+e)/f-1/6*a *(3*A*d+3*B*c-B*d)*cos(f*x+e)*sin(f*x+e)/f-1/3*B*d*cos(f*x+e)*(a+a*sin(f*x +e))^2/a/f
Time = 1.29 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.94 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {a (12 A c f x+6 B c f x+6 A d f x+6 B d f x-3 (4 A (c+d)+B (4 c+3 d)) \cos (e+f x)+B d \cos (3 (e+f x))-3 B c \sin (2 (e+f x))-3 A d \sin (2 (e+f x))-3 B d \sin (2 (e+f x)))}{12 f} \] Input:
Integrate[(a + a*Sin[e + f*x])*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x]),x ]
Output:
(a*(12*A*c*f*x + 6*B*c*f*x + 6*A*d*f*x + 6*B*d*f*x - 3*(4*A*(c + d) + B*(4 *c + 3*d))*Cos[e + f*x] + B*d*Cos[3*(e + f*x)] - 3*B*c*Sin[2*(e + f*x)] - 3*A*d*Sin[2*(e + f*x)] - 3*B*d*Sin[2*(e + f*x)]))/(12*f)
Time = 0.48 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.11, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3042, 3447, 3042, 3502, 3042, 3213}
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) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a) (A+B \sin (e+f x)) (c+d \sin (e+f x))dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int (a \sin (e+f x)+a) \left ((A d+B c) \sin (e+f x)+A c+B d \sin ^2(e+f x)\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a) \left ((A d+B c) \sin (e+f x)+A c+B d \sin (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a) (a (3 A c+2 B d)+a (3 B c+3 A d-B d) \sin (e+f x))dx}{3 a}-\frac {B d \cos (e+f x) (a \sin (e+f x)+a)^2}{3 a f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a) (a (3 A c+2 B d)+a (3 B c+3 A d-B d) \sin (e+f x))dx}{3 a}-\frac {B d \cos (e+f x) (a \sin (e+f x)+a)^2}{3 a f}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {-\frac {a^2 (3 A (c+d)+B (3 c+d)) \cos (e+f x)}{f}-\frac {a^2 (3 A d+3 B c-B d) \sin (e+f x) \cos (e+f x)}{2 f}+\frac {3}{2} a^2 x (A (2 c+d)+B (c+d))}{3 a}-\frac {B d \cos (e+f x) (a \sin (e+f x)+a)^2}{3 a f}\) |
Input:
Int[(a + a*Sin[e + f*x])*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x]),x]
Output:
-1/3*(B*d*Cos[e + f*x]*(a + a*Sin[e + f*x])^2)/(a*f) + ((3*a^2*(B*(c + d) + A*(2*c + d))*x)/2 - (a^2*(3*A*(c + d) + B*(3*c + d))*Cos[e + f*x])/f - ( a^2*(3*B*c + 3*A*d - B*d)*Cos[e + f*x]*Sin[e + f*x])/(2*f))/(3*a)
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 0.30 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.32
\[\frac {-\frac {B a d \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+A a d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+B a c \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+B a d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-A a c \cos \left (f x +e \right )-A a d \cos \left (f x +e \right )-B a c \cos \left (f x +e \right )+A a c \left (f x +e \right )}{f}\]
Input:
int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x)
Output:
1/f*(-1/3*B*a*d*(2+sin(f*x+e)^2)*cos(f*x+e)+A*a*d*(-1/2*sin(f*x+e)*cos(f*x +e)+1/2*f*x+1/2*e)+B*a*c*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)+B*a*d* (-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-A*a*c*cos(f*x+e)-A*a*d*cos(f*x+ e)-B*a*c*cos(f*x+e)+A*a*c*(f*x+e))
Time = 0.08 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.76 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {2 \, B a d \cos \left (f x + e\right )^{3} + 3 \, {\left ({\left (2 \, A + B\right )} a c + {\left (A + B\right )} a d\right )} f x - 3 \, {\left (B a c + {\left (A + B\right )} a d\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 6 \, {\left ({\left (A + B\right )} a c + {\left (A + B\right )} a d\right )} \cos \left (f x + e\right )}{6 \, f} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorithm= "fricas")
Output:
1/6*(2*B*a*d*cos(f*x + e)^3 + 3*((2*A + B)*a*c + (A + B)*a*d)*f*x - 3*(B*a *c + (A + B)*a*d)*cos(f*x + e)*sin(f*x + e) - 6*((A + B)*a*c + (A + B)*a*d )*cos(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 277 vs. \(2 (100) = 200\).
Time = 0.15 (sec) , antiderivative size = 277, normalized size of antiderivative = 2.50 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\begin {cases} A a c x - \frac {A a c \cos {\left (e + f x \right )}}{f} + \frac {A a d x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {A a d x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {A a d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {A a d \cos {\left (e + f x \right )}}{f} + \frac {B a c x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {B a c x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {B a c \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {B a c \cos {\left (e + f x \right )}}{f} + \frac {B a d x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {B a d x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {B a d \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {B a d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 B a d \cos ^{3}{\left (e + f x \right )}}{3 f} & \text {for}\: f \neq 0 \\x \left (A + B \sin {\left (e \right )}\right ) \left (c + d \sin {\left (e \right )}\right ) \left (a \sin {\left (e \right )} + a\right ) & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x)
Output:
Piecewise((A*a*c*x - A*a*c*cos(e + f*x)/f + A*a*d*x*sin(e + f*x)**2/2 + A* a*d*x*cos(e + f*x)**2/2 - A*a*d*sin(e + f*x)*cos(e + f*x)/(2*f) - A*a*d*co s(e + f*x)/f + B*a*c*x*sin(e + f*x)**2/2 + B*a*c*x*cos(e + f*x)**2/2 - B*a *c*sin(e + f*x)*cos(e + f*x)/(2*f) - B*a*c*cos(e + f*x)/f + B*a*d*x*sin(e + f*x)**2/2 + B*a*d*x*cos(e + f*x)**2/2 - B*a*d*sin(e + f*x)**2*cos(e + f* x)/f - B*a*d*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*B*a*d*cos(e + f*x)**3/(3* f), Ne(f, 0)), (x*(A + B*sin(e))*(c + d*sin(e))*(a*sin(e) + a), True))
Time = 0.04 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.29 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {12 \, {\left (f x + e\right )} A a c + 3 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a c + 3 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a d + 4 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a d + 3 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a d - 12 \, A a c \cos \left (f x + e\right ) - 12 \, B a c \cos \left (f x + e\right ) - 12 \, A a d \cos \left (f x + e\right )}{12 \, f} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorithm= "maxima")
Output:
1/12*(12*(f*x + e)*A*a*c + 3*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a*c + 3*(2 *f*x + 2*e - sin(2*f*x + 2*e))*A*a*d + 4*(cos(f*x + e)^3 - 3*cos(f*x + e)) *B*a*d + 3*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a*d - 12*A*a*c*cos(f*x + e) - 12*B*a*c*cos(f*x + e) - 12*A*a*d*cos(f*x + e))/f
Time = 0.22 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.88 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {B a d \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} + \frac {1}{2} \, {\left (2 \, A a c + B a c + A a d + B a d\right )} x - \frac {{\left (4 \, A a c + 4 \, B a c + 4 \, A a d + 3 \, B a d\right )} \cos \left (f x + e\right )}{4 \, f} - \frac {{\left (B a c + A a d + B a d\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorithm= "giac")
Output:
1/12*B*a*d*cos(3*f*x + 3*e)/f + 1/2*(2*A*a*c + B*a*c + A*a*d + B*a*d)*x - 1/4*(4*A*a*c + 4*B*a*c + 4*A*a*d + 3*B*a*d)*cos(f*x + e)/f - 1/4*(B*a*c + A*a*d + B*a*d)*sin(2*f*x + 2*e)/f
Time = 34.59 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.21 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=-\frac {\frac {3\,A\,a\,d\,\sin \left (2\,e+2\,f\,x\right )}{2}-\frac {B\,a\,d\,\cos \left (3\,e+3\,f\,x\right )}{2}+\frac {3\,B\,a\,c\,\sin \left (2\,e+2\,f\,x\right )}{2}+\frac {3\,B\,a\,d\,\sin \left (2\,e+2\,f\,x\right )}{2}+6\,A\,a\,c\,\cos \left (e+f\,x\right )+6\,A\,a\,d\,\cos \left (e+f\,x\right )+6\,B\,a\,c\,\cos \left (e+f\,x\right )+\frac {9\,B\,a\,d\,\cos \left (e+f\,x\right )}{2}-6\,A\,a\,c\,f\,x-3\,A\,a\,d\,f\,x-3\,B\,a\,c\,f\,x-3\,B\,a\,d\,f\,x}{6\,f} \] Input:
int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))*(c + d*sin(e + f*x)),x)
Output:
-((3*A*a*d*sin(2*e + 2*f*x))/2 - (B*a*d*cos(3*e + 3*f*x))/2 + (3*B*a*c*sin (2*e + 2*f*x))/2 + (3*B*a*d*sin(2*e + 2*f*x))/2 + 6*A*a*c*cos(e + f*x) + 6 *A*a*d*cos(e + f*x) + 6*B*a*c*cos(e + f*x) + (9*B*a*d*cos(e + f*x))/2 - 6* A*a*c*f*x - 3*A*a*d*f*x - 3*B*a*c*f*x - 3*B*a*d*f*x)/(6*f)
Time = 0.17 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.38 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {a \left (-2 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b d -3 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a d -3 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b c -3 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b d -6 \cos \left (f x +e \right ) a c -6 \cos \left (f x +e \right ) a d -6 \cos \left (f x +e \right ) b c -4 \cos \left (f x +e \right ) b d +6 a c f x +6 a c +3 a d f x +6 a d +3 b c f x +6 b c +3 b d f x +4 b d \right )}{6 f} \] Input:
int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x)
Output:
(a*( - 2*cos(e + f*x)*sin(e + f*x)**2*b*d - 3*cos(e + f*x)*sin(e + f*x)*a* d - 3*cos(e + f*x)*sin(e + f*x)*b*c - 3*cos(e + f*x)*sin(e + f*x)*b*d - 6* cos(e + f*x)*a*c - 6*cos(e + f*x)*a*d - 6*cos(e + f*x)*b*c - 4*cos(e + f*x )*b*d + 6*a*c*f*x + 6*a*c + 3*a*d*f*x + 6*a*d + 3*b*c*f*x + 6*b*c + 3*b*d* f*x + 4*b*d))/(6*f)