Integrand size = 36, antiderivative size = 73 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\frac {2 a (5 A+B) c^2 \cos ^3(e+f x)}{15 f (c-c \sin (e+f x))^{3/2}}-\frac {2 a B c \cos ^3(e+f x)}{5 f \sqrt {c-c \sin (e+f x)}} \] Output:
2/15*a*(5*A+B)*c^2*cos(f*x+e)^3/f/(c-c*sin(f*x+e))^(3/2)-2/5*a*B*c*cos(f*x +e)^3/f/(c-c*sin(f*x+e))^(1/2)
Leaf count is larger than twice the leaf count of optimal. \(191\) vs. \(2(73)=146\).
Time = 2.21 (sec) , antiderivative size = 191, normalized size of antiderivative = 2.62 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {a \left (\cos \left (\frac {1}{2} (e+f x)\right ) \left (32 B-30 \sqrt {2} A \sqrt {1+\cos (e+f x)}\right )+\sqrt {2} \sqrt {1+\cos (e+f x)} \left (5 (2 A+B) \cos \left (\frac {3}{2} (e+f x)\right )+3 B \cos \left (\frac {5}{2} (e+f x)\right )-2 (20 A+B+2 (5 A+B) \cos (e+f x)-3 B \cos (2 (e+f x))) \sin \left (\frac {1}{2} (e+f x)\right )\right )\right ) \sqrt {c-c \sin (e+f x)}}{30 \sqrt {2} f \sqrt {1+\cos (e+f x)} \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )} \] Input:
Integrate[(a + a*Sin[e + f*x])*(A + B*Sin[e + f*x])*Sqrt[c - c*Sin[e + f*x ]],x]
Output:
-1/30*(a*(Cos[(e + f*x)/2]*(32*B - 30*Sqrt[2]*A*Sqrt[1 + Cos[e + f*x]]) + Sqrt[2]*Sqrt[1 + Cos[e + f*x]]*(5*(2*A + B)*Cos[(3*(e + f*x))/2] + 3*B*Cos [(5*(e + f*x))/2] - 2*(20*A + B + 2*(5*A + B)*Cos[e + f*x] - 3*B*Cos[2*(e + f*x)])*Sin[(e + f*x)/2]))*Sqrt[c - c*Sin[e + f*x]])/(Sqrt[2]*f*Sqrt[1 + Cos[e + f*x]]*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2]))
Time = 0.54 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3446, 3042, 3335, 3042, 3152}
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) \sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a) \sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a c \int \frac {\cos ^2(e+f x) (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \int \frac {\cos (e+f x)^2 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}}dx\) |
\(\Big \downarrow \) 3335 |
\(\displaystyle a c \left (\frac {1}{5} (5 A+B) \int \frac {\cos ^2(e+f x)}{\sqrt {c-c \sin (e+f x)}}dx-\frac {2 B \cos ^3(e+f x)}{5 f \sqrt {c-c \sin (e+f x)}}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {1}{5} (5 A+B) \int \frac {\cos (e+f x)^2}{\sqrt {c-c \sin (e+f x)}}dx-\frac {2 B \cos ^3(e+f x)}{5 f \sqrt {c-c \sin (e+f x)}}\right )\) |
\(\Big \downarrow \) 3152 |
\(\displaystyle a c \left (\frac {2 c (5 A+B) \cos ^3(e+f x)}{15 f (c-c \sin (e+f x))^{3/2}}-\frac {2 B \cos ^3(e+f x)}{5 f \sqrt {c-c \sin (e+f x)}}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])*(A + B*Sin[e + f*x])*Sqrt[c - c*Sin[e + f*x]],x]
Output:
a*c*((2*(5*A + B)*c*Cos[e + f*x]^3)/(15*f*(c - c*Sin[e + f*x])^(3/2)) - (2 *B*Cos[e + f*x]^3)/(5*f*Sqrt[c - c*Sin[e + f*x]]))
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 - 1))), x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && EqQ[2*m + p - 1, 0] && NeQ[m, 1]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* (g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S imp[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[ a^2 - b^2, 0] && IGtQ[Simplify[(2*m + p + 1)/2], 0] && NeQ[m + p + 1, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 0.62 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.86
method | result | size |
default | \(-\frac {2 \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right )^{2} a \left (3 B \sin \left (f x +e \right )+5 A -2 B \right )}{15 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(63\) |
parts | \(-\frac {2 A a \left (\sin \left (f x +e \right )-1\right ) \left (1+\sin \left (f x +e \right )\right ) c}{\cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {2 B a \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right ) \left (3 \sin \left (f x +e \right )^{2}-4 \sin \left (f x +e \right )+8\right )}{15 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {2 a \left (A +B \right ) \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right ) \left (\sin \left (f x +e \right )-2\right )}{3 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(167\) |
Input:
int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x,method=_RET URNVERBOSE)
Output:
-2/15*(sin(f*x+e)-1)*c*(1+sin(f*x+e))^2*a*(3*B*sin(f*x+e)+5*A-2*B)/cos(f*x +e)/(c-c*sin(f*x+e))^(1/2)/f
Time = 0.08 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.78 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {2 \, {\left (3 \, B a \cos \left (f x + e\right )^{3} + {\left (5 \, A + 4 \, B\right )} a \cos \left (f x + e\right )^{2} - {\left (5 \, A + B\right )} a \cos \left (f x + e\right ) - 2 \, {\left (5 \, A + B\right )} a + {\left (3 \, B a \cos \left (f x + e\right )^{2} - {\left (5 \, A + B\right )} a \cos \left (f x + e\right ) - 2 \, {\left (5 \, A + B\right )} a\right )} \sin \left (f x + e\right )\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{15 \, {\left (f \cos \left (f x + e\right ) - f \sin \left (f x + e\right ) + f\right )}} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x, algo rithm="fricas")
Output:
-2/15*(3*B*a*cos(f*x + e)^3 + (5*A + 4*B)*a*cos(f*x + e)^2 - (5*A + B)*a*c os(f*x + e) - 2*(5*A + B)*a + (3*B*a*cos(f*x + e)^2 - (5*A + B)*a*cos(f*x + e) - 2*(5*A + B)*a)*sin(f*x + e))*sqrt(-c*sin(f*x + e) + c)/(f*cos(f*x + e) - f*sin(f*x + e) + f)
\[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=a \left (\int A \sqrt {- c \sin {\left (e + f x \right )} + c}\, dx + \int A \sqrt {- c \sin {\left (e + f x \right )} + c} \sin {\left (e + f x \right )}\, dx + \int B \sqrt {- c \sin {\left (e + f x \right )} + c} \sin {\left (e + f x \right )}\, dx + \int B \sqrt {- c \sin {\left (e + f x \right )} + c} \sin ^{2}{\left (e + f x \right )}\, dx\right ) \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))**(1/2),x)
Output:
a*(Integral(A*sqrt(-c*sin(e + f*x) + c), x) + Integral(A*sqrt(-c*sin(e + f *x) + c)*sin(e + f*x), x) + Integral(B*sqrt(-c*sin(e + f*x) + c)*sin(e + f *x), x) + Integral(B*sqrt(-c*sin(e + f*x) + c)*sin(e + f*x)**2, x))
\[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )} \sqrt {-c \sin \left (f x + e\right ) + c} \,d x } \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x, algo rithm="maxima")
Output:
integrate((B*sin(f*x + e) + A)*(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c), x)
Time = 0.26 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.62 \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {\sqrt {2} {\left (30 \, A a \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, B a \cos \left (-\frac {5}{4} \, \pi + \frac {5}{2} \, f x + \frac {5}{2} \, e\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 5 \, {\left (2 \, A a \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + B a \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \cos \left (-\frac {3}{4} \, \pi + \frac {3}{2} \, f x + \frac {3}{2} \, e\right )\right )} \sqrt {c}}{30 \, f} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x, algo rithm="giac")
Output:
-1/30*sqrt(2)*(30*A*a*cos(-1/4*pi + 1/2*f*x + 1/2*e)*sgn(sin(-1/4*pi + 1/2 *f*x + 1/2*e)) + 3*B*a*cos(-5/4*pi + 5/2*f*x + 5/2*e)*sgn(sin(-1/4*pi + 1/ 2*f*x + 1/2*e)) + 5*(2*A*a*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) + B*a*sgn(s in(-1/4*pi + 1/2*f*x + 1/2*e)))*cos(-3/4*pi + 3/2*f*x + 3/2*e))*sqrt(c)/f
Timed out. \[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\int \left (A+B\,\sin \left (e+f\,x\right )\right )\,\left (a+a\,\sin \left (e+f\,x\right )\right )\,\sqrt {c-c\,\sin \left (e+f\,x\right )} \,d x \] Input:
int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))*(c - c*sin(e + f*x))^(1/2),x )
Output:
int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))*(c - c*sin(e + f*x))^(1/2), x)
\[ \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\sqrt {c}\, a \left (\left (\int \sqrt {-\sin \left (f x +e \right )+1}d x \right ) a +\left (\int \sqrt {-\sin \left (f x +e \right )+1}\, \sin \left (f x +e \right )^{2}d x \right ) b +\left (\int \sqrt {-\sin \left (f x +e \right )+1}\, \sin \left (f x +e \right )d x \right ) a +\left (\int \sqrt {-\sin \left (f x +e \right )+1}\, \sin \left (f x +e \right )d x \right ) b \right ) \] Input:
int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x)
Output:
sqrt(c)*a*(int(sqrt( - sin(e + f*x) + 1),x)*a + int(sqrt( - sin(e + f*x) + 1)*sin(e + f*x)**2,x)*b + int(sqrt( - sin(e + f*x) + 1)*sin(e + f*x),x)*a + int(sqrt( - sin(e + f*x) + 1)*sin(e + f*x),x)*b)